Home » SQL & PL/SQL » SQL & PL/SQL » show all recs from where clause
show all recs from where clause [message #242363] Fri, 01 June 2007 12:23 Go to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

I am hoping this is an easy answer, I have a query that has a bind variable on the where clause, which changes results everytime a user changes this value, how can I show all values from the table. here is my code

SELECT
the_date,
the_name
FROM table_CALENDAR
WHERE site = :site
ORDER BY the_date


Re: show all recs from where clause [message #242364 is a reply to message #242363] Fri, 01 June 2007 12:24 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't with this query (unless you have only one site).

Regards
Michel
Re: show all recs from where clause [message #242371 is a reply to message #242363] Fri, 01 June 2007 12:36 Go to previous messageGo to next message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
SELECT
the_date,
the_name
FROM table_CALENDAR
WHERE (site = :site) or (:site is null)
ORDER BY the_date
Re: show all recs from where clause [message #242380 is a reply to message #242371] Fri, 01 June 2007 14:39 Go to previous message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

Thanks, this worked perfectly.
SELECT
the_date,
the_name
FROM table_CALENDAR
WHERE (site = :site) or (:site is null)
ORDER BY the_date
Previous Topic: ALTER TABLE and MODIFY COLUMN
Next Topic: Need help w/ cursors
Goto Forum:
  


Current Time: Wed Dec 07 22:26:41 CST 2016

Total time taken to generate the page: 0.09545 seconds