I have a requirement when the user enters a flag = Y then two set of prompts should be considered and when the flag = N then another prompt should be considered.I am trying to create using case statement in the where clause.Is this the correct approach
if Flag = Y then
MGRID=@Prompt('Enter MGRID ',‘A’,‘My_Class\My_Object’, mono,free,persistent) and
ANLID=@Prompt('Enter ANLID ',‘A’,‘My_Class\My_Object’, mono,free,persistent)
or
If Flag=N then
ANAYLSTNAME = @Prompt('Enter AnalystName ',‘A’,‘My_Class\My_Object’, mono,free,persistent)
table.flag = case @Prompt('Enter Flag ',‘A’,‘My_Class\My_Object’, mono,free,persistent)
when Y then MGRID=@Prompt('Enter MGRID ',‘A’,‘My_Class\My_Object’, mono,free,persistent) and
ANLID=@Prompt('Enter ANLID ',‘A’,‘My_Class\My_Object’, mono,free,persistent)
when N then
ANAYLSTNAME = @Prompt('Enter AnalystName ',‘A’,‘My_Class\My_Object’, mono,free,persistent)
end
Thankyou
sparkling (BOB member since 2006-02-17)