Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / May 2004

Tip: Looking for answers? Try searching our database.

How to Convert Access Transform/Pivot Query for SQL Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Law - 20 May 2004 13:10 GMT
I have two queries that I use in Access:

<qrySelect>
SELECT table2.column1, table2.column2, table2.column3, table1.column4 FROM
table1, table2 WHERE table1.column1 = table2.column1
</qrySelect>

<qryResult>
TRANSFORM First(qrySelect.column3) AS FirstOfCode
SELECT qrySelect.column1, qrySelect.column4, First(qrySelect.column3) AS
[Total Of Code] FROM qrySelect GROUP BY qrySelect.column1, qrySelect.column4
PIVOT qrySelect.column2
</qryResult>

I now wish to use them against a SQL Server database but I am unfamiliar
with the equivalent construct of Transform/Pivot in SQL Server. I read in
the MS documentation that I should use ROLLUP on the GROUP BY clause, but
try as I might I cannot make it work.

Can any one suggest how this might be done?

If there is a better newsgroup to post this question in I would be grateful
if someone could point me in the right direction.

TIA

Charles Law
Jack D. Ripper - 21 May 2004 19:29 GMT
Check out the RAC utility for S2k.It's similar
to Access crosstab but much more powerful with
many features/options.

www.rac4sql.net
Charles Law - 22 May 2004 00:49 GMT
Thanks Jack. I was really hoping for a straight conversion, without the need
for third-party tools.

From what I have read, ROLLUP should be the S2K way of doing TRANSFORM ...
PIVOT, but I am unable to find any examples of how one can represent the
other.

If you have any pointers to samples of the syntax I would be very grateful.

Charles

> Check out the RAC utility for S2k.It's similar
> to Access crosstab but much more powerful with
> many features/options.
>
> www.rac4sql.net
David Chavez - 27 May 2004 18:48 GMT
Charles,
Try this link:
http://support.microsoft.com/default.aspx?scid=KB;EN-
US;q175574&

I had the same problem too and this link helped me.

>-----Original Message-----
>I have two queries that I use in Access:
[quoted text clipped - 26 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.