Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Please help with tricky SQL statement....

Please help with tricky SQL statement....

From: <sjudkins_at_christyind.com>
Date: 1998/02/24
Message-ID: <6cv01b$rms$1@nnrp1.dejanews.com>#1/1

I am trying to build a SELECT statement that will select records from an "appointment" table. The appointment table looks like this:

DATE     DATE/TIME
TEXT     VARCHAR2

APPTIDS VARCHAR2 APPTIDS contains a comma-seperated list of the user IDs that is involved in the meeting. Example: '1,5,6'. I need a SELECT statement that will return only those rows that contain the ID of the current user (in the APPTIDS field) but, it can also contain the ID of other users).

I need something like:

"SELECT * FROM APPT WHERE #USERID# IN (IDS)" This returns rows that ONLY have the USERID in the APPTIDS field...instead of ones that contain the USERID AND other USERID's.

Thanks for any help!
Shayne

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Tue Feb 24 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US