select into

Поиск
Список
Период
Сортировка
От Mulham freshcode
Тема select into
Дата
Msg-id 20061122082816.26958.qmail@web90504.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: select into
Re: select into
Re: select into
Список 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 по дате отправления:

Предыдущее
От: "Aaron Bono"
Дата:
Сообщение: Re: "Copy from" omit source columns?
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: select into