Re: [SQL] how to concatenate in PostgreSQL

2012-03-27 Thread Steve Crawford
, March 26, 2012 9:08 PM *Subject:* Re: [SQL] how to concatenate in PostgreSQL On 03/24/2012 04:43 AM, Rehan Saleem wrote: hi , how can we concatinate these lines and execute sql command In what? Psql? A PL/pgSQL function. C/Java/PHP/Python/Perl/Erlang/Lua? setsql = 'select user,use

Re: [SQL] how to concatenate in PostgreSQL

2012-03-26 Thread Steve Crawford
On 03/24/2012 04:43 AM, Rehan Saleem wrote: hi , how can we concatinate these lines and execute sql command In what? Psql? A PL/pgSQL function. C/Java/PHP/Python/Perl/Erlang/Lua? setsql = 'select user,username, firstname ' set sql += ' lastname, cardno from table1 where userid=' +

Re: [SQL] how to concatenate in PostgreSQL

2012-03-26 Thread Robins Tharakan
Hi, Probably you're looking for these set of articles. http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#Microsoft_SQL_Server The second article (by Ethan) has good small hints for things such as the query that you ask in this thread, when migrating from MSSQL to P

Re: [SQL] how to concatenate in PostgreSQL

2012-03-24 Thread Allan Kamau
On 3/24/12, Andreas Kretschmer wrote: > Rehan Saleem wrote: > >> hi , >> how can we concatinate these lines and execute sql command >> >>set sql = 'select user,username, firstname ' >> set sql += ' lastname, cardno from table1 where userid=' + 5 > > sql = sql || ' bla fasel'; > > ||

Re: [SQL] how to concatenate in PostgreSQL

2012-03-24 Thread Andreas Kretschmer
Rehan Saleem wrote: > hi , > how can we concatinate these lines and execute sql command > >set sql = 'select user,username, firstname ' > set sql += ' lastname, cardno from table1 where userid=' + 5 sql = sql || ' bla fasel'; || is the concat - Operator. Andreas -- Really, I

[SQL] how to concatenate in PostgreSQL

2012-03-24 Thread Rehan Saleem
hi , how can we concatinate these lines and execute sql command          setsql ='select user,username, firstname '   set sql +=' lastname, cardno from table1where userid='+ 5   exec(sqi)      where 5 is the userid from table1 thanks