Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql problem, how can i return record row no in table all
Message
 
 
À
21/02/2012 04:10:11
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01535912
Message ID:
01535934
Vues:
38
>>Thank you for your reply me... but in my case i don't know CTE , how can do it ?
>Hi,
>You need something like this:
>WITH Tests(tid, tname, counts) AS
>(
> SELECT id, Name, 0 AS counts
> FROM Iden
> UNION ALL
> SELECT id, Name, counts + 1
> FROM Iden I
> JOIN Tests T ON
> T.tid = I.id
>)
>SELECT id, Name, T.counts
> FROM Iden I
> JOIN Tests T ON
> T.tid = I.id
>
>Check this link:
>http://msdn.microsoft.com/en-us/library/ms186243.aspx

He is using VFP data, CTE only works with SQL Server.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform