Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Problem
Message
De
19/04/2005 12:58:48
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
19/04/2005 11:36:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01006236
Message ID:
01006266
Vues:
21
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform