SQL subquery not working in FP 2003

J

jackle_usmc

I keep getting an error message when I run a custom query in DRW. The
syntax is good because it works in query analyzer.

If I do a simple select statement like

"select field1, field2, (select field from table2 where
t1.field1=table2.field) from table1 as t1
where field1='text' "

everything is fine.

If I do

"select field1, field2, (select field from table2 where
t1.field1=table2.field) from table1 as t1
where field1='::text::' "

I get the error message "the custom query contains errors".

I am doing this via database result wizard and doing a custom query in
both cases.
 
J

jackle_usmc

text is not a literal. I was using that as an example. The fields are
integers.

I've tried very simple select statements with the same results.
Anytime I use a parameter in my where clause, I get the error. If I
use an actual value in my where clause, I get the results I expect.
From an sql standpoint there is nothing wrong with my syntax. FP2K3
even says the syntax is right if I use a value instead of the
parameter.
 
D

David Berry

Sorry, I don't use the database wizard because it's not as flexible as
straight ASP Code. In ASP it would simply be:

where field1=" & text
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top