500pts SQL Copy Tables, in SQLite, URGENT PLEASE

Hi Im using SQLite for one of my project
SQLite is similar to MSSQL, but less features

I have TableA with X, Y , Z Columns
and TableB with X,Y,Z and Q Columns

I want to copy all the rows with Q=1 in TableB to TableA

Whats the fastes way to do this?

Any method without using recordset?
Please help
Udana
udanabananaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
dduserConnect With a Mentor Commented:
Write this query.

Insert into TableA(X,Y,Z)
Select X,Y,Z from TableB where Q = 1

Regards,

dduser
0
 
udanabananaAuthor Commented:
so in VB is this like
con.execute("Insert into TableA(X,Y,Z) Select X,Y,Z from TableB where Q = 1")
Am I correct?
0
 
dduserCommented:
I am not sure in VB, but you can try out...

Regards,

dduser
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
dduserCommented:
Yes you can do it.., i just asked my colleague who is Programmer i am a DBA

Regards,

dduser
0
 
TRACEYMARYCommented:
make the select command above a stored procedre

create procedure  sp_myname

as
   insert into
   select.......

then in vb your set up the connection string and just do
   exec sp_myname

0
 
udanabananaAuthor Commented:
Thanks guys
all work good
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.