Convert SQL Server stored procedure to Postgres
Posted on 2007-04-07
I would like to convert a Microsoft SQL Sever 2000 stored procedure to a postgres procedure.
The procedure inserts a null value in the Description field in the Client table, then returns the auto incrementing integer field ID.
Here's the stored procedure:
CREATE PROCEDURE GetNextClientID
@ID int OUTPUT
SET NOCOUNT ON
INSERT INTO Audio ("Description")
SELECT @ID = @@IDENTITY
If it's possible to input the table name and field name to enter the null value that would be fantastic, though if too hard don't worry aboutn it.
Please add your solution!