SCMON Access SQL Pivot error

Status
Not open for further replies.

Dassudt

New Member
Joined
May 7, 2017
Messages
16
Sub SQLtest()
Dim Dbe As DAO.Database
Dim Qr As DAO.QueryDef
Dim qdfTRANSFORM As DAO.Database
Dim pSQL1 As String

Set Db = CurrentDb
DoCmd.TransferText TransferType:=acImportDelim, TableName:="Dept1", _
FileName:="C:\Users\Sindhu\Desktop\SC\Dept1.Txt", HasFieldNames:=True
pSQL1 = "TRANSFORM Sum(Amount) as TGeek SELECT Hospital, SUM(Amount) as Total FROM GeeK Group BY Hospital PIVOT COBID IN (COB, CODD, COI)"
pSQL1 = "Select Emp1.EmpName, Dept1.DeptNo FROM Emp1 INNER JOIN Dept1 ON Emp1.DeptID=Dept1.DeptID"
End Sub


"Getting error on the above code"
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Status
Not open for further replies.

Forum statistics

Threads
1,221,700
Messages
6,161,371
Members
451,700
Latest member
Eccymarge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top