Board index » delphi » Conditional (like IIF) select clause

Conditional (like IIF) select clause

Hi

is there a way i can have a conditional select with interbase SQL???

like
  Select IIF(Account =1 ,"AC1","AElse") From ... Where ...

thanx

 

Re:Conditional (like IIF) select clause


Quote
Rajeev wrote in message <[email protected]>...

>is there a way i can have a conditional select with interbase SQL???

>like
>  Select IIF(Account =1 ,"AC1","AElse") From ... Where ...

Not in a query. You could create a stored procedure to do this though.

--
Wayne Niddery - WinWright Consulting
RADBooks - http://members.home.net/wniddery/
Toronto Delphi Users Group - http://www.tdug.com/

Re:Conditional (like IIF) select clause


Hi Wayne,

an IIF would be a nice thing. Could a UDF be implemented to do this work?

Thanks.

Stephan

Re:Conditional (like IIF) select clause


Quote
Stephan Schmahl wrote in message <[email protected]>...
>Hi Wayne,

>an IIF would be a nice thing. Could a UDF be implemented to do this work?

I'm sure it could, but why when it can be done easily in a stored procedure?

--
Wayne Niddery - WinWright Consulting
RADBooks - http://members.home.net/wniddery/
Toronto Delphi Users Group - http://www.tdug.com/

Other Threads