Skip to main content

Error - 'Ambiguous column name Stock_Type' or 'Invalid column name 'Standard_Cost_Labour'

Ambiguous column name Stock_Type Could not use view or function 'vWorksOrderHeader' because of binding errors Invalid column name 'Standard_Cost_Labour' Could not use view or function 'vStockHeader' because of binding errors

B
Written by Bogdan Branetiu
Updated this week

Log on to the customers SQL Management Studio and connect to the correct instance with the following details:
username: sa
password: Gs0y1tuAs6yrt


If vStockHeader error

  1. Click the '+' button next to 'Databases', '[Customer's FM Database]', 'Views'

  2. FInd the view specified in the error message (will be vWorksOrderHeader or vStockHeader)

  3. Right click on the view and go to 'Script view as' and then 'Alter to'; and click New Query Window

  4. Find the places in the view where it references 'STANDARD_COST_LABOUR' (should be 2 occurrences)

  5. Change these to 'STANDARD_COST_LABOUR_TIME'

  6. press F5 to run the script


If vWorksOrderHeader error

  1. Click the '+' button next to 'Databases', '[Customer's FM Database]', 'Views'

  2. FInd the view specified in the error message (will be vWorksOrderHeader or vStockHeader)

  3. Right click on the view and go to 'Script view as' and then 'Alter to'; and click New Query Window

  4. Find the places in the view where the reference to 'Stock_Type' is underlined in red as an error (should be 4 occurrences

  5. Change these to say 'STKHEAD.Stock_Type'

  6. press F5 to run the script

Did this answer your question?