Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > copying row fro...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 11035 of 11262
Post > Topic >>

copying row from same table and adding value from form.request

by ll <barn104_1999@[EMAIL PROTECTED] > May 12, 2008 at 12:38 PM

I'm working on a way to copy most data columns from another row in the
same table to a new row and insert the courseID value from the form
that executes this action (the copy).  Is it possible to have both
"values" and "select" in the same Insert Into statement?
Here's what I have (below).  The "CopyCourseID" is the id of the
course that is copied to the new row, although the new row will have a
different course ID ("CourseID").
---------------------------------------------------------------

strCourseID=Request.Form("CourseID")
Insert table_a(CourseID,Name,Address)
Values(strCourseID)
Select Name, Address
From table_a
Where Course ID = Request.Form("CopyCourseID")
------------------------------------------------------------------

Thanks,
Louis
 




 3 Posts in Topic:
copying row from same table and adding value from form.request
ll <barn104_1999@[EMAI  2008-05-12 12:38:51 
Re: copying row from same table and adding value from form.reque
"Roy Harvey (SQL Ser  2008-05-12 16:27:19 
Re: copying row from same table and adding value from form.reque
ll <barn104_1999@[EMAI  2008-05-15 14:51:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 3:09:20 CDT 2008.