Link to home
Start Free TrialLog in
Avatar of H-SC
H-SCFlag for United States of America

asked on

Insert Statement

I have the following insert statement that will not seem to work.  It worked fine until I added the "type" and the area of "this is a test".

How can I add text into a table field along with other values in a select?

Dim command7222 As New SqlClient.SqlCommand("INSERT INTO my_table(type, id5, change_id,send_date) values('" & "this is a test" & "','" & ("select ctl_num, id5_t, getdate() from my_table where ctl_num = '" & textbox1.Text & "')", myconn7222)
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of H-SC

ASKER

angelIII,

perfect!

many thanks for the quick reply