an SQL problem

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Mar 21 20:11:18 CST 2003


on 3/21/03 7:20 PM, jimmy at jimmy at wagesdesign.com wrote:

> 
> Hi,
> 
> I'm running into a problem...  I'm running Valentina in Director 8.5 for the
> PC.  I wrote this SQL statement in the script and it worked perfectly:
> 
> set gCursor = new(xtra "VCursor", GetRef(gDB), "Select * FROM Images,
> Expertise WHERE Images.ImgCode = Expertise.ImgCode AND
> Expertise.Category='Environmental' AND Images.Client='FERNBANK - PD' ORDER
> BY Expertise.Order")
> 
> Then I had to change it to this:
> 
> set gCursor = new(xtra "VCursor", GetRef(gDB), "Select * FROM Images,
> Expertise WHERE Images.ImgCode = Expertise.ImgCode AND
> Expertise.Category='Environmental' AND (Images.Client='FERNBANK - PD' OR
> Expertise.altClient='FERNBANK - PD') ORDER BY Expertise.Order")
> 
> (notice the addition of "OR Expertise.altClient='FERNBANK - PD')").  Well,
> now it doesn't give me any results at all!  I tried making the same query in
> an ASP page to see if it was the SQL query that was written wrong... but in
> the ASP page, it gave me the right results.  So I'm not sure what's going
> wrong here.
> 
> I'm pretty sure the VDB file is correct.  But if you want to look at it I
> can send it to you too.

It seems you try to do OR between fields from different tables.

Valentina do not support this now


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list