pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
View question
2+ messages / 2 participants
[nested] [flat]

* View question
@ 2001-11-28 14:07  Glenn MacGregor <gtm@oracom.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Glenn MacGregor @ 2001-11-28 14:07 UTC (permalink / raw)
  To: pgsql-sql

Hi All,

Thanks Josh for the help on the last question.  Is there a way to create a view so I can insert parameters?
The docs have the example:

create view kinds as select * from movies where type = 'Comedy';

select * from kinds;

What if I want a view where the type is a variable?  Is there a way to pass data along?

    Thanks

        Glenn

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: View question
@ 2001-11-28 15:38  James Orr <james@lrgmail.com>
  parent: Glenn MacGregor <gtm@oracom.com>
  0 siblings, 0 replies; 2+ messages in thread

From: James Orr @ 2001-11-28 15:38 UTC (permalink / raw)
  To: Glenn MacGregor <gtm@oracom.com>; pgsql-sql

Hi Glenn,

Just make the column "type" part of the view.  Then use a WHERE when you
select from the view.

- James

----- Original Message -----
From: "Glenn MacGregor" <gtm@oracom.com>
To: <pgsql-sql@postgresql.org>
Sent: Wednesday, November 28, 2001 9:07 AM
Subject: [SQL] View question


Hi All,

Thanks Josh for the help on the last question.  Is there a way to create a
view so I can insert parameters?
The docs have the example:

create view kinds as select * from movies where type = 'Comedy';

select * from kinds;

What if I want a view where the type is a variable?  Is there a way to pass
data along?

    Thanks

        Glenn





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-11-28 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-28 14:07 View question Glenn MacGregor <gtm@oracom.com>
2001-11-28 15:38 ` James Orr <james@lrgmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox