declare variable in postgresql
declare variable in postgresql
От:
Jignesh Ramavat <ramavat.jignesh@gmail.com>
Дата:
Hello,
need help,
Declare @TypeTransactionID As int";
Select @TypeTransactionID=ID from TypeTransaction Where TypeTransactionCode = 'TxnBackupInc' ";
these is in sqlserver. If i want to do same in postgresql then ???
--
Thanks & Regards,
Jignesh Ramavat
Software Engineer
need help,
Declare @TypeTransactionID As int";
Select @TypeTransactionID=ID from TypeTransaction Where TypeTransactionCode = 'TxnBackupInc' ";
these is in sqlserver. If i want to do same in postgresql then ???
--
Thanks & Regards,
Jignesh Ramavat
Software Engineer
Re: declare variable in postgresql
От:
Pavel Stehule <pavel.stehule@gmail.com>
Дата:
Hello 2011/6/24 Jignesh Ramavat : > Hello, > > need help, > > Declare @TypeTransactionID As int"; > > Select @TypeTransactionID=ID from TypeTransaction Where TypeTransactionCode > = 'TxnBackupInc' "; > > these is in sqlserver. If i want to do same in postgresql then ??? > you can't do it - PostgreSQL does not support session variables Regards Pavel Stehule > -- > Thanks & Regards, > Jignesh Ramavat > Software Engineer >
Re: declare variable in postgresql
От:
Merlin Moncure <mmoncure@gmail.com>
Дата:
On Fri, Jun 24, 2011 at 3:41 AM, Jignesh Ramavat wrote: > Hello, > > need help, > > Declare @TypeTransactionID As int"; > > Select @TypeTransactionID=ID from TypeTransaction Where TypeTransactionCode > = 'TxnBackupInc' "; > > these is in sqlserver. If i want to do same in postgresql then ??? http://www.postgresql.org/docs/9.0/static/plpgsql.html http://www.postgresql.org/docs/9.0/static/plpgsql-declarations.html#PLPGSQL-DECLARATION-PARAMETERS merlin
Re: declare variable in postgresql
От:
Brar Piening <brar@gmx.de>
Дата:
On Fri, 24 Jun 2011 10:16:52 -0500, Merlin Moncure wrote: > http://www.postgresql.org/docs/9.0/static/plpgsql.html > http://www.postgresql.org/docs/9.0/static/plpgsql-declarations.html#PLPGSQL-DECLARATION-PARAMETERS Plus http://www.postgresql.org/docs/current/static/sql-do.html if want it the non procedural TSQL way... Regards, Brar