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"
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"