Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

500pts SQL Copy Tables, in SQLite, URGENT PLEASE

Posted on 2006-11-19
6
Medium Priority
?
259 Views
Last Modified: 2008-03-06
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
0
Comment
Question by:udanabanana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Accepted Solution

by:
dduser earned 2000 total points
ID: 17977379
Write this query.

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

Regards,

dduser
0
 

Author Comment

by:udanabanana
ID: 17977506
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
 
LVL 9

Expert Comment

by:dduser
ID: 17977516
I am not sure in VB, but you can try out...

Regards,

dduser
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 9

Expert Comment

by:dduser
ID: 17977518
Yes you can do it.., i just asked my colleague who is Programmer i am a DBA

Regards,

dduser
0
 
LVL 7

Expert Comment

by:TRACEYMARY
ID: 17978873
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
 

Author Comment

by:udanabanana
ID: 17985732
Thanks guys
all work good
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question