I'd like to represent a hierarchy in a table like
id name parent1 aaa null
2 bbb 1
3 ccc 1
4 ddd 3
is it possible to select reucursivly?
For example for id 4 I would like a result like this:
aaa-ccc-ddd
For id 3 like this:
aaa-ccc
I read in the ansi SQL forum oracle can...
I'd like to represent a hierarchy in a table like
id name parent1 aaa null
2 bbb 1
3 ccc 1
4 ddd 3
is it possible to select reucursivly?
For example for id 4 I would like a result like this:
aaa-ccc-ddd
For id 3 like this:
aaa-ccc
Is it possible to create a table with a unique constrain on a column, but allow null values?
I want to make sure that a new value which is inserted into the table is not present already except if it is null.
I would like to insert more rows into the table t_str_dag
using the following select command, but I always get this "specifies multiple columns"- Error
even though the select command alone gives me exactly what I want to insert.???
db2 => select id, id/100 *100 from t_structures...
This query gives me a list of 1085 records:
select distinct clone_id, stage from t_expression
but I don't need the list, I only need to count them
How can I do this?
This command works, but it is not what I want:
select count (distinct clone_id) from t_expression
These commands do not work...
I wanted to represent a hierarchical tree in a table. Unfortunately I chose a not very elegant way, by creating a table with as many columns as levels in the tree (see table t_old below). Now I want to change this. I created a new tables (t_new) which contains only three columns (id, structure...
I need to select all distinct "structures" of a table and order them depending on the value of column "str_order". The following two commands don't work.
select distinct structure from T_STRUCT_FEAT_M where stage='m' order by
str_order
select distinct structure from (select...
I need to alter a column of a table, containing data allready, from varchar(4) to varchar(6), because I need to store longer strings than I expected. The new table should contain all the data as the old one and should have the same name as the old one.
How can I copy the structure and the data...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.