Re: [sqlite] SQL to SQLite

2019-12-03 Thread Keith Medcalf

On Tuesday, 3 December, 2019 05:39, gideo...@lutzvillevineyards.com wrote:

>My query is :

>UPDATE wbridge_history
>SET yearclass =
>(
>SELECT D.wynklas
>FROM
>(
>SELECT LidNo, PlaasNo, BlokNo, oesjaar, wynklas,
>ROW_NUMBER() OVER (PARTITION BY LidNo, PlaasNo, BlokNo, oesjaar ORDER BY
>COUNT(*) DESC, SUM(ton) DESC) AS row_num FROM wbridge_history GROUP BY
>LidNo, Plaasno, BlokNo, oesjaar, wynklas
>) D
>WHERE D.LidNo = wbridge_history.LidNo
>AND D.PlaasNo = wbridge_history.PlaasNo
>AND D.BlokNo = wbridge_history.BlokNo
>AND D.oesjaar = wbridge_history.oesjaar
>AND D.row_num = 1
>);

This prepares without error on version 3.31.0 so, as Simon says, you probably 
just have a version of SQLite3 that does not do window functions (ie, prior to 
3.25.0) in which ROW_NUMBER() would have been parsed as a function call, OVER 
as a column alias name, and the "(" as a syntax error (only a "," the keyword 
"FROM", or the end of statement ";" could validly appear after an expression in 
the select list).

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2019-12-03 Thread Warren Young
On Dec 3, 2019, at 5:38 AM, gideo...@lutzvillevineyards.com wrote:
> 
> The squigly red line starts at  (PARTITION ..

PARTITION BY is a valid SQLite window function:

https://www.sqlite.org/windowfunctions.html#the_partition_by_clause

but that feature is only about a year old in SQLite:


https://blog.xojo.com/2018/12/18/sqlite-3-25-adds-window-functions-and-improves-alter-table/

Are you using at least SQLite 3.25?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQL to SQLite

2019-12-03 Thread gideon.e
 

Hi Simon

 

My query is : 

 

 

UPDATE wbridge_history

SET yearclass =

(

SELECT D.wynklas

FROM

(

SELECT LidNo, PlaasNo, BlokNo, oesjaar, wynklas,

ROW_NUMBER() OVER (PARTITION BY LidNo, PlaasNo, BlokNo, oesjaar ORDER BY
COUNT(*) DESC, SUM(ton) DESC) AS row_num FROM wbridge_history GROUP BY
LidNo, Plaasno, BlokNo, oesjaar, wynklas

) D

WHERE D.LidNo = wbridge_history.LidNo

AND D.PlaasNo = wbridge_history.PlaasNo

AND D.BlokNo = wbridge_history.BlokNo

AND D.oesjaar = wbridge_history.oesjaar

AND D.row_num = 1

);

 

 

It works perfectly in SQL, but in SQLite it gives an error message : Error
while executing SQL query on database 'weegbrugGeskiedenis': near "(":
syntax error

The squigly red line starts at  (PARTITION ..

 

 

Regards

 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLIte

2019-12-02 Thread Warren Young
On Dec 2, 2019, at 11:22 AM, Simon Slavin  wrote:
> 
> Please post again, this time with the query.

The table schema might also help:

sqlite> .schema TableName

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLIte

2019-12-02 Thread Simon Slavin
On 2 Dec 2019, at 5:52pm,  
 wrote:

> I am having extreme difficulty to convert the above SQL query to SQLite.

Please post again, this time with the query.  Note that this mailing list 
strips attachments, so paste the query into your message.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQL to SQLIte

2019-12-02 Thread gideon.e
I am having extreme difficulty to convert the above SQL query to SQLite. Can
someone please help me. I need to udate the table using the most used text

In a column for each row that has the same data.

 

Regards

 

 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-21 Thread Robby Helperin
Thanks, Dana.

Yes, that's vb.net.



-Original Message-
From: sqlite-users-boun...@mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of dmp
Sent: Thursday, July 21, 2016 11:58 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] SQL to SQLite

> Thanks Dana,

> I think you're talking about doing what I did, but I'm not 100% sure.

> Below is my solution.  Could you let me know if yours is the same or 
> something more elegant?

Hello,

I'm not sure of the programming language, VBasic, ?, but generally looking
through it looks like essentially what I indicated and my code does.

So to summarize your options, others indicated also.

Note: 1. & 2. imply different source database.

1. Dump the data, CSV/SQL, format from the source database,
   then import into the new destination SQLite database.
   Somewhat easy, but manual so slow. Could code the import
   export together to improve efficiency.

2. Do a database to database transfer, much harder, to get
   right, mainly because the data type conversions. Looks
   like you code is taking into account and SQLMate could
   help. Relatively fast.

3. If using SQLite to SQLite, looks like indicated on the
   mailing list use ATTACH. Seems the easiest approach
   and fastest.

danap.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-21 Thread dmp
> Thanks Dana,

> I think you're talking about doing what I did, but I'm not 100% sure.

> Below is my solution.  Could you let me know if yours is the same or
> something more elegant?

Hello,

I'm not sure of the programming language, VBasic, ?, but generally
looking through it looks like essentially what I indicated and my code
does.

So to summarize your options, others indicated also.

Note: 1. & 2. imply different source database.

1. Dump the data, CSV/SQL, format from the source database,
   then import into the new destination SQLite database.
   Somewhat easy, but manual so slow. Could code the import
   export together to improve efficiency.

2. Do a database to database transfer, much harder, to get
   right, mainly because the data type conversions. Looks
   like you code is taking into account and SQLMate could
   help. Relatively fast.

3. If using SQLite to SQLite, looks like indicated on the
   mailing list use ATTACH. Seems the easiest approach
   and fastest.

danap.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-21 Thread Tim Streater
On 20 Jul 2016 at 23:14, Robby Helperin  wrote: 

> Thanks, Simon, this looks promising!
>
> Is this something that can be done programmatically in code (vb.net) or only
> from the command prompt?
>
> If programmatically, could you shoot me a quick syntax example?

Here's an example of what I do in PHP to move a row from one database to 
another. I need to go via a memory database in order to get a unique absid in 
the destination db:

 $dbh->exec ("attach database ':memory:' as mem');
 $dbh->exec ("create table mem.messages as select * from main.messages 
where absid=" . $absid);
 $dbh->exec ("update mem.messages set absid=null");

 $dbh->exec ("attach database '/path/to/destination/db' as dst");
 $dbh->exec ("insert into dst.messages select * from mem.messages");
 $dbh->exec ("delete from main.messages where absid=" . $absid);

Here, $dbh is a handle for the source database, $absid gives the id of the row 
to be moved from the source db. In the destination db it has a new, unique, id.

Doing it as above means that you don't need to know what the schema is for the 
messages table, as long as it is the same in both db.

--
Cheers  --  Tim
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-21 Thread Robby Helperin
Thanks, Simon, this looks promising!

Is this something that can be done programmatically in code (vb.net) or only
from the command prompt?

If programmatically, could you shoot me a quick syntax example?



-Original Message-
From: sqlite-users-boun...@mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon
Slavin
Sent: Wednesday, July 20, 2016 6:46 AM
To: SQLite mailing list
Subject: Re: [sqlite] SQL to SQLite


On 20 Jul 2016, at 12:21am, Robby Helperin <r...@spotlightmusic.com> wrote:

> Any SQLite string is going to refer to just one database, so you can't 
> write an INSERT command that will take from one database and write to 
> another, or can you?  How would this normally done?

See the ATTACH command:

<https://www.sqlite.org/lang_attach.html>

Open one database file and ATTACH another.  Once command can refer to tables
in both database files.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-21 Thread Robby Helperin
Catch ex As Exception
If ex.Message = "constraint failed" & vbCrLf & "UNIQUE
constraint failed: SongVersionsTEST.SongVerID" Then
Debug.WriteLine("That record is already in the table.")
'I think this line came from the "INSERT" version of this code I wrote and
probably don't need it here, sorry.
        End If
End Try

myRowNum = myRowNum + 1
Debug.WriteLine(myRowNum)
Next 'next row


MsgBox("All done! " & myRowNum & " records")

-Original Message-
From: sqlite-users-boun...@mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of dmp
Sent: Wednesday, July 20, 2016 10:00 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] SQL to SQLite

> Message: 2
> Date: Tue, 19 Jul 2016 15:01:55 -0700
> From: <tm...@spotlightmusic.com>
> To: <sqlite-users@mailinglists.sqlite.org>
> Subject: [sqlite] SQL to SQLite
> Message-ID: <004d01d1e209$2a356360$7ea02a20$@spotlightmusic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> What's the best way to Insert or Update records from a connected SQL 
> database to the connected SQLite database?
>
> I don't mean just once, but to do every so often.
> Thanks.

> Thanks for your response.

> Programming language is definitely the way I want to go, and in fact I 
> programmed a workaround, but I assume I took the long way around and 
> that there's a more standard way to do it.

Hello,

   If the source database is different, or SQLite, than the destination
database, SQLite, can be done and I have been working on a bridge in Java
that will perform the transfer. It is functional, but needs further work and
testing.

Essentially:

Create an ArrayBlockingQueue, start a LoadThread and a InsertPrepareThread.
Define the ArrayBlockingQueue as objects of a relation row element. Have the
load thread fill the blocking queue then the insert prepare thread consume
the table row elements from the queue.

A single SQL query can be used to define the SQLite table then fill it with
the source database data. A type definitions conversion needs to take place
to correctly transfer db --> db data types.

I have defined these type info conversions for various database and it is
available as part of my MyJSQLView project. At this time the db --> db code
is a plugin for MyJSQLView and is not been released to the public.

https://github.com/danap/myjsqlview/blob/master/src/com/dandymadeproductions
/myjsqlview/datasource/TypesInfoCache.java

Dana Proctor
MyJSQLView Project Manager

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread R.A. Nagy
If you are into Java, then I have a source code generator that should do
the trick:

https://sourceforge.net/projects/sqlmate/?source=directory

All one need do is to use the main.java included in the archive to generate
the DAO, then create two connection strings - one for each database file.

Using JDBC one could then connect to both files, then copy one set of data
using the generated code between the two database Connection()s.

Easy-peasy!  =)


On Wed, Jul 20, 2016 at 4:48 PM, Robby Helperin <r...@spotlightmusic.com>
wrote:

> Thanks R.A.Nagy.
>
> Would you be able to provide a quick example of what you mean?
>
> What I ended up doing was iterating through the rows and columns of the SQL
> database and creating a string that would later be used as an SQLite Insert
> command.  Seemed like that was the long way around.
>
> If there's a way to construct a command that in one step takes from one SQL
> database and writes to a SQLite database, I'd like to see an example of
> that
> syntax.
>
> Thanks.
>
> -Original Message-
> From: sqlite-users-boun...@mailinglists.sqlite.org
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R.A.
> Nagy
> Sent: Wednesday, July 20, 2016 7:25 AM
> To: SQLite mailing list
> Subject: Re: [sqlite] SQL to SQLite
>
> There are several ways to work with other databases. From the SQLite, we
> can
> always attach another file so as to work with > 1 database file at a time.
> From a programmatic point of view, one simply uses yet another database
> connection to do the same thing.
>
>
>
>
>
>
> On Tue, Jul 19, 2016 at 7:21 PM, Robby Helperin <r...@spotlightmusic.com>
> wrote:
>
> > Thanks for your response.
> >
> > Programming language is definitely the way I want to go, and in fact I
> > programmed a workaround, but I assume I took the long way around and
> > that there's a more standard way to do it.
> >
> > Any SQLite string is going to refer to just one database, so you can't
> > write an INSERT command that will take from one database and write to
> > another, or can you?  How would this normally done?
> >
> > -Original Message-
> > From: sqlite-users-boun...@mailinglists.sqlite.org
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R.A.
> > Nagy
> > Sent: Tuesday, July 19, 2016 3:32 PM
> > To: SQLite mailing list
> > Subject: Re: [sqlite] SQL to SQLite
> >
> > Surely the best way to routinely & autocratically copy a set of data
> > from one database to another SQL technology would be to use a
> > programming language - like Java, C/C++, C#, or Python for example -
> > so as to copy data between two different database connections.
> >
> > The only other way would be to create a textual .dump or CSV (etc)
> > export file, then munge the data for a clear-text importation via any
> > data migration tools available for the foreign SQL 'tech.
> >
> > Here is an explanation of how to do the later for SQLite:
> > https://www.youtube.com/watch?v=bVq57NBOaLs
> >
> >
> >
> >
> >
> > On Tue, Jul 19, 2016 at 6:01 PM, <tm...@spotlightmusic.com> wrote:
> >
> > > What's the best way to Insert or Update records from a connected SQL
> > > database to the connected SQLite database?
> > >
> > >
> > >
> > > I don't mean just once, but to do every so often.
> > >
> > >
> > >
> > > Thanks.
> > >
> > > ___
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> > >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread Robby Helperin
Thanks R.A.Nagy.

Would you be able to provide a quick example of what you mean?

What I ended up doing was iterating through the rows and columns of the SQL
database and creating a string that would later be used as an SQLite Insert
command.  Seemed like that was the long way around.

If there's a way to construct a command that in one step takes from one SQL
database and writes to a SQLite database, I'd like to see an example of that
syntax.

Thanks.

-Original Message-
From: sqlite-users-boun...@mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R.A. Nagy
Sent: Wednesday, July 20, 2016 7:25 AM
To: SQLite mailing list
Subject: Re: [sqlite] SQL to SQLite

There are several ways to work with other databases. From the SQLite, we can
always attach another file so as to work with > 1 database file at a time.
>From a programmatic point of view, one simply uses yet another database
connection to do the same thing.






On Tue, Jul 19, 2016 at 7:21 PM, Robby Helperin <r...@spotlightmusic.com>
wrote:

> Thanks for your response.
>
> Programming language is definitely the way I want to go, and in fact I 
> programmed a workaround, but I assume I took the long way around and 
> that there's a more standard way to do it.
>
> Any SQLite string is going to refer to just one database, so you can't 
> write an INSERT command that will take from one database and write to 
> another, or can you?  How would this normally done?
>
> -Original Message-
> From: sqlite-users-boun...@mailinglists.sqlite.org
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R.A.
> Nagy
> Sent: Tuesday, July 19, 2016 3:32 PM
> To: SQLite mailing list
> Subject: Re: [sqlite] SQL to SQLite
>
> Surely the best way to routinely & autocratically copy a set of data 
> from one database to another SQL technology would be to use a 
> programming language - like Java, C/C++, C#, or Python for example - 
> so as to copy data between two different database connections.
>
> The only other way would be to create a textual .dump or CSV (etc) 
> export file, then munge the data for a clear-text importation via any 
> data migration tools available for the foreign SQL 'tech.
>
> Here is an explanation of how to do the later for SQLite:
> https://www.youtube.com/watch?v=bVq57NBOaLs
>
>
>
>
>
> On Tue, Jul 19, 2016 at 6:01 PM, <tm...@spotlightmusic.com> wrote:
>
> > What's the best way to Insert or Update records from a connected SQL 
> > database to the connected SQLite database?
> >
> >
> >
> > I don't mean just once, but to do every so often.
> >
> >
> >
> > Thanks.
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread dmp
> Message: 2
> Date: Tue, 19 Jul 2016 15:01:55 -0700
> From: <tm...@spotlightmusic.com>
> To: <sqlite-users@mailinglists.sqlite.org>
> Subject: [sqlite] SQL to SQLite
> Message-ID: <004d01d1e209$2a356360$7ea02a20$@spotlightmusic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> What's the best way to Insert or Update records from a connected SQL
> database to the connected SQLite database?
>
> I don't mean just once, but to do every so often.
> Thanks.

> Thanks for your response.

> Programming language is definitely the way I want to go, and in fact I
> programmed a workaround, but I assume I took the long way around and that
> there's a more standard way to do it.

Hello,

   If the source database is different, or SQLite, than the destination
database, SQLite, can be done and I have been working on a bridge in Java
that will perform the transfer. It is functional, but needs further work
and testing.

Essentially:

Create an ArrayBlockingQueue, start a LoadThread and a InsertPrepareThread.
Define the ArrayBlockingQueue as objects of a relation row element. Have
the load thread fill the blocking queue then the insert prepare thread
consume the table row elements from the queue.

A single SQL query can be used to define the SQLite table then fill it
with the source database data. A type definitions conversion needs to
take place to correctly transfer db --> db data types.

I have defined these type info conversions for various database and
it is available as part of my MyJSQLView project. At this time the
db --> db code is a plugin for MyJSQLView and is not been released to
the public.

https://github.com/danap/myjsqlview/blob/master/src/com/dandymadeproductions/myjsqlview/datasource/TypesInfoCache.java

Dana Proctor
MyJSQLView Project Manager

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread R.A. Nagy
There are several ways to work with other databases. From the SQLite, we
can always attach another file so as to work with > 1 database file at a
time. From a programmatic point of view, one simply uses yet another
database connection to do the same thing.






On Tue, Jul 19, 2016 at 7:21 PM, Robby Helperin <r...@spotlightmusic.com>
wrote:

> Thanks for your response.
>
> Programming language is definitely the way I want to go, and in fact I
> programmed a workaround, but I assume I took the long way around and that
> there's a more standard way to do it.
>
> Any SQLite string is going to refer to just one database, so you can't
> write
> an INSERT command that will take from one database and write to another, or
> can you?  How would this normally done?
>
> -Original Message-
> From: sqlite-users-boun...@mailinglists.sqlite.org
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R.A.
> Nagy
> Sent: Tuesday, July 19, 2016 3:32 PM
> To: SQLite mailing list
> Subject: Re: [sqlite] SQL to SQLite
>
> Surely the best way to routinely & autocratically copy a set of data from
> one database to another SQL technology would be to use a programming
> language - like Java, C/C++, C#, or Python for example - so as to copy data
> between two different database connections.
>
> The only other way would be to create a textual .dump or CSV (etc) export
> file, then munge the data for a clear-text importation via any data
> migration tools available for the foreign SQL 'tech.
>
> Here is an explanation of how to do the later for SQLite:
> https://www.youtube.com/watch?v=bVq57NBOaLs
>
>
>
>
>
> On Tue, Jul 19, 2016 at 6:01 PM, <tm...@spotlightmusic.com> wrote:
>
> > What's the best way to Insert or Update records from a connected SQL
> > database to the connected SQLite database?
> >
> >
> >
> > I don't mean just once, but to do every so often.
> >
> >
> >
> > Thanks.
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread Simon Slavin

On 20 Jul 2016, at 12:21am, Robby Helperin  wrote:

> Any SQLite string is going to refer to just one database, so you can't write
> an INSERT command that will take from one database and write to another, or
> can you?  How would this normally done?

See the ATTACH command:



Open one database file and ATTACH another.  Once command can refer to tables in 
both database files.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread Robby Helperin
Thanks for your response.

Programming language is definitely the way I want to go, and in fact I
programmed a workaround, but I assume I took the long way around and that
there's a more standard way to do it.

Any SQLite string is going to refer to just one database, so you can't write
an INSERT command that will take from one database and write to another, or
can you?  How would this normally done?

-Original Message-
From: sqlite-users-boun...@mailinglists.sqlite.org
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of R.A. Nagy
Sent: Tuesday, July 19, 2016 3:32 PM
To: SQLite mailing list
Subject: Re: [sqlite] SQL to SQLite

Surely the best way to routinely & autocratically copy a set of data from
one database to another SQL technology would be to use a programming
language - like Java, C/C++, C#, or Python for example - so as to copy data
between two different database connections.

The only other way would be to create a textual .dump or CSV (etc) export
file, then munge the data for a clear-text importation via any data
migration tools available for the foreign SQL 'tech.

Here is an explanation of how to do the later for SQLite:
https://www.youtube.com/watch?v=bVq57NBOaLs





On Tue, Jul 19, 2016 at 6:01 PM, <tm...@spotlightmusic.com> wrote:

> What's the best way to Insert or Update records from a connected SQL 
> database to the connected SQLite database?
>
>
>
> I don't mean just once, but to do every so often.
>
>
>
> Thanks.
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-20 Thread Hick Gunter
Converting from one SQLite database to another may also be accomplished by 
using the ".mode insert " output format of the SQLite shell and 
then SELECTING the rows according to the full target schema. This creates SQL 
of the form "insert into  values (); NOTE: No field 
list

Or you can SELECT 'insert into  () (',,');' 
from ; after setting .mode list and .separator "," and .out 

Maybe your source database supports equivalent features that allow "proof of 
concept" via scripts.

Writing your own "bridge program" to translate between yource and destination 
databases is bound to be significantly faster though.

-Ursprüngliche Nachricht-
Von: sqlite-users-boun...@mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von 
tm...@spotlightmusic.com
Gesendet: Mittwoch, 20. Juli 2016 00:02
An: sqlite-users@mailinglists.sqlite.org
Betreff: [sqlite] SQL to SQLite

What's the best way to Insert or Update records from a connected SQL database 
to the connected SQLite database?



I don't mean just once, but to do every so often.



Thanks.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL to SQLite

2016-07-19 Thread R.A. Nagy
Surely the best way to routinely & autocratically copy a set of data from
one database to another SQL technology would be to use a programming
language - like Java, C/C++, C#, or Python for example - so as to copy data
between two different database connections.

The only other way would be to create a textual .dump or CSV (etc) export
file, then munge the data for a clear-text importation via any data
migration tools available for the foreign SQL 'tech.

Here is an explanation of how to do the later for SQLite:
https://www.youtube.com/watch?v=bVq57NBOaLs





On Tue, Jul 19, 2016 at 6:01 PM,  wrote:

> What's the best way to Insert or Update records from a connected SQL
> database to the connected SQLite database?
>
>
>
> I don't mean just once, but to do every so often.
>
>
>
> Thanks.
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQL to SQLite

2016-07-19 Thread tmp11
What's the best way to Insert or Update records from a connected SQL
database to the connected SQLite database?

 

I don't mean just once, but to do every so often.

 

Thanks.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread Martin Jenkins

Dennis Cote wrote:

P Kishor wrote:
Anyway a little digging on wikipedia found this:

/SQL/ is commonly spoken either as the names of the letters /ess-cue-el/ 


I pronounce XQP as ex queue pee so I reckon SQL should be ess queue ell, 
even if it was around twenty years before I was. Anyone who disagrees 
can send me a WAV of how they say "XQP" for my consideration. ;)


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread Dennis Cote

P Kishor wrote:


snobs ;-)

Hardly. More like Defenders of the One True Way. ;-)


...to each her own.
And there is no need for this sort of feminist activism on this list 
either. :-)




Anyway a little digging on wikipedia found this:

/SQL/ is commonly spoken either as the names of the letters /ess-cue-el/ 
(IPA : 
[ˈɛsˈkjuˈɛl]), or like the word /sequel/ (IPA 
: 
[ˈsiːkwəl]). The official pronunciation of SQL according to ANSI 
 is /ess-cue-el/. However, each of 
the major database products (or projects) containing the letters /SQL/ 
has its own convention: MySQL  is 
officially and commonly pronounced "/My Ess Cue El/"; PostgreSQL 
 is expediently pronounced 
/postgres/ (being the name of the predecessor to PostgreSQL); and 
Microsoft SQL Server  
is commonly spoken as /Microsoft-sequel-server/.


Being a strong proponent of SQL standards, I am glad to see that ANSI 
got it right. ;-)


Dennis Cote

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread P Kishor

On 4/5/07, Dan Baker <[EMAIL PROTECTED]> wrote:

- Original Message -
From: "Dennis Cote" <[EMAIL PROTECTED]>
To: "sqlite-users" <sqlite-users@sqlite.org>
Sent: Wednesday, April 04, 2007 2:24 PM
Subject: [sqlite] SQL and SQLite pronounciation?


> Hi All,
>
> I have a simple question; how do you pronounce SQL and SQLite?

In the book "SQLite" by Chris Newman on Page 8 it states: "...it is
pronounced sequel-lite by its creator..."




obviously the database is more ACID-compliant and consistent than the
database's creator. ;-)

--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread Dan Baker
- Original Message - 
From: "Dennis Cote" <[EMAIL PROTECTED]>

To: "sqlite-users" <sqlite-users@sqlite.org>
Sent: Wednesday, April 04, 2007 2:24 PM
Subject: [sqlite] SQL and SQLite pronounciation?



Hi All,

I have a simple question; how do you pronounce SQL and SQLite?


In the book "SQLite" by Chris Newman on Page 8 it states: "...it is 
pronounced sequel-lite by its creator..."


DanB


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread Martin Jenkins

P Kishor wrote:


In any case, unless DRH establishes a semi-official policy, let the
pronounciation be in public domain as well... to each her own.


Well there is that Google video. You could look at that to get Dr Hipp's 
 definitive pronunciation, but ISTR even he wasn't 100% consistent. ;)


Martin



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread P Kishor

On 4/5/07, Dennis Cote <[EMAIL PROTECTED]> wrote:

Martin Pelletier wrote:
>
> Hearing "sequel" for SQL always makes me cringe.
>
Me too! That is what prompted my original message. I just wanted to see
if I was perhaps the only one who was bothered by that pronunciation.

Thanks for the confirmation.




snobs ;-)

well, I am used to saying "My Ess Que Ell" even though its creator
insists that it is "Me Ess Que Ell" (Me is the name of his daughter).
But, somehow "See Que Lite" flows better than "Ess Que Lite" or worse
and incorrect "Ess Que Ell Lite"

In any case, unless DRH establishes a semi-official policy, let the
pronounciation be in public domain as well... to each her own.

--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-05 Thread Dennis Cote

Martin Pelletier wrote:


Hearing "sequel" for SQL always makes me cringe.

Me too! That is what prompted my original message. I just wanted to see 
if I was perhaps the only one who was bothered by that pronunciation.


Thanks for the confirmation.

Dennis Cote

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Doug Currie
On Wednesday, April 04, 2007 Martin Pelletier wrote: 

> I use a twist on the various versions listed so far: "es cue el-ait".

> Hearing "sequel" for SQL always makes me cringe.

Yeah. In some circles, "sequel" is reserved for the original SEQUEL
query language were first published in 1974 by Don Chamberlin and Ray
Boyce at the ACM–SIGFIDET Workshop on Data Description, whereas "ess
cue ell" is used for subsequent standardized versions of the language.

e

-- 
Doug Currie
Londonderry, NH, USA


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Clark Christensen
Personally, I use "sequel" and "sequel-light".  I think I remember from DRH's 
Google presentation video he uses "ess cue el ite" for his product.

 -Clark

- Original Message 
From: Dennis Cote <[EMAIL PROTECTED]>
To: sqlite-users <sqlite-users@sqlite.org>
Sent: Wednesday, April 4, 2007 1:24:39 PM
Subject: [sqlite] SQL and SQLite pronounciation?

Hi All,

I have a simple question; how do you pronounce SQL and SQLite?

I have heard some people pronounce SQL like "sequel", others like 
"squeal", and others like three words "ess cue el". Which do you prefer?

How about SQLite? Is it "ess cue light" or something else like "sequel 
light"?

I prefer "ess cue el" and "ess cue light" myself.

Dennis Cote



-
To unsubscribe, send email to [EMAIL PROTECTED]
-





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Martin Pelletier

I use a twist on the various versions listed so far: "es cue el-ait".

Hearing "sequel" for SQL always makes me cringe.

Dennis Cote wrote:

I have a simple question; how do you pronounce SQL and SQLite?



--
Martin Pelletier
Informatique / Software Development
Infodev Electronic Designers International Inc.
Tel : +1 (418) 681-3539, poste /ext. 114
Fax : +1 (418) 681-1209


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Griggs, Donald
 re: "S. Q. Lite... that is my pronunciation..."

And calling it "squirrelite" is simply a tongue-in-cheek affectionate
affectation   ;-)


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Cesar Rodas

S. Q. Lite... that is my pronunciation and as I read in a book that is its
pronunciation

On 04/04/07, Alberto Simões <[EMAIL PROTECTED]> wrote:


On 4/4/07, Joel Cochran <[EMAIL PROTECTED]> wrote:
> I prefer the "ess cue ell" version.  And I can never remmeber that there
is
> only one "el", so I end up saying "ess cue ell light" even though I know
its
> wrong.

Join the club, Joel.
I do the same, myself. With the only difference that I pronounce the
'S' 'Q' and 'L' letters in Portuguese.

Cheers

--
Alberto Simões


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





--
Cesar Rodas
http://www.cesarodas.com/
Mobile Phone: 595 961 974165
Phone: 595 21 645590
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Alberto Simões

On 4/4/07, Joel Cochran <[EMAIL PROTECTED]> wrote:

I prefer the "ess cue ell" version.  And I can never remmeber that there is
only one "el", so I end up saying "ess cue ell light" even though I know its
wrong.


Join the club, Joel.
I do the same, myself. With the only difference that I pronounce the
'S' 'Q' and 'L' letters in Portuguese.

Cheers

--
Alberto Simões

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Joel Cochran

I prefer the "ess cue ell" version.  And I can never remmeber that there is
only one "el", so I end up saying "ess cue ell light" even though I know its
wrong.

--
Joel Cochran


On 4/4/07, Dennis Cote <[EMAIL PROTECTED]> wrote:


Hi All,

I have a simple question; how do you pronounce SQL and SQLite?

I have heard some people pronounce SQL like "sequel", others like
"squeal", and others like three words "ess cue el". Which do you prefer?

How about SQLite? Is it "ess cue light" or something else like "sequel
light"?

I prefer "ess cue el" and "ess cue light" myself.

Dennis Cote




-
To unsubscribe, send email to [EMAIL PROTECTED]

-




Re: [sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread P Kishor

On 4/4/07, Dennis Cote <[EMAIL PROTECTED]> wrote:

Hi All,

I have a simple question; how do you pronounce SQL and SQLite?


See-quell

See-que-lite




--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SQL and SQLite pronounciation?

2007-04-04 Thread Dennis Cote

Hi All,

I have a simple question; how do you pronounce SQL and SQLite?

I have heard some people pronounce SQL like "sequel", others like 
"squeal", and others like three words "ess cue el". Which do you prefer?


How about SQLite? Is it "ess cue light" or something else like "sequel 
light"?


I prefer "ess cue el" and "ess cue light" myself.

Dennis Cote



-
To unsubscribe, send email to [EMAIL PROTECTED]
-