Hi All,
While attempting to use @Prompt function at Table Owner level to access different Schemas (owners) in the same database I was stumped. The scenario goes like this:
My database is SQL server; I started experimenting with default database PUBS to make this logic works. In the current situation, single database (PUBS) with two schemas (dbo and guest). I created a universe with three tables.
Table 1 Jobs from dbo
Table 2 Jobs from guest
Table 3 employee from dbo
Joins: dbo.employee.job_id = dbo.jobs.job_id
dbo.employee.job_id=guest.jobs.job_id
I used @Prompt function in the Owner box of job table1 from dbo schema:
Syntax: @Prompt(‘Select Schema’,‘n’,{‘dbo’,‘guest’},mono,constrained).
Job Id objects syntax changed to : “pubs.@Prompt(‘SelectSchema’,‘n’{‘dbo’,‘guest’},mono,constrained).jobs”.job_id
parse failed: Invalid object name pubs.100.jobs error. Later I removed LOV parameter empty, still same error. To avoid the double quote around entire table owner name I changed BACK_QUOTE_SUPPORTED=N in the prm file. Now the syntax changed to: pubs.@Prompt(‘Select Schema’,‘n’,mono,constrained).jobs.job_id . Still parse failed: Invalid definition (UNV0023).
From there I cant go further. Please note I followed the following threads. A B C
Somewhere some thing I was doing wrong, can any one point me the direction.
Your parse failed on integrity-checking, right? How about trying the universe out – does it work when actual SQL gets generated?
I would expect that a parse would fail – SQL Server knows nothing about this @prompt stuff – that’s all inside BusinessObjects. At run time, though – when one answers the prompt and the “real” SQL gets generated – that’s when the database will evaluate the “resolved” owner/table names, and if you’ve done it correctly, all should then be fine.
I would expect that a parse would fail -- SQL Server knows nothing about this @prompt stuff -- that's all inside BusinessObjects.
OK I agree with you. If so how to tell SQL server about @prompt.
At run time, though -- when one answers the prompt and the "real" SQL gets generated -- that's when the database will evaluate the "resolved" owner/table names, and if you've done it correctly, all should then be fine.
We can only fill the @Prompt when BO allows doing so. In my case, BO generating the this SQL: SELECT
pubs.@Prompt(‘Select Schema’,‘n’,mono,constrained).jobs.job_id,
dbo.employee.fname
FROM
pubs.@Prompt(‘Select Schema’,‘n’,mono,constrained).jobs,
dbo.employee
WHERE
( dbo.employee.job_id=pubs.@Prompt(‘Select Schema’,‘n’,mono,constrained).jobs.job_id )
when I try to RUN the query from Query panel just going back to Query panel again. What I have to do now? could you please explain me ?
Hi Anita,
What Im trying to say is: when I try to run a query by hitting RUN button from Query panel, but the query panel reappears without executing the SQL statement. Even though Im using synchronous Connection mode. Generally this can happen if you are using asynchronous connection.
murali – I haven’t made a post because I have no idea what’s happening – I’ve never seen the query panel just come back like that. So – I didn’t want to make a useless post. Perhaps someone else can have an insight and chime in.