Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
wisdomtree2009
Starting Member
5 Posts |
Posted - 2008-12-25 : 03:04:29
|
| Hi Can any one tell me whats the mistake i am doing in this piece of SQL . I have tried quite a few times to make it error free but still it is thorwing error 'Not a group by clause'select count(s1.prod_line_desc),s1.grp_channel_nm from (select t3.prod_line_desc,t1.grp_channel_nm ,t2.prod_keyfrom machine_analysis_fct t2inner joinprod_dim t3ont3.prod_key = t2.prod_keyinner joingrp_channel_dim t1ont1.grp_channel_key=t2.grp_channel_keygroup by t1.grp_channel_nm) s1 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2008-12-25 : 03:29:55
|
| select count(s1.prod_line_desc),s1.grp_channel_nm from (select t3.prod_line_desc,t1.grp_channel_nm ,t2.prod_keyfrom machine_analysis_fct t2inner joinprod_dim t3ont3.prod_key = t2.prod_keyinner joingrp_channel_dim t1ont1.grp_channel_key=t2.grp_channel_keygroup by t1.grp_channel_nm) s1group by s1.grp_channel_nm |
 |
|
|
xpandre
Posting Yak Master
212 Posts |
Posted - 2008-12-25 : 03:30:12
|
| I think it should be..select count(s1.prod_line_desc),s1.grp_channel_nm from (select t3.prod_line_desc,t1.grp_channel_nm ,t2.prod_keyfrom machine_analysis_fct t2inner joinprod_dim t3ont3.prod_key = t2.prod_keyinner joingrp_channel_dim t1ont1.grp_channel_key=t2.grp_channel_key) s1group by s1.grp_channel_nm |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2008-12-25 : 03:43:23
|
ohhh xpandre by a minute......... |
 |
|
|
|
|
|