Hi
Need help here:-
I am running this sql on business object and when I prompt for the Outlet Code, I need the results to automatically add in the % on the result field like the one in the example. How can i do this?
SELECT FDDWHD20.DCOUT1, FSDWHE01.FSSHIP, FDDWHD20.DCNAME, FDDWHD20.DCMKDS, FDDWHD20.DCOTD1, FDDWHD20.DCOTD2, FDDWHD20.DCOTD3, FDDWHD20.DCOUT3, FDDWHD20.DCOUT2, FDDWHD20.DCOTD6, FDDWHD20.DCOUT6 FROM FDDWHD20, FSDWHE01 WHERE ( FDDWHD20.DCCO=FSDWHE01.FSCO ) AND ( FDDWHD20.DCSHIP=FSDWHE01.FSSHIP ) AND FDDWHD20.DCOUT1 LIKE '2'
Software/Hardware used:
ASKED:
February 21, 2011 11:31 AM
UPDATED:
February 23, 2011 1:46 PM
There is no ‘%’ in your example.
Also, what field corresponds to the Outlet code ?
Please provide more details.
Additional details provided by Devan:
“SELECT FDDWHD20.DCOUT1, FSDWHE01.FSSHIP, FDDWHD20.DCNAME, FDDWHD20.DCMKDS, FDDWHD20.DCOTD1, FDDWHD20.DCOTD2, FDDWHD20.DCOTD3, FDDWHD20.DCOUT3, FDDWHD20.DCOUT2, FDDWHD20.DCOTD6, FDDWHD20.DCOUT6 FROM FDDWHD20, FSDWHE01 WHERE ( FDDWHD20.DCCO=FSDWHE01.FSCO ) AND ( FDDWHD20.DCSHIP=FSDWHE01.FSSHIP ) AND FDDWHD20.DCOUT1 LIKE ’2%’
From the above,
the % will be after the ’2%’
Outlet code is FDDWHD20.DCOUT1
When prompted, i don’t want our users to enter 2%, I want them to enter 2 and then the above sql must automatically genreated results with the % eg all the coutlet code that starts with 2 must appear on the report.
You will also note that there is customer as well and the same field is being used for both customer and outlet “
SELECT
FDDWHD20.DCOUT1,
FSDWHE01.FSSHIP,
FDDWHD20.DCNAME,
FDDWHD20.DCMKDS,
FDDWHD20.DCOTD1,
FDDWHD20.DCOTD2,
FDDWHD20.DCOTD3,
FDDWHD20.DCOUT3,
FDDWHD20.DCOUT2,
FDDWHD20.DCOTD6,
FDDWHD20.DCOUT6
FROM
FDDWHD20,
FSDWHE01
WHERE
( FDDWHD20.DCCO=FSDWHE01.FSCO )
AND ( FDDWHD20.DCSHIP=FSDWHE01.FSSHIP )
AND
FDDWHD20.DCOUT1 LIKE @prompt(‘Enter Outlet Code L1:’,'A’,'Outlet GroupingOutlet Code L1′,Mono,Free,Persistent,,User:0)
Hi Carlosdl
From the above, when I select the use custom query, it appears like this.
When I enter what you suggested
FDDWHD20.DCOUT1 LIKE {@prompt(‘Enter Outlet Code L1:’,'A’,'Outlet GroupingOutlet Code L1′,Mono,Free,Persistent,,User:0)} & “*”
it comes up with an error ORA-00911
is there something you can see that I am doing incorrectly.
Have you tried without the curly brackets ?
instead of:
...LIKE {@prompt(’Enter Outlet Code L1:’,'A’,'Outlet GroupingOutlet Code L1′,Mono,Free,Persistent,,User:0)} & “*”ps. I don’t a have a BO installation at hand to test it.
Hi Carlosdl
I have tried without the curly brackets and same error.
However, I have tried it with double pipes and it worked
Thanx for all your help
Devan
Great !
Thanks for sharing.