Yes/No Table?

Options

Hi

We have a action attribute with a Yes/No data type that I need to build into my SQL query. I initially thought this information would be in dbo.TABLEENTRIES but it does not seem to be working so I was wondering if this information is stored within a different table and if so which one?

Below a sample of the query I have at the moment in case the error is with this.

Thanks again for your help.

Neil

 

select

count(LL.LONGDESCRIPTION)

from dbo.ACTIONS as act

left join dbo.TABLEENTRIES as t1 on act.TYPE = t1.TABLEENTRIESID

left join dbo.ActionAttributes as att on act.ID = att.PARENTID

inner join dbo.AttributeTypes as cat on att.ATTRIBUTETYPESID = cat.ATTRIBUTETYPESID

left join dbo.TABLEENTRIES as LL on att.TABLEENTRIESID = LL.TABLEENTRIESID and LL.LONGDESCRIPTION = 'no'

where cat.DESCRIPTION = 'Helpline: Did the caller need Language Line'

Tagged:

Comments

  • Neil Hunter:

    Hi

    We have a action attribute with a Yes/No data type that I need to build into my SQL query. I initially thought this information would be in dbo.TABLEENTRIES but it does not seem to be working so I was wondering if this information is stored within a different table and if so which one?

    Below a sample of the query I have at the moment in case the error is with this.

    Thanks again for your help.

    Neil

     

    select

    count(LL.LONGDESCRIPTION)

    from dbo.ACTIONS as act

    left join dbo.TABLEENTRIES as t1 on act.TYPE = t1.TABLEENTRIESID

    left join dbo.ActionAttributes as att on act.ID = att.PARENTID

    inner join dbo.AttributeTypes as cat on att.ATTRIBUTETYPESID = cat.ATTRIBUTETYPESID

    left join dbo.TABLEENTRIES as LL on att.TABLEENTRIESID = LL.TABLEENTRIESID and LL.LONGDESCRIPTION = 'no'

    where cat.DESCRIPTION = 'Helpline: Did the caller need Language Line'

    I believe if an attribute is a boolean, the value isn't stored in tableentries, but rather in the attribute table itself. Take a look in the ActionAttributes table, there's a field called Boolean - it should be -1 for yes, and 0 for no.
  • James Andrews:
    I believe if an attribute is a boolean, the value isn't stored in tableentries, but rather in the attribute table itself. Take a look in the ActionAttributes table, there's a field called Boolean - it should be -1 for yes, and 0 for no.

     Thank you James

Categories