Skip to content

case statements don't seem to translate to AR #4

@TNichols2012

Description

@TNichols2012

SQL:
select
case
when column1 = 1 then 'Yes'
when column1 = 2 then 'No'
else 'Other' end as Answer
from table1 where username is not null

AR:
Table1.find_by_username is not null(username is not null)

Not sure AR will give me what I'm trying to do with SQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions