Re: [SQL] column names with - and (

2008-08-01 Thread maria s
-- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *maria s *Sent:* Tuesday, July 29, 2008 12:07 PM *To:* Osvaldo Rosario Kussama; pgsql-sql@postgresql.org; Pavel Stehule; Ivan Sergio Borgonovo *Subject:* [SQL] column names with - and ( Hi All

[SQL] column names with - and (

2008-07-29 Thread maria s
Hi All, When I am fetching the data from a table, I am giving the column names with - and ( and ) like IL-a, IL-a(p30) etc.. select x1 as IL-a, x2 as IL-a(p30) from abc But I am getting ERROR: syntax error at or near - and also t ( , ) Can anyone help me to fix this? Thank you, Maria

Re: [SQL] column names with - and (

2008-07-29 Thread maria s
bracket are illegal as identifier names http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS Best, Oliveiros - Original Message - *From:* maria s [EMAIL PROTECTED] *To:* Osvaldo Rosario Kussama [EMAIL PROTECTED] ; pgsql-sql@postgresql.org ; Pavel

Re: [SQL] column names with - and (

2008-07-29 Thread maria s
, Oliveiros - Original Message - *From:* Oliveiros Cristina [EMAIL PROTECTED] *To:* maria s [EMAIL PROTECTED] ; Osvaldo Rosario Kussama[EMAIL PROTECTED]; pgsql-sql@postgresql.org ; Pavel Stehule [EMAIL PROTECTED] ; Ivan Sergio Borgonovo [EMAIL PROTECTED] *Sent:* Tuesday, July 29

[SQL] Accessing array datatype

2008-07-28 Thread maria s
Hi All, I have an array column in a table. How can I fetch the elements separately( ie, select arr[1],arr[2]...arr[n]) as a column, when I don't know how many elements are there in the array? Thanks for your help. Maria

Re: [SQL] Accessing array datatype

2008-07-28 Thread maria s
with more knowledge than me might be able to quickly help you ;-) Best, Oliveiros - Original Message - *From:* maria s [EMAIL PROTECTED] *To:* Oliveiros Cristina [EMAIL PROTECTED] *Sent:* Monday, July 28, 2008 6:03 PM *Subject:* Re: [SQL] Accessing array datatype Hi Oliveiros, Thank

Re: [SQL] help in writing query

2008-06-10 Thread maria s
JOIN sample_properties p ON i.id = p.id maybe Pavel 2008/6/10 maria s [EMAIL PROTECTED]: Hello friends, I need help in write a query. I have 2 tables, one is sample_info and sample_properties, sample_info (id integer, string name) -- 1

Re: [SQL] help in writing query

2008-06-10 Thread maria s
Hi Rosario, Thanks for the link. I hope this will solve my problem. Thanks, Maria On Tue, Jun 10, 2008 at 11:34 AM, Osvaldo Rosario Kussama [EMAIL PROTECTED] wrote: maria s escreveu: I tried the query and it is returning result as , for a single entry in sample info in separate rows

Re: [SQL] help in writing query

2008-06-10 Thread maria s
Hi Scott, Thanks for the information. This is very useful for me. I will be careful when forming the column. Thanks, -maria On Tue, Jun 10, 2008 at 3:16 PM, Scott Marlowe [EMAIL PROTECTED] wrote: On Tue, Jun 10, 2008 at 11:51 AM, maria s [EMAIL PROTECTED] wrote: Hi Rosario, Thanks

Re: [SQL] function returning result set of varying column

2008-06-03 Thread maria s
to define the output fields when querying your function, like select * from myfunction() as (field1 integer, field2 text, ...) maria s [EMAIL PROTECTED] 2008-06-02 22:40 Hi friends, I am very new to plsql. I have to write a function that quries few tables and returns a resultset

Re: [SQL] function returning result set of varying column

2008-06-03 Thread maria s
I don't know the number of columns that I am going to get. Is it possible to write a function that returns this kind of result? Please help. Thanks, maria On Tue, Jun 3, 2008 at 9:28 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Tue, 3 Jun 2008 09:01:02 -0400 maria s [EMAIL PROTECTED

Re: [SQL] function returning result set of varying column

2008-06-03 Thread maria s
Borgonovo [EMAIL PROTECTED] wrote: On Tue, 3 Jun 2008 09:41:27 -0400 maria s [EMAIL PROTECTED] wrote: Thanks for all your replies. Actually I don't know the number of columns that I am going to return. I have 2 tables. For a single entry E1 in one table(t1), I have to fetch all

Re: [SQL] function returning result set of varying column

2008-06-03 Thread maria s
of [][] that fetches propert_type and value array? select * from myfunction() as (field1 text, field2 text[][]) Thanks a lot for your help, Maria On Tue, Jun 3, 2008 at 10:13 AM, Pavel Stehule [EMAIL PROTECTED] wrote: 2008/6/3 maria s [EMAIL PROTECTED]: Hi Ivan, If I have to know the column

[SQL] function returning result set of varying column

2008-06-02 Thread maria s
Hi friends, I am very new to plsql. I have to write a function that quries few tables and returns a resultset of varying column. In that case I cannot predefine the table with column. If I use RETURNS SETOF then I should know the number of columns and its type?! Is there anyway to return a