Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT using Multiple Join Conditions
Message
From
16/03/2006 11:37:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/03/2006 11:20:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01104883
Message ID:
01104922
Views:
13
This message has been marked as the solution to the initial question of the thread.
>I have tried:
>
>getDrawingDataString = "Select * From drawmstrp Left Outer Join drawmext1 On drawmstrp.dm_drawing_number = drawmext1.dmdrawno Left Outer Join drawmext3 On drawmstrp.dm_drawing_number = drawmext3.dmdrawno
>
>(to Add) And drawmstrp.dm_pending_change = drawmext3.prevchng
>
> Where drawmstrp.dmdrawno = '" + PadR(whatDrawingNumber,12) + "'"
>
>But I get an error 'Command contains unrecognized phrase/keyword.'

I think you hit 255 characters literal string limit. Divide it if you'd do with a single string. For SQL2000 there are easier ways to construct an SQL. ie:
text to m.getDrawingDataString textmerge noshow
Select * From drawmstrp 
  Left Outer Join drawmext1 On drawmstrp.dm_drawing_number = drawmext1.dmdrawno 
  Left Outer Join drawmext3 On drawmstrp.dm_drawing_number = drawmext3.dmdrawno
      And drawmstrp.dm_pending_change = drawmext3.prevchng
 Where drawmstrp.dmdrawno = '<<PadR(whatDrawingNumber,12)>>'
endtext
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform