Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Widen number of records by field
Message
From
03/11/2009 05:32:52
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Widen number of records by field
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01432871
Message ID:
01432871
Views:
130
Hi Everybody,

I have a new SQL riddle to solve.

Given is a cursor
CREATE CURSOR curTable (cTableNumber, iChair)
INSERT INTO curTable VALUES ('1',4)
INSERT INTO curTable VALUES ('2',3)
INSERT INTO curTable VALUES ('3',2)
INSERT INTO curTable VALUES ('4',6)
Now I need to number the Chairs like 1.1,1.2,1.3,1.4 and a recors for each chair

Result
CREATE CURSOR curChair (cTableNumber, cChairNumber)
INSERT INTO curTable VALUES ('1',"1.1")
INSERT INTO curTable VALUES ('1',"1.2")
INSERT INTO curTable VALUES ('1',"1.3")
INSERT INTO curTable VALUES ('1',"1.4")
INSERT INTO curTable VALUES ('2',"2.1")
INSERT INTO curTable VALUES ('2',"2.2")
INSERT INTO curTable VALUES ('2',"2.3")
INSERT INTO curTable VALUES ('3',"3.1")
INSERT INTO curTable VALUES ('3',"3.2")
INSERT INTO curTable VALUES ('4',"4.1")
INSERT INTO curTable VALUES ('4',"4.2")
INSERT INTO curTable VALUES ('4',"4.3")
INSERT INTO curTable VALUES ('4',"4.4")
INSERT INTO curTable VALUES ('4',"4.5")
INSERT INTO curTable VALUES ('4',"4.6")
So how can I use SELECT SQL to achive this? I know I can SCAN and INSERT (etc.), but this is not my problem.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Next
Reply
Map
View

Click here to load this message in the networking platform