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 |
batgrrrl
Starting Member
8 Posts |
Posted - 2001-12-10 : 01:01:45
|
Hi Guys,I would like to know if there is a way to pass back a basic record count from this query back to an asp page that called the sp?INSERT INTO renee.dbo.po_lines SELECT distinct po_lines.po_header_id, po_lines.po_line_num, po_lines.quantity, po_lines.unit_cost, po_lines.description, po_lines.created_by, po_lines.creation_date, po_lines.last_updated_by, po_lines.last_update_dateFROM po_lines RIGHT JOIN po_header ON po_lines.po_header_id = po_header.po_header_idWHERE (((po_header.po_detail_status_id)= @po_status ) AND ((po_header.po_type_id)= @typeid Or (po_header.po_type_id)= @typeid2 ) AND (( po_header.creation_date > @sDate AND po_header.creation_date < @eDate )));I would just like to know how many records where inserted. Can anyone help please?Thanks thanks thanks :) |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2001-12-10 : 01:08:21
|
HiThe easiest way would be to add this after your insert :Select @@Rowcount as HowManyRows or something, which will actually return a single field recordset. It would be faster though, to use an output parameter and select @@Rowcount into that.How are you with ADO parameters ?Damian |
|
|
batgrrrl
Starting Member
8 Posts |
Posted - 2001-12-10 : 01:11:07
|
Thanks Merkin!! :)Im mediocre with ADO :)I should be able to work it all out!Thanks again |
|
|
|
|
|