Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Problem
Message
From
19/04/2005 12:58:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/04/2005 11:36:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01006236
Message ID:
01006266
Views:
22
>Hi All:
>
>What is wrong with this code?
>
>I'm getting
>
>"'CURS1' must be created with Select ...into table"
>
>??
>
>Thanks,
>
>Yossi
>
>
>SELECT * FROM it!lotmast INTO CURSOR CURS1
>
>tcFlCode = 'PMR12043'
>
>SELECT ex_flcode, ex_price * ex_qty * IIF(ex_factor > 0,ex_factor,1) AS sqAmount, ex_exptype ;
>	FROM it!expnsinv ;
>	WHERE ex_flcode$tcFlCode ;
>	AND ex_dlvdat >= (SELECT MIN(lm_dlvdat) FROM CURS1) ;
>	AND ex_dlvdat <= (SELECT MAX(lm_dlvdat) FROM CURS1) ;
>	INTO CURSOR cursExpenses
>
curs1 should be created with nofilter at least. However this is not an effective SQL.

>
local array aMinMax[2]
aMinMax = 0 && or something that'd match datatype
SELECT MIN(lm_dlvdat),MAX(lm_dlvdat) FROM it!lotmast INTO array aMinMax

tcFlCode = 'PMR12043'

SELECT ex_flcode, ex_price * ex_qty * IIF(ex_factor > 0,ex_factor,1) AS sqAmount, ex_exptype ;
	FROM it!expnsinv ;
	WHERE ex_flcode$tcFlCode ;
	AND ex_dlvdat between aMinMax[1] and aMinMax[2] ;
	INTO CURSOR cursExpenses
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
Reply
Map
View

Click here to load this message in the networking platform