hi,

I have a table with two columns. i want to insert into first column the values of 2nd column where it is between 7 and 10. the table is #temp as well.

so i can not use views... i need to make a function. can you guys please help me how to do it and if you could explain it would be great.

thanks

View won't help and I think UDF (User Defined Function) won't help too, the best practice is to use Stored Procedure

Create procedure sam1
AS
Insert into tableX(column2) values (select column1 from tableX)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.