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
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.
Upendra Pratap ShahiPosted Aug 27, 2015, 7:31 AM
insert into yourtable_name(col1, col2, col3, .. ....col n) values(col1value, col2value, col3value, ... colnvalue)
Amitesh VermaPosted Aug 27, 2015, 7:03 AM
Srinivas PabballaPosted Aug 27, 2015, 6:18 AM
Pankaj Kumar ChoudharyPosted Aug 27, 2015, 12:00 AM
SELECT MAX(CAST(ID as INT)) + ,'HIMT','HIMT2','HIMT3','HIMT4','HIMT5','HIMT6','off'
Accounts_Entity