Re: [SQL] column names with - and (

2008-08-01 Thread maria s
2 as "IL-a(p30)" from abc > > should help. > > Igor > > > > -- > *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

Re: [SQL] column names with - and (

2008-07-29 Thread maria s
mislead you :p > > Best, > Oliveiros > > > > - Original Message - > *From:* Oliveiros Cristina <[EMAIL PROTECTED]> > *To:* maria s <[EMAIL PROTECTED]> ; Osvaldo Rosario Kussama<[EMAIL > PROTECTED]>; > pgsql-sql@postgresql.org ; Pavel Stehu

Re: [SQL] column names with - and (

2008-07-29 Thread maria s
e minus, open bracket and close 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]> >

[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] Accessing array datatype

2008-07-28 Thread maria s
don't send private replies, always include the mailing list > address > because someone with more knowledge than me might be able to quickly help > you ;-) > > Best, > Oliveiros > > > - Original Message - > *From:* maria s <[EMAIL PROTECTED]> > *To:* Oliv

[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] 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: > > H

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 en

Re: [SQL] help in writing query

2008-06-10 Thread maria s
FROM sample_info i > 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_

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

2008-06-03 Thread maria s
[][] 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]>:

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

2008-06-03 Thread maria s
ergio 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. &g

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

2008-06-03 Thread maria s
n. So 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

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

2008-06-03 Thread maria s
h. It just postpones defining the number and type of > the output fields until querying the function. > You will have to define the output fields when querying your function, like > select * from myfunction() as ("field1" integer, "field2" text, ...) > > >&g

[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 res