4
Answers

Invalid column ID in my sql query

narasiman rao

narasiman rao

9y
474
1
  My query as follows

Insert INTO Accounts_Entity(ID,Entity,Address1,Address2,Address3,Address4,Address5,Signature)
SELECT MAX(CAST(ID as INT)) + ,'HIMT','HIMT2','HIMT3','HIMT4','HIMT5','HIMT6','off'
Accounts_Entity

When i run the above sql query shows error as follows
Invalid column name 'ID'

Table structure as follows (Table Name Accounts_Entity)

Field         Datatype

ID                bigint
Entity         varchar(50)
Address1   varchar(50)
Address2   varchar(50
Address3   varchar(50)
Address4   varchar(50)
Address5    varchar(50)
Signature V  archar(50)

please help what is the mistake in my above sql query.

Regards,
Narasiman P. 
Answers (4)