Column is available in table, but when stored procedure executes it throwing invalid column name

I am trying to execute stored procedure on the database MSSQL. It is throwing invalid column name. But I have column in my table.
How to fix this.

Unexpected error running Liquibase: Invalid column name ‘Account_number’. [Failed SQL: (207) Create or ALTER PROCEDURE [dbo].[account_auto_details]

The code is below.

–liquibase formatted sql
–changeset bob:121 runOnChange:true splitStatements:false stripComments:false

Create or ALTER PROCEDURE [dbo].[account_auto_details]

UPDATE fw_tran
SET fw_tran.Account_person = isnull(T.Account_person,-1),
fw_tran.Account_number = isnull(T.Account_number,-1)
FROM #Intermediate (nolock) T
cross apply ( select fw_tran.Account_person,fw_tran.Account_number,fw_tran.qw_gr_key,fw_tran.qwTransaction
from swtich_tran (nolock) fw_tran where fw_tran.qwTransaction =(select max(fw_tran_b.qwTransaction)
from swtich_tran (nolock) fw_tran_b where fw_tran_b.qwTransaction <= T.qwTransaction
and fw_tran_b.qw_gr_key = T.qw_gr_key ) and fw_tran.qw_gr_key = T.qw_gr_key ) fw_tran

I really don’t know anything about sql-server, but I see you have “dbo” prefixing your procedure, but not prefixing your table:


Could your procedure be finding a different version of the table that doesn’t have the column?

No, I think thats not an issue. Some different issue.

When I query a data of Account_number , I have more than 1 crore records and databasechangeloglock going into locked state