Simple question - but my brain is not working:
This is my table
Column | Type |
Modifiers
-----------+------------------------+-----------------------------------------------------------------id |
integer | not null default
nextval('emr_clinicschedule_id_seq'::regclass)clinic_id | integer | not nulldate | date
|day | smallint |status | boolean | not nullopen | time without time
zone|close | time without time zone |reason | character varying(64) |active | boolean | not
null
I want to find any value:
SELECT id FROM schedule WHERE clinic_id = '%s' AND date = '%s'
But I want to make sure the clinic exist first then find if the date
exist 2nd.
How do I do that?
Thanks in advance,
J