0

hi,

i am struggling and it will prob be a simple answer but cannot figure it out at all today.

checked online but no use.

my to create my view i need to compare a column to a yes or no.

at the moment i have tried this but no joy:

where (isnull(`p`.`Date`) and (`p`.`True` = N))

I need the view to return only the true = N but cannot get this.

hope someone can help, sure you guys will.

many thanks

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by andydeans
1

You need to quote your string N like so:

WHERE p.DATE IS NULL and p.TRUE = 'N'
0

hi,

yes i thought that would be the case as when i do a select query that is how i would type it however when create the view with ='N' it throws a syntax error.

does not create the view.

anyone else know how i add the where clause to match 'N' in my crete view? it works if i take that line out so i know the rest of the query works i just cant get it to compare to a value.

thanks again

0

its ok, managed to solve it. syntax error higher up in code.

thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.