Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return into Array
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01329359
Message ID:
01329367
Vues:
22
This message has been marked as the solution to the initial question of the thread.
>Hi All!!
>
>In Vfp we can return to Array using SQL statement. Can some body let me know how I can do the same in SQL Server. I have a list that I need to display into a Textbox and the Designer did not let me present the list in the detail band of the report so the next control that allow me to show a list is the textbox in the header band. But then I need to find the way to return 1 record that have the 5 or 10 name of the list.

No, you can't return an array. But if this is only display and you want a list like:'name1, name2, name3 ...'
You could use variable and the return a recordset with that variable:
DECLARE @StrList varchar(8000)
SELECT @StrList = ISNULL(@StrList+',' ,'')+Name FROM YourTable
SELECT @StrList
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform