select into - Mailing list pgsql-sql

From Mulham freshcode
Subject select into
Date
Msg-id 20061122082816.26958.qmail@web90504.mail.mud.yahoo.com
Whole thread Raw
Responses Re: select into
Re: select into
Re: select into
List pgsql-sql
Hi guys,<br /><br />   Am new to sql scripting so this might be a stupid question. Am getting an error while trying to
dothe following<br />  <br />SELECT INTO svc_data_rec * from svc_tbl_name where 'uid' = sub_id;<br /><br />where
svc_data_recis defined as record and svc_tbl_name is a varchar that holds the name of a table  and sub_id is another
varchar.the error message is<br /><br />   ERROR:  syntax error at or near "$1" at character 17<br />   QUERY:  SELECT 
*from  $1  where 'uid' =  $2<br />   CONTEXT:  PL/pgSQL function "foo" line 132 at select into variables<br />   LINE
1:SELECT  * from  $1  where 'uid' =  $2<br /><br />   where am i going wrong? it seems that the variables are not being
substitutedwith their values correctly.<br /><br />   Thank you,<br /><br /><p><font color="666666"><font size="2"><hr
size="1"/>Sponsored Link</font></font><br /><br />Mortgage rates near 39yr lows. $420,000 Mortgage for $1,399/mo - <a
href="http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9132-16414&moid=4116">Calculatenew house payment</a> 

pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: "Copy from" omit source columns?
Next
From: "A. Kretschmer"
Date:
Subject: Re: select into