Schwerdtfeger
18th December 2002, 18:01
Hi,

I'd like to download from Baan to Execl a tablefield (for example ttaad200, Users) the query for this is in the example:

Query = "select ttaad200.user from ttaad200 where ttaad200._compnr=000 and ttaad200.user >" & Chr(34) & Chr(34) & "tools" & Chr(34) & Chr(34)

Now I would like to enhance the Query with an other string condition like : ttaad200.user > "tools" and ttaad200.user < "Zero"
Is this possible ? I have problems to set the syntax for the second condition. Can somone help me?

Thanks
Kay


:confused:

Al Smith
18th December 2002, 22:05
Hi,
First you can get rid of all those infernal double Chr(34)'s with a single quote. e.g.
Query = "select ttaad200.user from ttaad200 where ttaad200._compnr=000
and ttaad200.user > 'tools'"Your less than and greater than become easier.
Query = "select ttaad200.user from ttaad200 where ttaad200._compnr=000
and ttaad200.user > 'tools' and ttaad200.user < 'zero'"You can also use the between keyword.Query = "select ttaad200.user from ttaad200 where ttaad200._compnr=000
and ttaad200.user between 'tools' and 'zero'"This will include the user "tools" and "zero"

I hope this helps,
Al.

Schwerdtfeger
19th December 2002, 10:08
Hi Al,

it works! Great!!! Thank you very much! I spend a lot of time to search for a solution of this problem.

Regards
Kay

:D