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
sunspotzzz
NA
31
0
INSERT INTO a Table FROM another Table
Feb 13 2004 10:14 PM
Hi, Wat i am doing is to INSERT into a table values from another table that satisfy the L_Linenumber = temp1 value. the temp1 value is a dynamic one that i get from the LineNumberOcurrencesSmal dataset. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- temp1 = Convert.ToDouble(dsLineNumber.Tables ["LineNumberOccurrencesSmall"].Rows[Increment].ItemArray[0].ToString()); string fillLineNumberSmallGroupRows = "INSERT INTO sunspot. createdTableLineNumberSmallGroupRows(L_OrderKey,L_ PartKey,L_SuppKey,L_LineNumber) SELECT * FROM sunspot.LINEITEM WHERE L_LineNumber =" + temp1; conn = new SqlConnection(source); conn.Open(); SqlCommand cmdFillTableLineNumberSmallGroupRows = new SqlCommand (fillLineNumberSmallGroupRows, conn); cmdFillTableLineNumberSmallGroupRows.ExecuteNonQuery();<--ERROR -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Is my codes corectly writen? I executed the codes in sql query analyzier and it gave me the results but it give me an error msg when I execute it in visual c#.net 2003.
Reply
Answers (
6
)
Is this possible? Update a dataset with info in another dataset
windows application - updating database