SQL Database – Fixing ODBC Connection Multi-part Identifier Error

odbcview

We're using PADS Professional xDX Designer (from MentorGraphics) with a SQL parts database connected through ODBC using views. All seems to be working just fine, except for our Inductor parts where somehow I get an error assigning the Sat. Current to a part.

I get the following error:

An ODBC error occurred:
The multi-part identifier "Sat. Current" could not be bound.
The multi-part identifier "Sat. Current" could not be bound.
Statement(s) could not be prepared.
State:37000 Native:4104,Origin:[Microsoft[ODBC SQL Server Driver][SQL Server]
State:37000 Native:4104,Origin:[Microsoft[ODBC SQL Server Driver][SQL Server]
State:37000 Native:8180,Origin:[Microsoft[ODBC SQL Server Driver][SQL Server]
(1400)

My SQL query used to create the view:

--DROP view _ARV_Inductor
--CREATE VIEW _ARV_Inductor AS
SELECT [Number] as [Part Number],
[Description],
CONVERT(float,[Value]) as [Value],
[Case],
[Variant_Member] as [Variant],
CONVERT(float,[Rdc]) as [Rdc],
CONVERT(float,[Tolerance]) as [Tolerance],
CONVERT(float,[Nom. Current]) as [Nom. Current],
CONVERT(float,[Sat. Current]) as [Sat. Current],
[Temp Min],
[Temp Max],
[Datasheet],
[CostPerUnit] as Price,
[Manufacturer_member] as [Manufacturer],
[Part name],
[RS],
[Farnell],
[Supplier_member] as [Supplier],
[Order code],
[Location]
FROM [PDXpertDB].[viewer].[SourceItemMasterView] where ([Type]='Inductor' AND [ShowInDX]='true')

All other properties assign correctly, when I use this view in SQL Server Management Studio I also get no errors and it shows the correct list.

Any suggestions what I might be doing wrong? Is it even a fault in my SQL part or might it have something to do with xDX designer?

Best Answer

I would check if you have "Quoted Identifiers" set in the DSN, it looks like its interpreting [Sat. Current] as the column [Current] in the table [Sat]