Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Location
    Rome
    Posts
    12

    Question Unanswered: Sybase: IIF syntax

    Hello!
    I've a query with some fields; one of these fields is:
    IIF([Field1]=[Field2],'TrueString','FalseString') as State
    ...where: [Field1] and [Field2] are a sum fields. If I execute this syntax on MS Access it's ok, but if I execute one on Sybase it's not ok!
    Why???
    Help me, please.
    Thanks.

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Hiya

    Not sure if I understand you correctyly.

    The command IF([Field1]=[Field2],'TrueString','FalseString') can be run in ISQL as a CASE statement. Check out the samples for CASE statements in the T-SQL Reference Manual.

    Cheers
    Willy

  3. #3
    Join Date
    Mar 2003
    Location
    Rome
    Posts
    12

    Talking

    YES! Now it's ok with CASE statement.
    Thank you very much.
    Last edited by Archimede; 06-17-03 at 04:37.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •