I could use some help to write a prog./sql construct for a report..
The Sql should first check for the prompt & then decide which "select" statements should run
something like (pseudo-code)
Select ACCT,LOC FROM (
IF :loc = 'MN' THEN
Select acc as ACCT,location as LOC
ELSE IF :loc = 'MA' THEN
Select accid as ACCT,locid as LOC
ELSE IF :loc = 'PA' THEN
Select accountid as ACCT,location as LOC
END IF)
the above doesnt seem to work. Please help!