Error The multi-part identifier could not be bound

  • Hi All,

    Hope this finds you well.

    I have about 300 tables within a database that all hold columns named in the format "XXX.YY" ie ELE.MC.

    As the named column has a dot in it, I had to put brakets round it... ie [ELE.MC]

    I can insert a price into the column [ELE.MC] for example, but when I try to delete it or replace it, I get the error:

    "Error Source .NEt SqlClient Data Provider

    the multi-part identifier "ELE.MC" could not be bound"

    Any ideas why? I am close to beating it with a whisk, maybe that will bind the errors 😉

    Ta,

    Mark

  • You have to enclose the column names with squared brackets like:

    DELETE FROM MyTab WHERE [My.Col] = 1

    If this doesn't help please post your SQL statement.

    Flo

  • Hi Florian,

    yeah I had done that right at the beginning, before putting the data into the columns. put 26.9 into the column [ELE.MC] for example and when i go to delete it straight from SQL server management, ie i open up the table, go into the field within column [ELE.MC], and change 26.9 to say 28.3 it comes up with the error...

    ta,

    Mark

  • Actually Florian, sorry I misunderstood your answer... I'll try using a query instead of deleting it manually in sql management studio...

  • That worked great Flo, guess that serves me right for being lazy 😉

    Whisk back in the kitchen!

    Thanks very much and have a good one!

    Mark

  • Glad I could help! 🙂

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply