View previous topic :: View next topic
|
Author |
Message |
vijayakumar.yellala
New User
Joined: 19 Apr 2006 Posts: 63 Location: Chennai
|
|
|
|
Hi,
i need to compare part of the string with another string.
Select *
From <table name>
where a_b_c(12:6) = x_y_z;
,,,,
Length of the a_b_c is 17 bytes, I need to compare with last 6 byes. Please let me know how to represent a_b_c(12:6).
Thanks in Advance.
Regards
Vijay |
|
Back to top |
|
|
ssmukul
New User
Joined: 22 Jan 2008 Posts: 19 Location: India
|
|
|
|
Hi Vijay,
You can use SUBSTR for this.
Code: |
SELECT *
FROM <TABLE>
WHERE
SUBSTR(A_B_C,12,6) = X_Y_Z; |
Thanks, |
|
Back to top |
|
|
vijayakumar.yellala
New User
Joined: 19 Apr 2006 Posts: 63 Location: Chennai
|
|
|
|
Thanks for response.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Just keep in mind that this kind of query has the potential to dim all of the lights in the computer room. . .
If this is some one-time requirement or something that only runs sedom in batch, the impact may not be much, but if the table is high-volume and this query is often needed in online processing - there be monsters. . .
Suggest this process be run against full-volume data to make sure it runs acceptably with minimum impact to the rest of the system.
If the table has only 100 rows, it may not be important if the table contains 100 million rows, this will be an entirely different matter. |
|
Back to top |
|
|
|