Link to home
Start Free TrialLog in
Avatar of JonahGroup
JonahGroupFlag for Canada

asked on

SQL query with "@prompt"

I have this Oracle 10g query that was generated by Business Objects...

SELECT a.AACMP_SK
FROM  WAG_AACMP_MEMBER_PERIOD a
WHERE a.AACMP_SK  =  @prompt('Enter Aacmp Sk:','N','Wag Aacmp Member Period\Aacmp Sk',Mono,Free,Persistent,,User:0)

...and it actually runs using Oracle's SQL Developer. The "@prompt" thing causes a dialog box to open, prompting the user for input. So my question is: What's this "@prompt" construct? I've never seen it before, and I can't find any information about it. Is there a manual page somewhere that will tell me about the parameters involved?

Scott.

Avatar of dsacker
dsacker
Flag of United States of America image

The @prompt is only for Business Objects, and it instructs the reporting tool to interactively prompt the user for the value, in your case, to be assigned to a.AACMP_SK.

In SQL Developer, change the entire @prompt string to the value you would enter if you were running it in Business Objects, and don't forget to put the single quotes around it. :)
Avatar of gattu007
gattu007

I think it is asking the user to enter the a.AACMP_SK
Avatar of JonahGroup

ASKER

So then the "@prompt" has different parameters depending on the context. I still can't find any information about "@prompt" online -- either as a Business Objects definition or a SQL Developer definition. This might be because search engines like Google are ignoring the "@" character, and I'm left with thousands of hits concerning other meanings of "prompt" (like the SQLPlus "set sqlprompt"). I attempted using it in SQL Developer as suggested, but just got an error (missing expression). If I could find manual pages for using it in each context (SQL Developer and Business Objects), this would be better.

Scott.
Actually, the @prompt parameters are defined and used by Business Objects and that only. Do NOT use @prompt in SQL Developer, as it is not standard SQL code. It is ONLY for Business Objects.
I understand that "@prompt" is not standard SQL . This is probably why I could find no reference to it. But it seems to act as a directive to certain tools. In both SQL Developer and Business Objects, it's used for acquiring input from the user. I want to know how to use it in either context. So I'm looking for manual pages that describe how to use it in Business Objects, and how to use it in SQL Developer.

Scott.
ASKER CERTIFIED SOLUTION
Avatar of dsacker
dsacker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial