Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Widen number of records by field
Message
De
03/11/2009 06:23:30
 
 
À
03/11/2009 06:13:28
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01432871
Message ID:
01432876
Vues:
58
>>>Hi Gregory,
>>>
>>>thanks, I search for something without FOR and SCAN. (Didn't I mention this in the initial message?).
>>>
>>>Agnes
>>
>>
>>But Agnes, this is without scan/for - you just need to set up a temp table once
>>To me it is an SQL select
>
>{snip}
>	create cursor Chair ;
>	( ;
>		Id	I ;
>	)
>	local i
>	for i = 1 to 8
>		insert into Chair values (m.i)
>	
>	endfor
>
{snap}
>
>looks like a FOR loop to me ...
>
>(^.^)
>Agnes


Although the original message did not mention FOR ( just scan)
	CREATE CURSOR curTable (cTableNumber c(1), iChair I)
	INSERT INTO curTable VALUES ('1',4)
	INSERT INTO curTable VALUES ('2',3)
	INSERT INTO curTable VALUES ('3',2)
	INSERT INTO curTable VALUES ('4',6)

	
	create cursor xx ( xx I)
	insert into xx values(1)
	
	
	
	select cTableNumber, ;
			cTableNumber + '.' + padl(Id,1) as cChairNumber ;
		from curTable ;
			join  ( ;
					select cast(1 as int) as Id from xx ;
				union select cast(2 as int)  from xx ;
				union select cast(3 as int)  from xx ;
				union select cast(4 as int)  from xx ;
				union select cast(5 as int)  from xx ;
				union select cast(6 as int)  from xx ;
				union select cast(7 as int)  from xx ;
				union select cast(8 as int)  from xx ;
				union select cast(9 as int)  from xx ;
			)	Chair on ( Id  <= iChair );
		into cursor tmp ;
		order by 1, 2
(^_~)
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform