Re: [SQL] populate value of column

2007-08-07 Thread novice
Thank you :-)) That's so quick! Apologies for the error on my DDL statement On 08/08/07, Phillip Smith <[EMAIL PROTECTED]> wrote: > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of novice > Sent: Wednesday, 8 August 2007 15:31 > To: pgsql-sql@postgres

Re: [SQL] populate value of column

2007-08-07 Thread Michael Glaesemann
On Aug 8, 2007, at 0:30 , novice wrote: CREATE TABLE meter ( meter_id integer NOT NULL, area_no integer NOT NULL, CONSTRAINT meter_pkey PRIMARY KEY (meter_id) ) ; INSERT INTO meter(meter_id, no_of_bays) VALUES (1001, 4); INSERT INTO meter(meter_id, no_of_bays) VALUES (1012, 6); Your in

Re: [SQL] populate value of column

2007-08-07 Thread Phillip Smith
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of novice Sent: Wednesday, 8 August 2007 15:31 To: pgsql-sql@postgresql.org Subject: [SQL] populate value of column > How can I generate the following result? > > meter_id | bay > --+ >

[SQL] populate value of column

2007-08-07 Thread novice
I have a table CREATE TABLE meter ( meter_id integer NOT NULL, area_no integer NOT NULL, CONSTRAINT meter_pkey PRIMARY KEY (meter_id) ) ; INSERT INTO meter(meter_id, no_of_bays) VALUES (1001, 4); INSERT INTO meter(meter_id, no_of_bays) VALUES (1012, 6); select meter_id, area_no from meter;

Re: [SQL] Restricting columns by users

2007-08-07 Thread Andrej Ricnik-Bay
On 8/8/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: > Exist something like it for postgresql? I thought that's what views are for > Thanks Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm --

Re: [SQL] Using function like where clause

2007-08-07 Thread Ragnar
On mán, 2007-08-06 at 16:44 -0300, Ranieri Mazili wrote: > 1) Can I use a function that will return a string in a where clause like > bellow? > > select * > from table > where my_function_making_where() > and another_field = 'another_think' you could have your function return a boolean

Re: [SQL] Range of caracters

2007-08-07 Thread Ragnar
On þri, 2007-08-07 at 10:07 -0700, Wilton Wonrath wrote: > Data Table > > Inicial - Final > 9C2HB02107R008000 9C2HB02107R008200 > > FAIXA1FAIXA100 > > I´m doing the followin

Re: [SQL] Adding NOT NULL columns in PostgreSQL 7.4?

2007-08-07 Thread Michael Glaesemann
On Aug 7, 2007, at 11:54 , Michael Eshom wrote: I'm currently using PostgreSQL 7.4.17, and trying to add a NOT NULL column results in an error about "Adding NOT NULL columns is not implemented". The only reports of this error I can find online relate to PostgreSQL 7.2, and further state th

[SQL] Adding NOT NULL columns in PostgreSQL 7.4?

2007-08-07 Thread Michael Eshom
I'm currently using PostgreSQL 7.4.17, and trying to add a NOT NULL column results in an error about "Adding NOT NULL columns is not implemented". The only reports of this error I can find online relate to PostgreSQL 7.2, and further state that it was supposed to be implemented in PostgreSQL 7.

[SQL] Range of caracters

2007-08-07 Thread Wilton Wonrath
Hello, I have a doubt about a query using a range of caracters. Example: Data Table Inicial - Final 9C2HB02107R008000 9C2HB02107R008200 FAIXA1FAIXA100 I´m doing the

[SQL] Restricting columns by users

2007-08-07 Thread Ranieri Mazili
Hello, I'm looking for a method to restrict columns by users on postgresql, searching in google I found what I want, but in mysql, below I reproduce the paragraph that shows what I exactly want: "MySQL can also restrict access on the table level and even on the column level. What this means i