• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

SQL Case WHEN in data source

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Case WHEN in data source

    I think I've discovered another bug and would like some input on what the 'standard' is for Case statements in SQL. I've got a few data sources that do something like this:

    Option 1:

    Case OHOMIL
    When 1 Then 'Uno'
    When 2 Then 'Dos'
    When 3 Then 'Tres'
    Else 'IDK'
    End as CharacterField
    from TableName

    In previous versions, this has worked the same as:

    Option 2:

    Case When OHOMIL = 1 Then 'Uno'
    When OHOMIL = 2 Then 'Dos'
    When OHOMIL = 3 Then 'Tres'
    Else 'IDK'
    End as CharacterField
    From TableName

    Both of these ways have checked out in ACS AND Valence Data sources, until now. The new version of Valence is having issues with the first way I run my SQL Case statement. It gives me this error message then seems to concatenate the fieldname with the first 'WHEN'.

    image.png?
    ?Interesting thing is that any data sources that were created like option 1 in the in previous versions are running ok. Its once I open a data source to edit it that it starts to create this issue. I can either leave it as is or I'm forced to change it to option 2 just to save any changes to the data source.

    Version 6.3.20250708
    Last edited by mramos; 08-28-2025, 03:45 PM.
Working...
X