Convert Access to SQL Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    Convert Access to SQL Server

    I am using IIF condition in MSAccess to split two kind of rows into column why it is not possible in SqlServer or how can i do.
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    IIF is a VBA function and just recognized by Access.

    Use case instead.

    [PHP]Case when condition then result1 else result2 end[/PHP]

    Comment

    • dorinbogdan
      Recognized Expert Contributor
      • Feb 2007
      • 839

      #3
      In queries, I use SQL Case method as an equivalent to IIF:

      Code:
      Case When (anyFlag <> 0 ) Then  ... Else ...End
      For more investigation, It may be helpful if include here some MSAccess sample.

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #4
        Originally posted by dorinbogdan
        In queries, I use SQL Case method as an equivalent to IIF:

        Code:
        Case When (anyFlag <> 0 ) Then  ... Else ...End
        For more investigation, It may be helpful if include here some MSAccess sample.

        Yes i already tryed that, but it wont run in Sql view

        Comment

        • dorinbogdan
          Recognized Expert Contributor
          • Feb 2007
          • 839

          #5
          I know that a SQL View can contain Case statements.
          For further investigation, it may be helpful if include here some of your MSAccess sample, and even the SQL View not working code.

          Comment

          Working...