how to concatenate in PostgreSQL

From: Rehan Saleem <pk_rehan(at)yahoo(dot)com>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: how to concatenate in PostgreSQL
Date: 2012-03-24 11:43:59
Message-ID: 1332589439.54415.YahooMailNeo@web121601.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Kretschmer 2012-03-24 11:57:14 Re: how to concatenate in PostgreSQL
Previous Message Tim Landscheidt 2012-03-23 22:25:48 Re: Can I read the data without commit