Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The multi-part identifier "Master.Buyer_Initial" could not be bound


The multi-part identifier "Master.Buyer_Initial" could not be bound

Author
Message
briancampbellmcad
briancampbellmcad
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 403
I'm trying to load part (by that I mean certain columns) into a new table, but I keep getting this:
Msg 4104, Level 16, State 1, Line 26
The multi-part identifier "Master.Buyer_Initial" could not be bound

USE [TrackIT]
GO
INSERT INTO [dbo].[tblTransactions]
(tblTransactions.Buyer_Initial,
tblTransactions.HeatTicketNumber,
tblTransactions.PO_Number,
tblTransactions.Transaction_Date,
tblTransactions.EndUserFirstName,
tblTransactions.EndUserLastName,
tblTransactions.EmployeeStatus,
tblTransactions.CostCenter,
tblTransactions.TermDate,
tblTransactions.License_Available,
tblTransactions.TransferFrom,
tblTransactions.TransferTo,
tblTransactions.EndUserLocation,
tblTransactions.EquipType,
tblTransactions.Quantity,
tblTransactions.Software_Description,
tblTransactions.Notes,
tblTransactions.Unit_Price,
tblTransactions.AllocationDate,
tblTransactions.Last_Renewal_Date,
tblTransactions.NextRenewalDate,
tblTransactions.LastRenewalPO,
tblTransactions.Transaction_Number)
VALUES
(Master.Buyer_Initial,
Master.HeatTicketNumber,
Master.PO_Number,
Master.Transaction_Date,
Master.EndUserFirstName,
Master.EndUserLastName,
Master.EmployeeStatus,
Master.CostCenter,
Master.TermDate,
Master.License_Available,
Master.TransferFrom,
Master.TransferTo,
Master.EndUserLocation,
Master.EquipType,
Master.Quantity,
Master.Software_Description,
Master.Notes,
Master.Unit_Price,
Master.AllocationDate,
Master.Last_Renewal_Date,
Master.NextRenewalDate,
Master.LastRenewalPO,
Master.Transaction_Number)
GO
David Webb-CDS
David Webb-CDS
SSC Eights!
SSC Eights! (922 reputation)SSC Eights! (922 reputation)SSC Eights! (922 reputation)SSC Eights! (922 reputation)SSC Eights! (922 reputation)SSC Eights! (922 reputation)SSC Eights! (922 reputation)SSC Eights! (922 reputation)

Group: General Forum Members
Points: 922 Visits: 8584
Assuming that Master is a table in you DB:


USE [TrackIT]
GO
INSERT INTO [dbo].[tblTransactions]
(tblTransactions.Buyer_Initial,
tblTransactions.HeatTicketNumber,
tblTransactions.PO_Number,
tblTransactions.Transaction_Date,
tblTransactions.EndUserFirstName,
tblTransactions.EndUserLastName,
tblTransactions.EmployeeStatus,
tblTransactions.CostCenter,
tblTransactions.TermDate,
tblTransactions.License_Available,
tblTransactions.TransferFrom,
tblTransactions.TransferTo,
tblTransactions.EndUserLocation,
tblTransactions.EquipType,
tblTransactions.Quantity,
tblTransactions.Software_Description,
tblTransactions.Notes,
tblTransactions.Unit_Price,
tblTransactions.AllocationDate,
tblTransactions.Last_Renewal_Date,
tblTransactions.NextRenewalDate,
tblTransactions.LastRenewalPO,
tblTransactions.Transaction_Number)
Select
Master.Buyer_Initial,
Master.HeatTicketNumber,
Master.PO_Number,
Master.Transaction_Date,
Master.EndUserFirstName,
Master.EndUserLastName,
Master.EmployeeStatus,
Master.CostCenter,
Master.TermDate,
Master.License_Available,
Master.TransferFrom,
Master.TransferTo,
Master.EndUserLocation,
Master.EquipType,
Master.Quantity,
Master.Software_Description,
Master.Notes,
Master.Unit_Price,
Master.AllocationDate,
Master.Last_Renewal_Date,
Master.NextRenewalDate,
Master.LastRenewalPO,
Master.Transaction_Number
from [Master]
GO





And then again, I might be wrong ...
David Webb
briancampbellmcad
briancampbellmcad
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 403
Thanks... worked!
briancampbellmcad
briancampbellmcad
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 403
One additional question... my receiving table has its primary key with "Is Identity" being "Yes" and and a seed of 18000 incremented by one... the number of records (historical data) that I'm importing is just under 18000... how can I upload that data when I get a message:

"Cannot insert explicit value for identity column in table 'tblTransactions' when IDENTITY_INSERT is set to OFF."?

Thanks!
bleroy
bleroy
SSC-Enthusiastic
SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)

Group: General Forum Members
Points: 172 Visits: 739
Have you tried turning the IDENTITY_INSERT to ON?
anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6102 Visits: 6078
Two ways,

Dont insert a value into the identity column of the destination

or

Add the below to the query

SET IDENTITY_INSERT tblTransactions ON



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


briancampbellmcad
briancampbellmcad
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 403
tried and get: Msg 1088, Level 16, State 11, Line 1
Cannot find the object "tblTransactions" because it does not exist or you do not have permissions.
anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6102 Visits: 6078
Does the table exist?
Do you have permissions to the table?
What is your user accounts default schema? If it is different than that of the table, you will need to append the schema name to the object

SET IDENTITY_INSERT dbo.tblTransactions ON



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


briancampbellmcad
briancampbellmcad
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 403
SET IDENTITY_INSERT dbo.tblTransactions ON - that worked... thanks!
briancampbellmcad
briancampbellmcad
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 403
Tried loading my data and got the same error.

Then tried SET IDENTITY_INSERT dbo.tblTransactions ON again and it said: Cannot find the object "dbo.tblTransactions" because it does not exist or you do not have permissions.

Strange since I have full admin rights on this DB
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search