Solved

500pts SQL Copy Tables, in SQLite, URGENT PLEASE

Posted on 2006-11-19
6
229 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
  • 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Managing SQL log files, SQL Server 2014 6 81
Insert with SET how to handle join 6 69
DBF to ... Converter 5 69
ESX 6.0 Best Practices for datastore size 5 70
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
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…

815 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now