Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Widen number of records by field
Message
From
03/11/2009 06:23:30
 
 
To
03/11/2009 06:13:28
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01432871
Message ID:
01432876
Views:
59
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform