Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL and Memos
Message
De
07/07/2005 10:29:04
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/07/2005 10:07:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01029926
Message ID:
01029932
Vues:
15
>I have a table that contains the following two fields (along with others):
>
>
>drwno C(15)     block M
>1                 10,11
>2                 10
>3                 11
>4                 11,12,13
>
>
>Is there a way using sql to return the following cursor:
>
>
>drwno C(15)     block C(5)
>1                 10
>1                 11
>2                 10
>3                 11
>4                 11
>4                 12
>4                 13
>
>
>If sql is not the best approach, any other suggestions would be greatly appreciated.
>
>Thanks in advance,
>Russell

Russel,
For a solution that's not SQL select:
Create Cursor myCursor (drwno c(15),Block c(5))
Local Array aBlocks[1]
Local ix
Select myExisting
Scan
  For ix=1 To Alines(aBlocks,Block,.T.,',')
    Insert Into myCursor (drwno,Block) Values ;
      (myExisting.drwno,aBlocks[m.ix])
  Endfor
Endscan
Select myCursor
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