RE: Dynamic select query

2002-12-18 Thread Naveen Nahata
THIS WILL WORK and shud be more efficient than instr() or 'select from dual' SELECT * FROM shipment WHERE ship_name like '%' || ship_id || '%'; Regards Naveen -Original Message- Sent: Tuesday, December 17, 2002 6:44 PM To: Multiple recipients of list ORACLE-L Another way to perform the

RE: Dynamic select query

2002-12-17 Thread Jared . Still
ROTECTED]> cc: Subject:RE: Dynamic select query I think using LIKE is faster. where ship_name like '%ABC%' Tom Mercadante Oracle Certified Professional -Original Message- Sent: Tuesday, December 17, 2002 6:45 AM To: Multiple recipients of lis

Re: Dynamic select query

2002-12-17 Thread Arup Nanda
Ranganath, You could use either SELECT * FROM TAB1 WHERE INSTR(SHIP_NAME, SHIP_ID) > 0 or SELECT * FROM TAB1 O FROM WHERE SHIP_NAME LIKE '%'||(SELECT SHIP_ID FROM TAB1 WHERE ROWID = O.ROWID)||'%' I did a test in my system; the INSTR approach was far better than the LIKE one. n the latter the res

RE: Dynamic select query

2002-12-17 Thread Charu Joshi
Another way to perform the same task: select * from shipment a where ship_name like (select '%' || a.ship_id || '%' from dual); I wonder how efficient this is compared to using the INSTR() function. Regards, Charu -Original Message- Kevin Sent: Tuesday, December 17, 2002 12:45 PM To: Mu

RE: Dynamic select query

2002-12-17 Thread Mercadante, Thomas F
I think using LIKE is faster. where ship_name like '%ABC%' Tom Mercadante Oracle Certified Professional -Original Message- Sent: Tuesday, December 17, 2002 6:45 AM To: Multiple recipients of list ORACLE-L Ranganath, You can use instr(ship_name, ship_id) > 0 Cheers, Neil. -Origi

Re: Dynamic select query

2002-12-17 Thread JayK
Hi Kris, You can do that using the following query : select ship_id,ship_name from shipment where ship_name in (select ship_name from test where instr(ship_name,ship_id)>1); Best Regards Jai "Krishnaswamy, Ranganath" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 12/17/02 04:08 PM Please

RE: Dynamic select query

2002-12-17 Thread Thomas, Kevin
Try: SQL> SELECT * 2FROM shipment 3 WHERE ship_name LIKE '%ABC%'; SHI SHIP_NAME --- -- ABC 1ABC123 DEF ABC1234 GHI 1234ABC K. -Original Message- [mailto:[EMAIL PROTECTED]] Sent: 17 December 2002 10:39 To: Multiple recipients of list ORACLE-L Hi all, I have a

RE: Dynamic select query

2002-12-17 Thread McBain, Neil SITI-ITDSEL314
Ranganath, You can use instr(ship_name, ship_id) > 0 Cheers, Neil. -Original Message- [mailto:[EMAIL PROTECTED]] Sent: 17 December 2002 10:39 To: Multiple recipients of list ORACLE-L Hi all, I have a table by name shipment with two columns say ship_id and ship_name and data as

RE: Dynamic select query

2002-12-17 Thread Charu Joshi
I believe INSTR() function will help here. Good luck, Charu -Original Message- Krishnaswamy, Ranganath Sent: Tuesday, December 17, 2002 11:05 AM To: Multiple recipients of list ORACLE-L Hi all, I have a table by name shipment with two columns say ship_id and ship_name and data a

RE: Dynamic select query

2002-12-17 Thread Ofer Harel
You should use the INSTR function INSTR(string,substring,[position],[occurrence]) INSTR searches string for substring. position is an integer indicating the character of string where Oracle begins the search. If position is negative, Oracle counts and searches backward from the end of string. o