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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Code to exclude records in a crosstab

Author  Topic 

pickslides
Starting Member

7 Posts

Posted - 2014-06-20 : 00:27:52
Using MS ACCESS I have:

TRANSFORM Avg(SAP_CALD.[CASE_DAYS]) AS AvgOfCASE_DAYS
SELECT SAP_CALD.[OPN_YEAR], SAP_CALD.[CLD_MONTH], Avg(SAP_CALD.[CASE_DAYS]) AS [Total Of CASE_DAYS]
FROM SAP_CALD
GROUP BY SAP_CALD.[OPN_YEAR], SAP_CALD.[CLD_MONTH]
PIVOT SAP_CALD.[Model];


which works fine.

I want to look at the query SAP_CALD and disclude any record in the field 'department' that has a record of any {DPSG, System, Dealer, DealerIT, Inbound}

I can do this by piggybacking a another query that removes these but wondered if it would be easier to exclude them in the crosstab code.

Thanks, MQ..



Be who you are and say what you feel,
because those who mind don't matter
and those who matter don't mind.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-06-21 : 05:05:19
Looks like what you're after is MS Access query? That being case you may be better off posting this in Access forum



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -