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
 Development Tools
 ASP.NET
 concatning Invoice numbers in cursor

Author  Topic 

Swati Jain
Posting Yak Master

139 Posts

Posted - 2007-10-20 : 09:07:15
Please tell the exact syntax for concatning Invoice numbers in cursor

Declare cursor
--Query to be executed
Open cursor
---
----
While fetch

set str=","+str

----
---
How to return the ',' sepatated Invocenumbers or numeric value

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-10-20 : 09:20:14
You can use while loop or functions to do it
take a look here http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/rowset-string-concatenation-which-method-is-best.aspx


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

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-22 : 03:30:45
quote:
Originally posted by Swati Jain

Please tell the exact syntax for concatning Invoice numbers in cursor

Declare cursor
--Query to be executed
Open cursor
---
----
While fetch

set str=","+str

----
---
How to return the ',' sepatated Invocenumbers or numeric value



As you use ASP.NET, cant you sumulate the same over there when you show data?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -