Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Updating or inserting records in temp file

Author  Topic 

waterduck
Aged Yak Warrior

982 Posts

Posted - 2009-06-04 : 02:10:23
hi, in my sto-pro i add and update record, but when displaying records in print, the following statement appear everytime when there was update or insert. is there any method to remove the statement?


(1 row(s) affected)

waterduck
Aged Yak Warrior

982 Posts

Posted - 2009-06-04 : 02:24:55
Sorry if i din explain detail, my comp are using print to print out report from the sto-pro and export it into excel, so i cant bear to have (1 row(s) affected) appears
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-06-04 : 02:31:53
that statement can be removed with "set nocount on".

But why are you doing this way to get data into excel ? There are lots of other way to get data into excel like
1. COPY from your Query Result in Grid and paste into excel
2. BCP out the data in CSV
3. From excel use database query
4. DTS / SSIS
5. this wonder thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
6. http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/
and many many other ways, just google for it

but using PRINT statement from your stored procedure sounds very inefficient and slow.
[spoiler]not to mention "School at midnight"[/spoiler]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

waterduck
Aged Yak Warrior

982 Posts

Posted - 2009-06-04 : 02:36:33
i have no idea y they are doing that also, i jz a trainee started working for jz 2 month which means tat i jz started to touch sql T.T... so so so so so many to learn about sql!!!
Go to Top of Page
   

- Advertisement -