View previous topic :: View next topic
|
Author |
Message |
Mahendran3784
New User
Joined: 04 May 2007 Posts: 20 Location: INDIA
|
|
|
|
Hi,
I have a column of size 8 bytes. I want to extract all the records with the 4th byte having specific values. For eg.
Table-1
Col-1
------
ABC1ABC1
AAA2AAA2
BEF1BCD1
ABED1YMK2
from the above sample table, i want to extract all the records having the value "2" in the 4th position of that column-1.
I can think of "_" but not sure how to use against a specific position, like 4th byte only.
Can some one please help me with the WHERE clause for this getting the above desired result?
Thanks in advance |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Suggest you read about substr in the SQL reference. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
And expect poor performance. . . |
|
Back to top |
|
|
mlp
New User
Joined: 23 Sep 2005 Posts: 91
|
|
|
|
If performance is your concern then take unload extract of table and simply sequentially read the file and look for the desired byte location to filter the records. |
|
Back to top |
|
|
|