Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Widen number of records by field
Message
De
03/11/2009 05:32:52
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Widen number of records by field
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01432871
Message ID:
01432871
Vues:
129
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]
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform