Solved

500pts SQL Copy Tables, in SQLite, URGENT PLEASE

Posted on 2006-11-19
6
250 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 500 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

696 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