View previous topic :: View next topic
|
Author |
Message |
SriRanjan Currently Banned New User
Joined: 05 Sep 2006 Posts: 3
|
|
|
|
Hi All,
I have a column called 'Client_Name' with Char(50) in the DB2 table.
But this coloumn contains Low Values .So I want to find all the rows which contains Low Values in this column ... can u please help me out ???
Please find the attachment If u want example.
[/img] |
|
Back to top |
|
|
meetreks
New User
Joined: 28 Sep 2006 Posts: 26 Location: Edinburgh
|
|
|
|
Just check Client_Name = X'0000', either in SPUFI or in the Host Program.
Hope this helps. |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
chk this out ...
SELECT Client_name FROM TABLE
WHERE LENGTH (Client_name) > LENGTH (REPLACE(Client_name, X?00?,'') ; |
|
Back to top |
|
|
SriRanjan Currently Banned New User
Joined: 05 Sep 2006 Posts: 3
|
|
|
|
Thanks Guys for quick reply ...
tried both possible ways but Its not working. |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi sri ranjan,
Try for this what meetreks mentioned. This is working for me.
Select client_name from table name
where cline_name = x'00' |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi sriranjan,
Sorry, my field is of x(1) that is why it was working.
If you give x'00' for x(50) time then your query will work.
I am not sure there is a shortcut. |
|
Back to top |
|
|
norm.flynn
New User
Joined: 08 Jan 2013 Posts: 20 Location: usa
|
|
|
|
Here is a method which will work for looking for low values
select client_name from table
where client_name like X'6C006C'
The 6C is the hex equivalent of the '%' sign, This will return any rows with low values anywhere in the column |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I doubt that after 7 ( seven ) years SriRanjan might still be interested in the answer |
|
Back to top |
|
|
norm.flynn
New User
Joined: 08 Jan 2013 Posts: 20 Location: usa
|
|
|
|
had someone ask me about this, saw this post on the forum, so just wanted to post the solution to this issue as it is not well documented anywhere. |
|
Back to top |
|
|
feellikeneo
New User
Joined: 19 Mar 2007 Posts: 73 Location: Chennai
|
|
|
|
And this solution did help me after 3 years |
|
Back to top |
|
|
|