bradcccs
Registered User.
- Local time
- Tomorrow, 02:19
- Joined
- Aug 9, 2001
- Messages
- 461
I have received an import script from a data supplier, and seem to have difficulty importing. I constantly receive the message that the "SQL Failed".
I have bought this to the attention of the data supplier, and received 3 further "versions" of the import, all which fail also.
I was wondering whether anyone could spot an glaring errors in the following SQL. I am not SQL proficient, and thus could not spot anything myself, but am confident the forum experts would spot it if it existed.
SQL which failed :
insert into [client] ([CL_Code], [CL_AdvisorCode], [LastUpdated],
[MaritalCode], [UserRef], [ClientTitle], [ClientSurname],
[ClientGiven], [ClientPrefName], [ClientDOB], [ClientSex],
[ClientOccupation], [ClientTFN], [ClientSocSec], [Salutation],
[PartnerTitle], [PartnerSurname], [PartnerGiven], [PartnerPrefName],
[PartnerDOB], [PartnerSex], [PartnerOccupation], [PartnerTFN],
[PartnerSocSec], [PH_Other], [ReferralCode], [StatusCode],
[Reminder], [ReminderDate], [ReminderDateTag], [cl_code_old],
[exReference], [privacy], [ClientABN], [PartnerABN], [ClientWebPage],
[PartnerWebPage], [BusinessCode], [CurRatingCode], [CurLastDate],
[OriRatingCode], [OriLastDate]) select s.[CL_Code],
s.[CL_AdvisorCode], s.[LastUpdated], s.[MaritalCode], s.[UserRef],
s.[ClientTitle], s.[ClientSurname], s.[ClientGiven],
s.[ClientPrefName], s.[ClientDOB], s.[ClientSex],
s.[ClientOccupation], s.[ClientTFN], s.[ClientSocSec],
s.[Salutation], s.[PartnerTitle], s.[PartnerSurname],
s.[PartnerGiven], s.[PartnerPrefName], s.[PartnerDOB], s.[PartnerSex],
s.[PartnerOccupation], s.[PartnerTFN], s.[PartnerSocSec],
s.[PH_Other], s.[ReferralCode], s.[StatusCode], s.[Reminder],
s.[ReminderDate], s.[ReminderDateTag], s.[cl_code_old],
s.[exReference], s.[privacy], s.[ClientABN], s.[PartnerABN],
s.[ClientWebPage], s.[PartnerWebPage], s.[BusinessCode],
s.[CurRatingCode], s.[CurLastDate], s.[OriRatingCode],
s.[OriLastDate] from vfps_work..client s where not exists (select *
from [client] dd where dd.[CL_Code] = s.[CL_Code])
Any error correction would be appreciated, or confirmation that no glaring errors exist would be even better
Thanks in advance
Brad.
I have bought this to the attention of the data supplier, and received 3 further "versions" of the import, all which fail also.
I was wondering whether anyone could spot an glaring errors in the following SQL. I am not SQL proficient, and thus could not spot anything myself, but am confident the forum experts would spot it if it existed.
SQL which failed :
insert into [client] ([CL_Code], [CL_AdvisorCode], [LastUpdated],
[MaritalCode], [UserRef], [ClientTitle], [ClientSurname],
[ClientGiven], [ClientPrefName], [ClientDOB], [ClientSex],
[ClientOccupation], [ClientTFN], [ClientSocSec], [Salutation],
[PartnerTitle], [PartnerSurname], [PartnerGiven], [PartnerPrefName],
[PartnerDOB], [PartnerSex], [PartnerOccupation], [PartnerTFN],
[PartnerSocSec], [PH_Other], [ReferralCode], [StatusCode],
[Reminder], [ReminderDate], [ReminderDateTag], [cl_code_old],
[exReference], [privacy], [ClientABN], [PartnerABN], [ClientWebPage],
[PartnerWebPage], [BusinessCode], [CurRatingCode], [CurLastDate],
[OriRatingCode], [OriLastDate]) select s.[CL_Code],
s.[CL_AdvisorCode], s.[LastUpdated], s.[MaritalCode], s.[UserRef],
s.[ClientTitle], s.[ClientSurname], s.[ClientGiven],
s.[ClientPrefName], s.[ClientDOB], s.[ClientSex],
s.[ClientOccupation], s.[ClientTFN], s.[ClientSocSec],
s.[Salutation], s.[PartnerTitle], s.[PartnerSurname],
s.[PartnerGiven], s.[PartnerPrefName], s.[PartnerDOB], s.[PartnerSex],
s.[PartnerOccupation], s.[PartnerTFN], s.[PartnerSocSec],
s.[PH_Other], s.[ReferralCode], s.[StatusCode], s.[Reminder],
s.[ReminderDate], s.[ReminderDateTag], s.[cl_code_old],
s.[exReference], s.[privacy], s.[ClientABN], s.[PartnerABN],
s.[ClientWebPage], s.[PartnerWebPage], s.[BusinessCode],
s.[CurRatingCode], s.[CurLastDate], s.[OriRatingCode],
s.[OriLastDate] from vfps_work..client s where not exists (select *
from [client] dd where dd.[CL_Code] = s.[CL_Code])
Any error correction would be appreciated, or confirmation that no glaring errors exist would be even better

Thanks in advance
Brad.