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
Did you try creating a view with that select statement, then just selecting from the view? I don't know if there is a restriction on using a function like that in a view definition or not. -DAP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Fitzp