Home Forums SQL Server 2008 SQL Server Newbies How make procedure of below requirement in sql server 2000? RE: How make procedure of below requirement in sql server 2000?

  • It isn't clear if you are working with SQL Server 2000 or SQL Server 2008. I'm not sure if IDENT_CURRENT function existed in SQL Server 2000 and I can't check it right now. In any case if you are using it, the function needs the table's name as an input. In your example the table's name is onward_journey but in your code you are using a different name as parameter. If you don't get null it could be because you have another table with that name and identity column. Another error that you have is that you compare the value of the column request_id to the value that the function returns, but in the table definition the identity column is called onwad_id.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/