assassinator
16th February 2009, 05:28
I had found some doubt. In WHERE statement, I used IN operate.
This is OK, no error.
and tcmcs003.cwar in ("KAF","KAJ","NLF"..."TWJ")
But this is not correct.
and tcmcs003.cwar(1;1) in ("K","N"..."T")
And should use like this:
and (tcmcs003.cwar(1;1) = "K" or tcmcs003.cwar(1;1) = "N" or...tcmcs003.cwar(1;1) = "T")

I can't see the differents in the three statements.:confused:

zardoz
16th February 2009, 20:39
Using the IN statement you have a more compact notation, and a golden rule (indipendent from the programming language you consider) is that less you write, you have less probability to do something wrong.
I'm not sure, but if you use the IN statement also the database driver can do some optimization of the code taht is impossible to do with a list of OR statements instead...

assassinator
17th February 2009, 08:00
Oh, sorry. I made some mistake. I had revised it.

assassinator
23rd February 2009, 02:43
Nobody know about it ?