TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kumar Ravishankar
NA
437
8k
Have to select data from table and insert in to same table
Apr 26 2018 7:06 AM
INSERT INTO tbl_NonQuestionField (FormId,NoneQuesColumnName,NoneQuesColumnDisplayName)
(
SELECT FormId, NoneQuesColumnName, NoneQuesColumnDisplayName FROM tbl_NonQuestionField
WHERE Id <=16
Id F_d A B
1 609 Points Points
2 609 Band Band
I have to select Column A AND B, and then have to insert in same table but F_D Column value will be different ..
I have tired
CREATE PROCEDURE dbo.InsertIntbl
@F_d INT
AS
BEGIN
INSERT INTO tbl_NonQuestionField (F_d,A,B)
(
SELECT A, VFROM tbl_NonQuestionField
WHERE Id <=2
)
)
Reply
Answers (
2
)
need to limit data inserting
Calculate average of time difference between two dates