Home » Developer & Programmer » Forms » hierarchical tree query
hierarchical tree query [message #439574] Mon, 18 January 2010 07:58 Go to next message
colla
Messages: 36
Registered: January 2010
Location: ksa
Member
dear all,

please can you explain to me what is this query mean

please i need it piece by piece

rg_emps := Create_Group_From_Query('rg_emps','select 1, level,last_name, NULL, to_char(employee_id) '||' from employees ' ||'connect by prior employee_id = manager_id ' ||'start with job_id = ''AD_PRES''');


i exactly need this part

select 1, null

how could you select null ???? Shocked Shocked

please help & advice
Re: hierarchical tree query [message #439576 is a reply to message #439574] Mon, 18 January 2010 08:03 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Select null is used when you want an extra column in your result set but don't want to supply a value for it. It's not really any different from select 1 or select <constant>.
Usually it's used when you union 2 tables and one has more columns than the other:
SELECT col1, col2
FROM table1
UNION
SELECT col1, null
FROM table2


As to why it's in your query, not enough information to tell, we would need to know how the record group is being used.
Re: hierarchical tree query [message #439579 is a reply to message #439574] Mon, 18 January 2010 08:09 Go to previous messageGo to next message
colla
Messages: 36
Registered: January 2010
Location: ksa
Member


Hi cookiemonster

thanks for reply

i'm new in oracle forms i'm now try to understand the hierarchical tree in forms, i know what you are speak about will that's in SQL,
but what's this mean in forms

thanks again for your help and reply
Re: hierarchical tree query [message #439587 is a reply to message #439574] Mon, 18 January 2010 09:20 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Well all forms really does is display data based on sql queries and let you modify it.
So like I say it'll give you a blank column. If you want more details you need to tell us how this record group is being used in form because we've got no way of knowing.
Previous Topic: how to insert image with pl/sql insert into values()
Next Topic: How to stop "Do you want to save " Dialogue
Goto Forum:
  


Current Time: Fri Sep 20 04:30:22 CDT 2024