Re: [sqlite] no such column error

2016-10-25 Thread Bart Smissaert
Try this:

UPDATE mytable
SET myfield1 = (SELECT 1 from mytable
  ORDER BY EXISTS (SELECT 1
WHERE mytable.myfield2 = 1
  )
   )


RBS

On Tue, Oct 25, 2016 at 4:40 PM, Rob Golsteijn 
wrote:

> Hi List,
>
> I encountered a situation in which sqlite does not understand to which
> field I try to refer. I simplified the original query to show the problem.
> The simplified query itself is now completely meaningless (and for my
> specific situation I could rewrite the query to work around the problem).
>
> In the example below I expected that mytable.myfield2 in the EXISTS
> expression would refer to myfield2 of table mytable from the top level
> UPDATE statement. It looks like the combination of an ORDER BY and an
> EXISTS that refers to the table of an UPDATE statement causes sqlite to
> report that myfield2 is unknown. Sqlite does not complain when I use
> mytable.myfield2 in other places in the query.
>
> CREATE TABLE mytable
> (
>myfield1 INTEGER,
>myfield2 INTEGER
> );
>
> UPDATE mytable
>SET myfield1 = (SELECT 1
>  ORDER BY EXISTS (SELECT 1
>WHERE mytable.myfield2 =1
>  )
>   );
>
> Error: no such column: mytable.myfield2
>
> Tested with sqlite versions 3.8.4.3,  3.8.8.2,   3.11.1 and 3.15.0
> (latest).
>
> Met Vriendelijke Groet, Kind Regards,
>
> Rob Golsteijn
>
> ___
> 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] no such column error

2016-10-25 Thread Rob Golsteijn
Hi List,

I encountered a situation in which sqlite does not understand to which field I 
try to refer. I simplified the original query to show the problem. The 
simplified query itself is now completely meaningless (and for my specific 
situation I could rewrite the query to work around the problem).

In the example below I expected that mytable.myfield2 in the EXISTS expression 
would refer to myfield2 of table mytable from the top level UPDATE statement. 
It looks like the combination of an ORDER BY and an EXISTS that refers to the 
table of an UPDATE statement causes sqlite to report that myfield2 is unknown. 
Sqlite does not complain when I use mytable.myfield2 in other places in the 
query.

CREATE TABLE mytable
(
   myfield1 INTEGER,
   myfield2 INTEGER
);

UPDATE mytable
   SET myfield1 = (SELECT 1
 ORDER BY EXISTS (SELECT 1
   WHERE mytable.myfield2 =1
 )
  );

Error: no such column: mytable.myfield2

Tested with sqlite versions 3.8.4.3,  3.8.8.2,   3.11.1 and 3.15.0 (latest).

Met Vriendelijke Groet, Kind Regards,

Rob Golsteijn

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


Re: [sqlite] Development environment reccomendation

2016-10-25 Thread Don V Nielsen
Ruby to script out and automate the process. Could use Sinatra as a
lightweight web interface, or go Rails for a full blown web service.

On Mon, Oct 24, 2016 at 5:02 AM, Simon Slavin  wrote:

>
> On 24 Oct 2016, at 6:26am, Philip Rhoades  wrote:
>
> > What development environment would people suggest for building the
> sqlite app?
>
> If I understand correctly, 'mmssms.db' is itself a SQLite database file.
> So your choice comes down to whatever programming language/environment
> you're familiar with, as long as it supports the SQLite API or has a
> library which does.
>
> Ruby is fine, since you mention that:
>
> 
>
> 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] Import 5000 xml files in a sqlite database file

2016-10-25 Thread Don V Nielsen
Ruby scripting language, using Nokogiri library to parse the html.

On Sun, Oct 23, 2016 at 11:12 AM, Preguntón Cojonero Cabrón <
preguntoncojon...@gmail.com> wrote:

> Scripting powershell? C#?
>
> El 23/10/2016 18:04, "Sylvain Pointeau" 
> escribió:
>
> > hello,
> >
> > I am not sure if Oxygen or another XML specialized software could do it,
> > however it would be easy done using C or C++ or Java. Advantage is that
> it
> > is then easy to automatize in a batch mode. I can propose you my services
> > if you are interested.
> >
> > Best regards,
> > Sylvain
> >
> > Le samedi 22 octobre 2016,  a écrit :
> >
> > > Hi,
> > >
> > > I have more than 5000 xml files. All files have the same xml-structure.
> > >
> > > Each file has different values (timestamps, numbers and strings). I
> would
> > > like to put all these values in a sqlite database tabke, all in one
> > table.
> > > => Import the data values into a sqlite database table.
> > >
> > > Can you please tell me a software program, that can do this quickly?
> > >
> > > Thank you for your answers.
> > >
> > > Best regards
> > >
> > > Bob
> > > ___
> > > 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] the error on Aix7 where i make sqlite3.13

2016-10-25 Thread FKVZL
hello:when i downthe latest sqlite and make sqlite-autoconf-313 , there is 
something wrong.my os: AIX7
event: make sqlite3
erroe message: 
  cc:1501-218(W) file  3.13.0 contains an incorrect file suffix
  cc:1501-218(W)input file 3.13.0 not found
  make:1254-004 the error  code from the last command is 1
stop
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users