Re: [GENERAL] SELECT based on function result

2004-07-18 Thread Edmund Bacon
Robert Fitzpatrick wrote: > I have a function that tells me if a record is positive and negative > based on several field values. I use it in select statements: > > ohc=> SELECT sample_id, is_wipe_positive(tblleadwipe.sample_id) AS > positive FROM tblleadwipe WHERE hud_building_id IS NOT NULL; >

Re: [GENERAL] SELECT based on function result

2004-07-15 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > SELECT sample_id, is_wipe_positive(tblleadwipe.sample_id) AS > positive FROM tblleadwipe WHERE hud_building_id IS NOT NULL; > I see that I cannot change my WHERE statement to WHERE positive = 't' > because the column positive does not exist. What h

Re: [GENERAL] SELECT based on function result

2004-07-15 Thread David Parker
obert Fitzpatrick Sent: Thursday, July 15, 2004 4:31 PM To: PostgreSQL Subject: [GENERAL] SELECT based on function result I have a function that tells me if a record is positive and negative based on several field values. I use it in select statements: ohc=> SELECT sample_id, is_wipe_

[GENERAL] SELECT based on function result

2004-07-15 Thread Robert Fitzpatrick
I have a function that tells me if a record is positive and negative based on several field values. I use it in select statements: ohc=> SELECT sample_id, is_wipe_positive(tblleadwipe.sample_id) AS positive FROM tblleadwipe WHERE hud_building_id IS NOT NULL; sample_id | positive ---+-