Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 selected non-aggregate values error
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dipesh.ccsu
Starting Member

USA
7 Posts

Posted - 04/26/2013 :  11:30:17  Show Profile  Reply with Quote
BELOW IS MY SQL. Not sure why i am getting the error(selected non-aggregate values must be part of the associated group ERROR) but i believe it is in my where clauses. Can anyone help.


CREATE TABLEuser_tbls.DD2_97_HI AS (


SELECT DA.CHNGE_DT,
DA.Acct_No,
DA.SB,
DA.PR,
DA.PRD,
DA.BIL,
DA.BILL_SU,
DA.PR,
DA.PRD_GRP,
DA.PRD_FA,
DA.NATRL_AC,
DA.Balance_T,
SUM(DA.Total_Ac) AS Total_Activations,
SUM(DA.De) AS Deactivations,
SUM(DA.U) AS Upgrades,
SUM(DA.D) AS Downgrades,
SUM(DA.Si) AS Sidegrades,
SUM(DA.Mi) AS Migrations,
SUM(DA.M) AS Moves,
SUM(DA.Ne) AS Net_Miscellaneous,
SUM(DA.Net_Act) AS Net_Activations


FROM sort.SC_DAY_AY_V DA



WHERE (DA.CHNGE_DT, DA.Acct_No) IN (SELECT MIN(CHNGE_DT), ACCT_NO FROM finance_user_tbls.DDC582_976_NRC_CODES_ACT)

AND DA.Prd_Grp2_Type_Ds = 'HSI'
AND DA.Balance_To_Essbase = 'Y'


GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12
)

WITH DATA

PRIMARY INDEX (CHNGE_DT,SB, PRD)

Edited by - dipesh.ccsu on 04/26/2013 11:31:06

mmkrishna1919
Yak Posting Veteran

India
95 Posts

Posted - 04/26/2013 :  11:42:35  Show Profile  Reply with Quote
Hi dipesh,

Is this MS SQL SERVER query?



M.MURALI kRISHNA
Go to Top of Page

dipesh.ccsu
Starting Member

USA
7 Posts

Posted - 04/26/2013 :  11:44:45  Show Profile  Reply with Quote
quote:
Originally posted by mmkrishna1919

Hi dipesh,

Is this MS SQL SERVER query?



M.MURALI kRISHNA




Hey,

i m using teradata miner to do the coding.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000