Skip to content

Tag: sql

Oracle developer. ORA-01722 Invalid Number when using UNION

I have this problem: I have two tables: Table A and Table B, with the same column called PK_COLUMN that in both tables are numeric(8, 0). I want to make this union: And I got the next error code: ORA-01722 Invalid number. The problem is that when I execute the both parts of the union separately they work perf…

Select last nontrivial value from each column, by group

How might I write in SQL a query that accumulates a table of rows representing selective updates into a single “latest and greatest” row per BY group? For instance from the following table: index date ssn first last title car shoe 1 Apr 1 100-00-0001 Joseph Schmoe Analyst Honda Adidas 2 May 1 100-…

Using column from another table in trigger

I need to use a column from another table when i use trigger before insert but i get an error Unknown table in field list Here is an example code: the column from another table is “printing_time_hr” from table “slicer” Please help, what to do, how to use the column from another table A…

convert varchar[ ] column type to uuid[ ]

there is a column of type character varying[] , which contains data of type uuid like {0f071799-e37e-4e1c-9620-e580447416fe,913a7134-6092-45fa-ae18-163302db8112}, but there are also some old values of another type like {5edfd4edfa1bb21a142442a0}. How can the column type be converted? I used the script: alter …