For some of our reports we need objects which return a constant value. The syntax in SQL would be “Select ‘TEXT’ from dual;”. Is there an easy way to do this? We are now decoding like this: “decode(table.column, ‘TEXT’, ‘TEXT’, TEXT’)”. It works just like we want it to, but I assume there is a better way to accomplish this.
In a message dated 98-08-15 16:34:20 EDT, you write:
@Susanne:
Simply enter your text in the “Select” portion of the object, and leave the “Tables” portion blank. In other words, you are creating SQL that looks like:
Select "Text" From...
… which will fail to parse. However, as long as the user puts this object on a query with at least one object that does reference a table, the generated SQL will be:
Select "Text", Table.Column From Table
Which will work just fine. You could also consider creating an @Prompt() object which promts the user for the desired text.
I have tried to create an object returning a constant value at the universe. But when I use this object with another object at the report level , it is giving this error. I am using 6.1a version of BO.
Also the SQL generated at the report level is :
SELECT
"FSRID",
dbo.ErrorPages.ErrorPageID
FROM
dbo.ErrorPages
Is there a solution to this problem.
Pls let me know, any help will be appreciated. Thanks
you simply need to create a new object and in the select statement put ‘text’ including the single quotes. No need to put select or from part. Object will not parse but will return the constant