BusinessObjects Board

Modifying query via SQL viewer

Hi, I use Business Objects 6.5 and have had previous success modifying code in the SQL viewer and clicking the checkbox “Do not generate SQL before running”. But now I would like to automate the input of a list of IDs that change on a daily query. The piece in question looks like this…
WHERE
PXRD.CNT.SPR_ID IN (‘393278046’,‘563346346’,…<hundreds more!>…,‘095455787’)

I notice that I can save the SQL via the save icon, and I can automate the modification of the saved .sql file, but I can’t find a way to re-import that SQL into the Business Objects query. Am I just dreaming, or is there a way to do this?


A024523 (BOB member since 2008-10-06)

I’ve not done this in 6.5. but I know it’s possible in 5.1.x

Is the changing input list of ids the only reason you need to modify the SQL?

In Business Query, you can put the list of IDs in an excel column and have the query read in that column. In the conditions, use “in list”, then “select an excel range” and select, for example, cells A1 through A200, using your mouse.

This way, you don’t need to modify the SQL at all, just the excel range containing the list of ids.


KSG :us: (BOB member since 2002-07-17)

Thank you for the quick reply, but my problem is that functionality is diabled. I wish I had that. My only choices are Type a new constant, Show list of values, Type a new prompt, Show list of prompts, Select an object, Create a subquery, Calculation, Select Query Results. Out of those, I imagine the only one that might help me is “Select an object” but I doubt that I have the rights to create an object. Any other ideas?


A024523 (BOB member since 2008-10-06)

interesting…this feature can’t be disabled in 5.1.x…

My understanding is there’s no way to “import” an entire SQL statement into the Business Query for Excel query panel.

I’m sorry :frowning:
KSG


KSG :us: (BOB member since 2002-07-17)

Nevertheless, I greatly appreciate the feedback, because that saves me from wasting more time driving down that dead end road. Thanks!


A024523 (BOB member since 2008-10-06)