Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending output to, um, something useful
Message
De
13/06/2008 10:05:00
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Scripting
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01323772
Message ID:
01323803
Vues:
18
Does that write it to a cursor or table? That's what I need.

>That's actually a double work. In the thread I referenced in another thread there is WriteToLogFile function.
>
>http://vyaskn.tripod.com/code/write_to_file.txt
>
>>>I want to take what is being sent to the grid, or text in the results window via the PRINT command, and put it in a a table/cursor so I can move through it and do some processing on each row. How can I do that?
>>
>>I'm not sure what you want.
>>If you want just to put results from a PRINT command to some table, the you could use Table variable to store messages there.
>>
>>DECLARE  @Prt TABLE (Id int IDENTITY(1,1), Description varchar(8000))
>>
>>DECLARE @i int
>>SET @i = 0
>>WHILE @i < 500
>>     BEGIN
>>         print @i
>>         INSERT INTO @Prt (Description ) VALUES ('Main loop @i = '+CAST(@i as varchar(30)))
>>        SET @i = @i + 1
>>   END
>>
>>SELECT * FROM @Prt
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform