I am using MS Query to import data from MSSQL 2000 into a Excel 2003 spreadsheet that I am going to use in a Pivot Table. The problem I am having is that in order to pull the data that I need, I have to use a few aliases that do not come over in the data import process.
The problem could be that, since I am better versed in SQL then Excel and I am having SQL do the work that the Pivot Table should be doing. Not sure.
I know this is not a SQL forum but I think my issues is with Excel.
Just in case here is the SQL Statement
Can someone point me in the right direction about how to handle this that would be great. If I am posting in the incorrect fourm also let me know.
Thanks
Jake
The problem could be that, since I am better versed in SQL then Excel and I am having SQL do the work that the Pivot Table should be doing. Not sure.
I know this is not a SQL forum but I think my issues is with Excel.
Just in case here is the SQL Statement
Code:
select
sum(o.tot_tax_amt) as Total,
month(convert(varchar(8),o.ord_dt,121)) as Mnth ,
Left(sp.slspsn_no,1) as location,
sp.slspsn_no,
sp.slspsn_name as SalesPerson
from
qms.dbo.oeordhdr o left join macdata.dbo.ARslmfil_sql sp on o.slspsn_no = sp.slspsn_no
where
releasetoaccount = 1 or macola = 1 and year(convert(varchar(8),o.ord_dt,121)) in (year(getDate()))
group by Left(sp.slspsn_no,1),
sp.slspsn_no,
month(convert(varchar(8),o.ord_dt,121)),
sp.slspsn_name
order by
sp.slspsn_no asc
Can someone point me in the right direction about how to handle this that would be great. If I am posting in the incorrect fourm also let me know.
Thanks
Jake