[sqlite] SQLite to SQL Server

2015-04-15 Thread Erik Ejlskov Jensen
If you have VS, you can use my free SQLite Toolbox add-in, just added feature 
to migrate to and from SQL Server with "a single click". 
http://erikej.blogspot.dk/2015/03/sql-server-compact-sqlite-toolbox-42.html   
https://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/view/Reviews
 Mvh / Regards


Erik Ejlskov Jensen
http://twitter.com/erikej 


[sqlite] SQLite to SQL Server

2015-04-14 Thread Drago, William @ CSG - NARDA-MITEQ
Thanks for the tip. I've used dump before to move data around between SQLite 
databases. I should have realized that I could have used it to move data to SQL 
Server.

--
Bill Drago
Senior Engineer
L3 Narda-MITEQ
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / William.Drago at L-3COM.com


> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
> users-bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin
> Sent: Monday, April 13, 2015 6:24 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] SQLite to SQL Server
>
>
> On 13 Apr 2015, at 10:38pm, Drago, William @ CSG - NARDA-MITEQ
>  wrote:
>
> > Is there a convenient way to transfer data from SQLite to SQL Server?
> I'm presently writing code to do a row by row transfer of all my
> tables, but the thought crossed my mind that maybe there's a better
> way.
>
> If you're just doing it once, use the SQLite shell tool to '.dump' the
> database to a text file of SQL commands, then read the text file into a
> fresh database in SQL Server.
>
> You may have to do some minor editing of the text file to make it
> conform to SQL Server's notion of SQL rather than SQLite's notion of
> SQL.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.


[sqlite] SQLite to SQL Server

2015-04-14 Thread Igor Korot
Hi,

On Tue, Apr 14, 2015 at 10:31 AM, Drago, William @ CSG - NARDA-MITEQ
 wrote:
> Thanks for the tip. I've used dump before to move data around between SQLite 
> databases. I should have realized that I could have used it to move data to 
> SQL Server.

And you can use bcp (freebcp from freeTDS package) to move the data
from the text file in the SQL Server.
For 'bcp' I don't think any editing is required You may need to
check the result though. ;-)

Thank you.

>
> --
> Bill Drago
> Senior Engineer
> L3 Narda-MITEQ
> 435 Moreland Road
> Hauppauge, NY 11788
> 631-272-5947 / William.Drago at L-3COM.com
>
>
>> -Original Message-
>> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-
>> users-bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin
>> Sent: Monday, April 13, 2015 6:24 PM
>> To: General Discussion of SQLite Database
>> Subject: Re: [sqlite] SQLite to SQL Server
>>
>>
>> On 13 Apr 2015, at 10:38pm, Drago, William @ CSG - NARDA-MITEQ
>>  wrote:
>>
>> > Is there a convenient way to transfer data from SQLite to SQL Server?
>> I'm presently writing code to do a row by row transfer of all my
>> tables, but the thought crossed my mind that maybe there's a better
>> way.
>>
>> If you're just doing it once, use the SQLite shell tool to '.dump' the
>> database to a text file of SQL commands, then read the text file into a
>> fresh database in SQL Server.
>>
>> You may have to do some minor editing of the text file to make it
>> conform to SQL Server's notion of SQL rather than SQLite's notion of
>> SQL.
>>
>> Simon.
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
> attachments are solely for the use of the addressee and may contain 
> information that is privileged or confidential. Any disclosure, use or 
> distribution of the information contained herein is prohibited. In the event 
> this e-mail contains technical data within the definition of the 
> International Traffic in Arms Regulations or Export Administration 
> Regulations, it is subject to the export control laws of the U.S.Government. 
> The recipient should check this e-mail and any attachments for the presence 
> of viruses as L-3 does not accept any liability associated with the 
> transmission of this e-mail. If you have received this communication in 
> error, please notify the sender by reply e-mail and immediately delete this 
> message and any attachments.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite to SQL Server

2015-04-14 Thread R.Smith

On 2015-04-13 11:38 PM, Drago, William @ CSG - NARDA-MITEQ wrote:
> All,
>
> Is there a convenient way to transfer data from SQLite to SQL Server? I'm 
> presently writing code to do a row by row transfer of all my tables, but the 
> thought crossed my mind that maybe there's a better way.

Depends, a row by row transfer is not bad, it is what all transfers will 
boil down to. You might use the SQL Server native connector 
(sqlncli.dll) and use the api to bind the variables (just like in 
SQLite) for very fast transfers. Or you might compile a list of INSERT 
statements in MSSQL format, still quite fast.

If you are doing this as a once-off, there are tools that can do that 
for you (as far as exporting to SQL goes anyway). If you need to do this 
all the time, best is to make connector in your system. In the end, the 
data has to go from whatever form into SQL and get fed into whichever 
SQL engine you choose because the receiving engine needs the opportunity 
to do validation and constraint checking depending on its version of the 
schema.

Programmatically adjusting mutative schemata to have the same meaning 
when it transmits to  MSSQL (or any other SQL engine) is a rabbit hole 
I'd avoid.

I realize these statements are more vague than helpful at this point - 
if you could be more specific with the use case, I'm sure lots of people 
here have walked the route and will have options.


[sqlite] SQLite to SQL Server

2015-04-13 Thread Simon Slavin

On 13 Apr 2015, at 10:38pm, Drago, William @ CSG - NARDA-MITEQ  wrote:

> Is there a convenient way to transfer data from SQLite to SQL Server? I'm 
> presently writing code to do a row by row transfer of all my tables, but the 
> thought crossed my mind that maybe there's a better way.

If you're just doing it once, use the SQLite shell tool to '.dump' the database 
to a text file of SQL commands, then read the text file into a fresh database 
in SQL Server.

You may have to do some minor editing of the text file to make it conform to 
SQL Server's notion of SQL rather than SQLite's notion of SQL.

Simon.


[sqlite] SQLite to SQL Server

2015-04-13 Thread Drago, William @ CSG - NARDA-MITEQ
All,

Is there a convenient way to transfer data from SQLite to SQL Server? I'm 
presently writing code to do a row by row transfer of all my tables, but the 
thought crossed my mind that maybe there's a better way.

Thanks,
--
Bill Drago
Senior Engineer
L3 Narda-MITEQ
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / William.Drago at L-3COM.com


CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.


[sqlite] SQLite to SQL Server

2015-04-13 Thread James K. Lowden
On Mon, 13 Apr 2015 21:38:25 +
"Drago, William @ CSG - NARDA-MITEQ"  wrote:

> Is there a convenient way to transfer data from SQLite to SQL Server? 

If I were doing it, I'd produce tab-delimited files with sqlite3 and
use the SQL Server bcp utility to upload the output.  

The current trunk of the FreeTDS freebcp utility accepts input on a
pipe, such that

$ sqlite3 -separator "  " db "select ... " | freebcp [...]

will work.  

HTH.  

--jkl