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.
| Author |
Topic |
|
shillr
Starting Member
2 Posts |
Posted - 2006-10-05 : 05:40:02
|
| My query relates to that of Lightbug3 and the solution from X002548.My query is how do I have multiple headers within the export file? I am extracting order information using DTS whereby there is a header containing the purchase order number and the detail being the product ordered for that PONumber.I need to start a new header for each new purchase order number. I'm looking to create something similar toPONumber 1Product, qtyProduct qtyPONumber 2Product, qtyProduct qtyWould be grateful for any advice.Thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-10-05 : 09:08:32
|
| Format the resultset in a stored proc in a temp table with a sequence value.Produce the resultset ordering by the sequence value.Extract using that sp and you can format it how you want.I often do this using a single column table so that I can hold an image of the extract in a table.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|