pagin Matt H: I got a MS Sql question hit me up on AIM when you get this..
Trending Topics
#8
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
Do you need the output in SQL or are you using a front-end like ASP or .NET?
I can send you the code to do it in the ASP page using the recordset object...I'd have to look it up to do it in SQL. There is probably a system SP in Master that will give you that information.
Let me know.
I can send you the code to do it in the ASP page using the recordset object...I'd have to look it up to do it in SQL. There is probably a system SP in Master that will give you that information.
Let me know.
#9
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
is there any way to get the last inserted row? for example, if i do 'INSERT (fieldname) VALUES ('values')' how would i get the id number that corresponds to that field?
i found 'SELECT @@IDENTITY' on the internet, but it doesn't seem to be working.
i found 'SELECT @@IDENTITY' on the internet, but it doesn't seem to be working.
#10
![Default](https://www.audiworld.com/forums/images/icons/icon1.gif)
--Assuming you are using in integer field for your PK and that your number increases w/ each entry....
Set NoCount ON
INSERT into tb_table (fieldName) values (@fieldvalue)
Set NoCount OFF
Select Max(PK_field) from tb_table
is that what you are trying to do?
Set NoCount ON
INSERT into tb_table (fieldName) values (@fieldvalue)
Set NoCount OFF
Select Max(PK_field) from tb_table
is that what you are trying to do?
Thread
Thread Starter
Forum
Replies
Last Post
YS4
S4 / RS4 (B5 Platform) Discussion
4
12-17-2002 08:57 AM