September 12, 2003 at 8:49 am
I keep getting this same error every time I paste my SQL into a SQL Task in DTS. It works fine in Analyzer.
Here is the Insert Statement:
INSERT dbo.ProvLookUp (ProvLicNum,
ProvStatus,
ProvName,
ProvEmail,
ProvPrimaryOffice,
ProvContactPerson,
ProvPracName,
ProvAddr1,
ProvAddr2,
ProvCity,
ProvState,
ProvZip,
ProvPhone,
ProvFaxNumber,
ProvPracticeManager,
ProvSpecCode,
ProvType,
ProvPending,
ProvGRIPA,
ProvPrimary
)
SELECT
[NYS License #]AS'ProvLicNum',
Inactive AS'ProvStatus',
Lname + ', ' + Fname AS'ProvName',
[E-MAIL] AS'ProvEmail',
[Primary Office]AS'ProvPrimaryOffice',
[Contact Person]AS'ProvContactPerson',
[Group Practice Name] AS'ProvPracName',
street AS'ProvAddr1',
street2 AS'ProvAddr2',
city AS'ProvCity',
stateAS'ProvState',
zip AS'ProvZip',
phone AS'ProvPhone',
faxAS'ProvFaxNumber',
[Practice Manager] AS'ProvPracticeManager',
Specialty AS'ProvSpecCode',
ProvTypeAS'ProvType',
PendingAS'ProvPending',
GRIPAAS'ProvGRIPA',
[Primary]AS'ProvPrimary'
FROM dbo.ProvLookUp2
September 12, 2003 at 9:49 am
I would get rid of the quotes around your column name aliases...the only thing that should be quoted to my knowledge is the comma being concatenated into the firstname/lastname field...and then with single quotes, not double quotes...I am surprised that your query runs in QA...how is the Quoted_Identifiers option set for the database?
hth,
Michael
INSERT dbo.ProvLookUp (ProvLicNum,
ProvStatus,
ProvName,
ProvEmail,
ProvPrimaryOffice,
ProvContactPerson,
ProvPracName,
ProvAddr1,
ProvAddr2,
ProvCity,
ProvState,
ProvZip,
ProvPhone,
ProvFaxNumber,
ProvPracticeManager,
ProvSpecCode,
ProvType,
ProvPending,
ProvGRIPA,
ProvPrimary
)
SELECT
[NYS License #]ASProvLicNum,
Inactive ASProvStatus,
Lname + ', ' + Fname ASProvName,
[E-MAIL] ASProvEmail,
[Primary Office]ASProvPrimaryOffice,
[Contact Person]ASProvContactPerson,
[Group Practice Name] ASProvPracName,
street ASProvAddr1,
street2 ASProvAddr2,
city ASProvCity,
stateASProvState,
zip ASProvZip,
phone ASProvPhone,
faxASProvFaxNumber,
[Practice Manager] ASProvPracticeManager,
Specialty ASProvSpecCode,
ProvTypeASProvType,
PendingASProvPending,
GRIPAASProvGRIPA,
[Primary]ASProvPrimary
FROM dbo.ProvLookUp2
Michael Weiss
Michael Weiss
September 12, 2003 at 12:48 pm
It was not checked; however after removing the single quotes and rerunning I still get the same Problems Once again I have successfully run this in QA
September 14, 2003 at 6:23 pm
What sort of connection are you using as the source for this statement? The "Error Source: Microsoft JET Database Engine" would indicate that it's not SQL Server.
Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface
--------------------
Colt 45 - the original point and click interface
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy