cfcProgrammer
Programmer
Hi,
I am trying to run a query using open query and a linked server.
Here is my query... the error I am getting is that the "FROM keyword not found where expected".
select * from openquery (STARSRO,'select NMS.SERIAL_NUM,
m.SerialNum as ''Serial Number'',
c.ContactCompanyName as ''Company'',
c.ParentCustomerId as ''Parent Cust ID'',
m.CustomerId as ''Customer ID'',
c.ARAccountCode as ''Account Number'',
c.ContactCompanyName as ''Comapny Name'',
CDR.ACCT_PERIOD,
sum(CDR.MINUTES)as Minutes
from
NMS_MOBILE_ID NMS,
CDR_CUSTOMER CDR,
iridium.dbo.Mobile m,
iridium.dbo.Customer c
where
c.Id = m.CustomerId
and
NMS.SERIAL_NUM = m.serialNum
and
CDR.MOBILE_ID = NMS.BILLABLE_MOBILE_ID
and
CDR.NETWORK = ''IRID''
and
(c.Id = 22151 or c.ParentCustomerId = 22151)
and
m.IsActive =''1''
and
m.SerialNum = ''8988169514000903117''
and CDR.ACCT_PERIOD = ''201211''
group by
NMS.SERIAL_NUM,
m.SerialNum,
m.CustomerId,
c.ParentCustomerId,
c.ARAccountCode,
c.ContactCompanyName,
CDR.ACCT_PERIOD')
Please help as this is driving me nuts... I'm sure it is a simple mistake that my eyes can't see anymore!!
Thanks in advance
CfcProgrammer
cfcProgrammer
I am trying to run a query using open query and a linked server.
Here is my query... the error I am getting is that the "FROM keyword not found where expected".
select * from openquery (STARSRO,'select NMS.SERIAL_NUM,
m.SerialNum as ''Serial Number'',
c.ContactCompanyName as ''Company'',
c.ParentCustomerId as ''Parent Cust ID'',
m.CustomerId as ''Customer ID'',
c.ARAccountCode as ''Account Number'',
c.ContactCompanyName as ''Comapny Name'',
CDR.ACCT_PERIOD,
sum(CDR.MINUTES)as Minutes
from
NMS_MOBILE_ID NMS,
CDR_CUSTOMER CDR,
iridium.dbo.Mobile m,
iridium.dbo.Customer c
where
c.Id = m.CustomerId
and
NMS.SERIAL_NUM = m.serialNum
and
CDR.MOBILE_ID = NMS.BILLABLE_MOBILE_ID
and
CDR.NETWORK = ''IRID''
and
(c.Id = 22151 or c.ParentCustomerId = 22151)
and
m.IsActive =''1''
and
m.SerialNum = ''8988169514000903117''
and CDR.ACCT_PERIOD = ''201211''
group by
NMS.SERIAL_NUM,
m.SerialNum,
m.CustomerId,
c.ParentCustomerId,
c.ARAccountCode,
c.ContactCompanyName,
CDR.ACCT_PERIOD')
Please help as this is driving me nuts... I'm sure it is a simple mistake that my eyes can't see anymore!!
Thanks in advance
CfcProgrammer
cfcProgrammer