View previous topic :: View next topic
|
Author |
Message |
Permander Malik
New User
Joined: 24 Oct 2009 Posts: 11 Location: Mumbai
|
|
|
|
Hi All,
I want to use GROUP BY clause on VARCHAR variable. Can anyone please let me know how we can use that? |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
PeterHolland
Global Moderator
![](images/avatars/934852604c85d4f6c039e.jpg)
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
Permander Malik
New User
Joined: 24 Oct 2009 Posts: 11 Location: Mumbai
|
|
|
|
On the above link I did not find the same. Can anyone help me out. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
enrico-sorichetti
Superior Member
![](images/avatars/4808653364f47e7764b842.jpg)
Joined: 14 Mar 2007 Posts: 10879 Location: italy
|
|
|
|
I do not see any reaso from a conceptual point of view to treat
a varchar column differently from a <normal> column
what did You find to make You believe You need special processing? |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
Permander Malik
New User
Joined: 24 Oct 2009 Posts: 11 Location: Mumbai
|
|
|
|
Its not returning any result for me in DB2 query. Any idea how we can get through ? |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
dbzTHEdinosauer
Global Moderator
![](images/avatars/6098083885091561a14db9.gif)
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
your second where clause condition is causing the no-result condition |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
bhairon singh rathore
New User
![](images/avatars/3598083534adda4441fc37.jpg)
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
Can you provide us with the query which you are working on |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
enrico-sorichetti
Superior Member
![](images/avatars/4808653364f47e7764b842.jpg)
Joined: 14 Mar 2007 Posts: 10879 Location: italy
|
|
|
|
Quote: |
Can you provide us with the query which you are working on |
why do You insist in trying to make things easy for people willing to help ![icon_biggrin.gif](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
dbzTHEdinosauer
Global Moderator
![](images/avatars/6098083885091561a14db9.gif)
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Permander Malik wrote: |
Its not returning any result for me in DB2 query. |
and you are blaming this on the GROUP BY statement?
you need to correct your WHERE clause. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
Funny, I get the same question here from an analist of a project that we outsourced to India. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
explaining the problem :
It is not that he is getting sqlcode +100, He's having a time out because of the performance that grouping on a varchar(6000) can cause. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
dbzTHEdinosauer
Global Moderator
![](images/avatars/6098083885091561a14db9.gif)
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
GuyC,
well, how come you guys outsource the easy stuff? |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
dbzTHEdinosauer wrote: |
GuyC,
well, how come you guys outsource the easy stuff? |
Well, because we're to busy with the difficult stuff |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
|