View previous topic :: View next topic
|
Author |
Message |
toughmetals
New User
Joined: 10 Jan 2006 Posts: 14 Location: India
|
|
|
|
Hi People,
I'm running a SQL in sql server for getting some records on the basis of a pattern.
Query - select * from <table> where Name like '%CLOSED%'
When I'm trying to get the exactly same thing in DB2 its not working.
Thanks in advance for alternative solution or else correcting me.
Deeps |
|
Back to top |
|
|
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
WHAT IS THE ERROR U GET? |
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Hi toughmetals,
I am mentioning you the correct form of your query. Please change ur query and it will work. The query will bw like -
select * from <System_name>.<table_name>
where STRM_NM like '%RVD%'
Here STRM_NM is character attribute. U should use like command for only the char attributes. It will not work if you want to use it with some integer or float attributes. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
amitava wrote.
Quote: |
Here STRM_NM is character attribute. U should use like command for only the char attributes. It will not work if you want to use it with some integer or float attributes. |
I assume NAME as a character field only... its difficult to proceed without looking at SQL CODE & Error Message...
Regards,
Priyesh. |
|
Back to top |
|
|
|