SQL command concat with block name problems.. [message #218724] |
Fri, 09 February 2007 10:03  |
Smith_X
Messages: 56 Registered: January 2007
|
Member |
|
|
Hello, could anybody plase help me...~~
SELECT :CONTROL.DOCTYPE||'NO'
FROM :CONTROL.DOCTYPE
WHERE :CONTROL.DOCTYPE||'.STSID' = 'sts06'
assume that my :CONTROL.DOCTYPE = 'PO'
then, I expect the result should look like below,
SELECT PONO
FROM PO
WHERE PO.STSID = 'sts06'
well, what I get is syntax error.. Invalid SQL Query and ORA-000903 or maybe what I really want to do is not work at all..
I want to create a dynamic LOV that interact with the value of drop down list. what I want is below,
1. user choose a doctype from drop down list
2. user use LOV and lov windows show only document number of selected doctype.
Those document are from six different tables (SO, SR, GR, RR, MO and PO)
My desperated idea is just use UNION and use alias to rename document number column to a same name column.. this method do not require doctype drop down list but I think it'll lead user to get confuse and somehow this LOV will represent many hundred of results.. which may lead to poor performance when query something. Are there any way to use "WHERE" condition after I use UNION please? or could anybody give me an alternative method, please?
|
|
|
|
|
Re: SQL command concat with block name problems.. [message #219241 is a reply to message #219151] |
Tue, 13 February 2007 12:05  |
Smith_X
Messages: 56 Registered: January 2007
|
Member |
|
|
Wow.. Thank you very much for your reply. You are very very genius, David.
Even though I do not use this logic anymore but I still try to understand what I should to do and I think I'm understand now..
create 6 record sets and 6 lov.
then change lov by use set_item_property and call lov by do-key 'listvalue'
Thank you very much again.
|
|
|