Hi, If you use varchar, then you need quotes.
Regards, Thomas On Tuesday, January 12, 2016, Andreas Froehlich <[email protected]> wrote: > Hello, > I have the following SELECT statement with a WHERE clause on two VARCHAR > columns COL1 and COL2 which retrieve the correct rows. > select * from TEST WHERE COL1 = '7' AND COL2 = '07' > > Without the surrounding quotes ' ' no row is found: > select * from TEST WHERE COL1 = 7 AND COL2 = 07 > > What is strange is that for a single column it is working and also if the > strings don't represent the same numerical value i.e. > select * from TEST WHERE COL1 = 7 > select * from TEST WHERE COL1 = 07 > select * from TEST WHERE COL1 = 7 AND COL2 = 08 > > I reproduced it with version 1.4.190 and the latest stable version 1.3.176. > > Regards, Andreas > > > > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at https://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
