how to have 2 select creteria on one column?
how to have 2 select creteria on one column?
От:
Michael Hoeller <MichaelHoeller@t-online.de>
Дата:
Hello, I would like to select every row which has got in the column CODE a "k" but I want to exclude every "kV" -- may be it is due to the fact that it is Saturday and I work too long I don't get it.. I tried a subselect, union but I struggle with the two select creteria on one column. Can some one help me -- hope this is not a too stupid question. Normally google is my friend but also there I did not find a solution. Thanks a lot Michael
Re: how to have 2 select creteria on one column?
От:
Richard Huxton <dev@archonet.com>
Дата:
Michael Hoeller wrote: > Hello, > > I would like to select every row which has got in the column CODE a "k" > but I want to exclude every "kV" -- may be it is due to the fact that > it is Saturday and I work too long I don't get it.. I tried a > subselect, union but I struggle with the two select creteria on one > column. SELECT * FROM my_table WHERE code = 'k' AND code <> 'kV' ; HTH -- Richard Huxton Archonet Ltd
Re: how to have 2 select creteria on one column?
От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Sat, Sep 10, 2005 at 17:45:50 +0200, Michael Hoeller wrote: > Hello, > > I would like to select every row which has got in the column CODE a "k" > but I want to exclude every "kV" -- may be it is due to the fact that > it is Saturday and I work too long I don't get it.. I tried a > subselect, union but I struggle with the two select creteria on one > column. Your description isn't as precise as would be nice. But from what I can figure you want: code ~ '^k[^V]'