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
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
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
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
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
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
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
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
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
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
10 matches
Mail list logo