SP Help | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SP Help

I am using a SP ‘X’ to display as such.. ItemNo Fund Account Amount Date
1 234 SBH 23435 09/23/06
2 653 IMS 53255 02/04/06
from a table which has columns like
DTid(IDENT),ItemNo,Account,Amount,Date. When I want to enter tha data from my application as shown above, I want the ItemNo to be generated by it self for continuation…like the next record shub be 3 for ItemNo.
Since ItemNo is not an auto generated number in my DB How can I get that in my application.
Here User has to enter just Fund,Account,Amount,Date and not the ItemNo, it shud be generated by itself. Thanks!
"He laughs best who laughs last"
You can set that column as identity
or you can set default for item column to be as DTid column.
So even if you dont enter value it will take value from dtid column which is identity column
I can set the column for IDENT but the sequence ofthe ItemNo depends on the field Fund. For each Fund there shud be diffrent sequences, like every Fund shud start with ItemNo=1 Thanks!
"He laughs best who laughs last"
]]>