0
Hi Ajay,
You can get this by using store procedure because in direct insert sql statement column is not allowed to insert. So try this.
CREATE PROCEDURE SPContact
@FName varchar(20),
@LName varchar(20)
As
Begin
insert into contact(Fname, Lname, ContactName) values(@Fname, @Lname, @Fname+@Lname)
end
exec spcontact @Fname='Shambhu', @Lname='Suman'
Regards,
Shambhu
0
Check the below script,
drop table venkat_table
go
create table venkat_table (id int,val varchar(100),val1 varchar(100))
insert into venkat_table values(1,'Venkat','Prabu')
select ID, val +' '+ val1 as name from venkat_table
Cheers,
Venkatesan Prabu .J
0
just put simple query
insert into contacts values ('ajay','kalidindi',firstname+'-'+lastname)
0
Please check this ,
insert into contacts
select 'ajay', 'kalidindi', (firstname + ' ' + lastname) as contactname from contacts where <filtercolumnname> = <filtervalue>
Please mark as answer if it helps you.