Skip to Content
0
Former Member
Feb 20, 2009 at 09:43 PM

NULL in a prompt to change the sql-query

96 Views

hi all,

the value assigned to a prompt by the user in a report usually goes in the WHERE condition of the sql-query.

is there a way to cancel that WHERE condition from the sql-query based on what the user enter in the prompt box ?

for example in the case I want 'ALL' for a specific WHERE condition I use something like this:

@Select(Class Name\Object Name) = @Prompt('Select State','A','Class Name\Object Name',mono,free)

or 'ALL' = @Prompt('Select State','A','Class Name\Object Name',mono,free)

because I am forced to enter a value in the WHERE condition of the sql-query.

instead I would like to eliminate that WHERE condition from my sql-query in case the user doesn't enter anything. or if the user enter NULL.

is it possible or the sql-query is untouchable ?

thanks leonardo