Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Statements
Message
 
 
To
21/12/2004 10:43:42
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00970832
Message ID:
00971011
Views:
26
Try putting quotes around that field name.
TEXT TO lcScript NOSHOW TEXTMERGE
	CREATE SQL VIEW ALLPAIS CONNECTION conPAIS as
	SELECT PAIS_opord2.allocqty, PAIS_opord2.ualocqty,
	PAIS_mascrd.payname, PAIS_minve.cstock, PAIS_pomas.jobnum,
	PAIS_minve.itemnum, PAIS_minve.size AS minveSize,
	"PAIS_minve.desc" AS minveDescrip, PAIS_pomas.qtyorder
	FROM PAIS_pomas
		LEFT OUTER JOIN PAIS_minve
			ON PAIS_pomas.itemnum = PAIS_minve.itemnum
		LEFT OUTER JOIN PAIS_mascrd
			ON PAIS_pomas.vendnum = PAIS_mascrd.vendnum
		LEFT OUTER JOIN PAIS_opord2 PAIS_opord2
			ON PAIS_pomas.jobnum = PAIS_opord2.jobnum
	WHERE PAIS_pomas.jobnum = <<ALLTRIM(STR(Session.jobnum))>>
ENDTEXT
lcScript = strtran(lcScript, CHR(13) + CHR(10), [ ])
lcScript = strtran(lcScript, [	], [])  && replace tabs with nothing
>Mark,
>
>Sorry I left that information out. This select statement will be parameterized, but for now its not. The error message that I am getting is: Connectivity error:[Microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword 'desc'.
>
>I know that desc is a reserved word, but I'm using an as clause and it's still not working.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform