narasiman rao

narasiman rao

  • NA
  • 519
  • 768.3k

Invalid column ID in my sql query

Aug 26 2015 11:11 PM
  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)