View previous topic :: View next topic
|
Author |
Message |
muthupandi.
New User
Joined: 24 Jul 2012 Posts: 5 Location: india
|
|
|
|
data thatis in table
01
02
03
04
05
06
07
08
09
10
11
12
i want the ou[put like:
01,02,03,04,05,06,07,08,09,10,11,12
how to format using the query
plz help me |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
not that it is any faster but this also works :
Code: |
where translate(substr(col1,1,1),'','ABCDEFGHIJKLMNOPQRSTUVWXYZ') = ''
and translate(substr(col1,2,4),'','0123456789') = '' |
and you could add following to limit the tablescan (if an index exists)
Code: |
and col1 between 'A' and 'Z' |
about omitting the criteria in your select, and test it in your program :
A lot more rows will have to be transported from DB2 to your program =
A lot more fetches will need to be done =
more cpu |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
Hi Muthupandi,
Don't reuse old posts, but open a new topic, and provide all neccessary information on your SQL query including what you have tried yourself. Remember, this is not a please do my homework for me forum, but a forum for help when people get stuck in a problem.
Dick or any moderator, please lock this thread. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
muthupandi.
This is also a duplicate of one in the DFSORT forum. Please one topic for one question. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Are you looking for a database solution or a sort solution?
The answer is not "both". . . |
|
Back to top |
|
|
|