Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-15 Thread Maziar Parsijani
> ON table1.rowid = table2.rowid > >> WHERE table1.name LIKE '%smth%' > >> > >> > >> -Original Message----- > >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org > ] > >> On Behalf Of Simon Slavin > &g

Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread Rob Richardson
table1 >> ON table1.rowid = table2.rowid >> WHERE table1.name LIKE '%smth%' >> >> >> -Original Message- >> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >> On Behalf Of Simon Slavin >> Sent: Friday, September 14,

Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread Rob Richardson
gt; WHERE table1.name LIKE '%smth%' > > > -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Simon Slavin > Sent: Friday, September 14, 2018 1:59 PM > To: SQLite mailing list > Subject: Re: [s

Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread Keith Medcalf
to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Maziar Parsijani >Sent: Friday, 14 September, 2018 12:32 >To: sqlite-users@mai

Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread Maziar Parsijani
Hi, Thanks for your answer.I used your answer like this : SELECT * FROM table2 JOIN table1 on table1.rowid = table2.rowid WHERE table1.name LIKE '%smth%' Because without the "table1 on" statement it didn't work . On Fri, Sep 14, 2018 at 10:29 PM Simon Slavin wrote: > On 14 Sep

Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread David Raymond
To: SQLite mailing list Subject: Re: [sqlite] [SQLITE]select from a table and use its data to select from another one On 14 Sep 2018, at 6:50pm, Maziar Parsijani wrote: > I have 2 tables with the same rowid now I want to : > select rowid from table1 where table1 like "%smth%" &g

Re: [sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread Simon Slavin
On 14 Sep 2018, at 6:50pm, Maziar Parsijani wrote: > I have 2 tables with the same rowid now I want to : > select rowid from table1 where table1 like "%smth%" > select * from table2 where rowid =(selected rows before) > > I mean if I could do it in a same query. This is what JOIN is for. S

[sqlite] [SQLITE]select from a table and use its data to select from another one

2018-09-14 Thread Maziar Parsijani
Hi, I have 2 tables with the same rowid now I want to : select rowid from table1 where table1 like "%smth%" select * from table2 where rowid =(selected rows before) I mean if I could do it in a same query. ___ sqlite-users mailing list sqlite-users@maili

Re: [sqlite] `SELECT FROM ( subquery ) alias` seems to require `AS`

2016-08-25 Thread Richard Hipp
On 8/24/16, Richard Newman wrote: > sqlite> SELECT DISTINCT inner.uri AS uri FROM >...> (SELECT DISTINCT v AS uri FROM bar) >...> inner; > Error: near ";": syntax error > "Inner" is a keyword. You can put it in double-quotes to let SQLite know that you want to use it as an identifier, or

Re: [sqlite] `SELECT FROM ( subquery ) alias` seems to require `AS`

2016-08-25 Thread Adam Devita
Please retry your test without using keywords like "inner" as an alias for something. regards, Adam On Wed, Aug 24, 2016 at 11:26 PM, Richard Newman wrote: > Hi folks, > > According to my reading of < > https://www.sqlite.org/syntax/table-or-subquery.html>, a table alias for a > subquery does n

[sqlite] `SELECT FROM ( subquery ) alias` seems to require `AS`

2016-08-25 Thread Richard Newman
Hi folks, According to my reading of < https://www.sqlite.org/syntax/table-or-subquery.html>, a table alias for a subquery does not require an AS; that is, SELECT noo.foo FROM ( SELECT … FROM bar ) AS noo is equivalent to SELECT noo.foo FROM ( SELECT … FROM bar ) noo This does not seem to be

Re: [sqlite] Select * from tablename results in an exception

2010-03-31 Thread Burnett, Joe
: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Wednesday, March 31, 2010 11:30 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Select * from tablename results in an exception > I had issues in my SQLite DB schema - VARCHAR

Re: [sqlite] Select * from tablename results in an exception

2010-03-31 Thread Pavel Ivanov
Tim Romano > Sent: Tuesday, March 30, 2010 5:20 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Select * from tablename results in an exception > > http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/27aec61 > 2-5

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Tim Romano Sent: Tuesday, March 30, 2010 5:20 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Select * from tablename results in an exception http

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Tim Romano
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/27aec612-5ca4-41ba-80d6-0204893fdcd1 Maybe related. Regards Tim Romano ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 2:55pm, Burnett, Joe wrote: > Your understanding is correct. However, I used the SQLite Admin tool and > the select * query > was successful after the table was populated and the program exited. > > Isn't that the same thing? Okay, if I understand your result, you have a sp

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
t: Re: [sqlite] Select * from tablename results in an exception On 30 Mar 2010, at 2:01pm, Burnett, Joe wrote: > I am using SQLite in a C# .NET application. I am inserting into tables > without any issues as confirmed by the SQLite Admin tool. > However, later in the application, I wan

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 2:01pm, Burnett, Joe wrote: > I am using SQLite in a C# .NET application. I am inserting into tables > without any issues as confirmed by the SQLite Admin tool. > However, later in the application, I want to query the table where I > inserted the data, I get the following excep

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
e.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, March 30, 2010 9:23 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Select * from tablename results in an exception On 30 Mar 2010, at 2:01pm, Burnett, Joe wrote: >string sql =

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 2:01pm, Burnett, Joe wrote: >string sql = "select * from Table"; Can you use 'Table' as the name of a table ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listin

[sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
Hi All, I am using SQLite in a C# .NET application. I am inserting into tables without any issues as confirmed by the SQLite Admin tool. However, later in the application, I want to query the table where I inserted the data, I get the following exception: "Failed to enable constraints. One or mor

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-28 Thread Scott Hess
On Mon, Dec 28, 2009 at 8:19 PM, Dan Kennedy wrote: >> If you want the data for other purposes, you could almost implement a >> hack to get is.  For instance, "SELECT count(docid) FROM fts_table >> WHERE fts_table MATCH 'x';" is kind of close, and you could change the >> match to handle prefix stu

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-28 Thread Dan Kennedy
> If you want the data for other purposes, you could almost implement a > hack to get is. For instance, "SELECT count(docid) FROM fts_table > WHERE fts_table MATCH 'x';" is kind of close, and you could change the > match to handle prefix stuff. Unfortunately, the fts vtable cursor > sets up a ful

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-28 Thread Scott Hess
My comments around performance might be overly pedantic, I don't know. For the broad fts implementation, the cost of merging data from multiple segments is higher than one would like it to be, but the advantages gained are significant enough to make it overall worthwhile. One could implement a te

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-24 Thread Max Vlasov
Thanks, Scott, I see problems with regular tables, but to discuss in details I have to make some tests comparing the approaches. I read once again the info about fts3 internals and would like to share new thoughts. Let's forget about "hit count". Although I mentioned google suggestions, it was ma

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-23 Thread Scott Hess
Doing this in the tokenizer is probably not great because you can't determine which of the tokens actually are in the database after accounting for deletes and updates. When I was last thinking about this problem, I think the best option looked like keeping a distinct token index with token_id sto

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-23 Thread Max Vlasov
Scott, thank, I see that the hit counts is the next level of complexity. As for tokens, I think that if one really needs to implement this feature, there would be a possible solution in allowing the program to "mirror" tokenized" data. Right now as I see it would be possible (if a custom tokenizer

Re: [sqlite] SELECT from fts3 tokens, is it possible?

2009-12-23 Thread Scott Hess
The tokens are all there, so it is "theoretically possible". But the performance would be very bad because it would require iterating over all the segment data, basically a worst-case query. Even then, you wouldn't have information about hit counts. To do it reasonably would require redesigning

[sqlite] SELECT from fts3 tokens, is it possible?

2009-12-23 Thread Max Vlasov
Is it theoretically possible to allow some kind of sql SELECT query operations with tokens? Particulary one could implement suggestions similar to Google suggestions in Web search, when for example "some" typed in a search box and a listbox popped up with this database tokens starting with these l

Re: [sqlite] Select * from table where field = "value" does not work when "value" is also a field....

2009-10-14 Thread Simon Davies
2009/10/13 Hillebrand Snip : > I have a database with the following fields: > 1) Status (it will hold values like "Open", "Closed", "Submitted"... etc...) > 2) Closed (boolean field which contains 1 or 0) > > If i enter a query like:  Select * from Issues where Status != "Closed"  i > get all recor

[sqlite] Select * from table where field = "value" does not work when "value" is also a field....

2009-10-14 Thread Hillebrand Snip
I have a database with the following fields: 1) Status (it will hold values like "Open", "Closed", "Submitted"... etc...) 2) Closed (boolean field which contains 1 or 0) If i enter a query like: Select * from Issues where Status != "Closed" i get all records (even the ones with Status=Closed). I

Re: [sqlite] SELECT * from ?

2009-08-12 Thread David Bicking
On Thu, 2009-08-13 at 01:12 +0100, Simon Slavin wrote: > On 12 Aug 2009, at 11:35pm, Igor Tandetnik wrote: > > > Bill Welbourn > > wrote: > >> I am new to the forum and have a question regarding querying data > >> from a table, where the table name is random. For example, I have a > >> database p

Re: [sqlite] SELECT * from ?

2009-08-12 Thread Simon Slavin
On 12 Aug 2009, at 11:35pm, Igor Tandetnik wrote: > Bill Welbourn > wrote: >> I am new to the forum and have a question regarding querying data >> from a table, where the table name is random. For example, I have a >> database possessing upwards of 41 tables named, TAB10, TAB11,..., >> TAB50, an

Re: [sqlite] SELECT * from ?

2009-08-12 Thread Igor Tandetnik
Bill Welbourn wrote: > I am new to the forum and have a question regarding querying data > from a table, where the table name is random. For example, I have a > database possessing upwards of 41 tables named, TAB10, TAB11,..., > TAB50, and would like to query each table. Consider instead having a

[sqlite] SELECT * from ?

2009-08-12 Thread Bill Welbourn
Hi,   I am new to the forum and have a question regarding querying data from a table, where the table name is random.  For example, I have a database possessing upwards of 41 tables named, TAB10, TAB11,..., TAB50, and would like to query each table.   Question:  Within the C programming environ

[sqlite] SELECT * FROM Schdeule WHERE title LIKE '%%%'

2006-12-21 Thread LuYanJun
Hi guy Suppose there is table name Schedule and more than two records be stored. however, one filed name as title and its values contain '%' in one of both records , so then such SQL pharse: SELECT * FROM Schedule WHERE title LIKE '%%%' be given , then return both records NOT only one . exam

Re: [sqlite] select from commandprompt with output to file

2006-11-17 Thread John Stanton
written in C does it have the option to output to memory, say an array and produce the pointer to that memory, rather than a text file? RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 17 November 2006 15:04 To: sqlite-users@sqlite.org Subject: Re: [sqlite] s

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
t have the option to output to memory, say an array and produce the pointer to that memory, rather than a text file? RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 17 November 2006 15:04 To: sqlite-users@sqlite.org Subject: Re: [sqlite] select from commandprompt w

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
Dennis, Thanks for that. Will try it later and let you know. Definitely one I couldn't have figured out myself. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 17 November 2006 15:04 To: sqlite-users@sqlite.org Subject: Re: [sqlite] select from commandp

Re: [sqlite] select from commandprompt with output to file

2006-11-17 Thread Dennis Cote
RB Smissaert wrote: How would I run these 4 commands via a .bat file or via whatever means: cd c:\test\ReadCodes c:\test\Program\sqlite3 c:\test\ReadCodes\ReadCode.db" .output testfile.txt select * from readcode where read_code glob 'G2*'; It must be simple, but I can't see it. RBS, You n

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
Message- From: Dan Kennedy [mailto:[EMAIL PROTECTED] Sent: 17 November 2006 08:09 To: sqlite-users@sqlite.org Subject: Re: [sqlite] select from commandprompt with output to file What sqlite versions, OS etc.? This worked for me: $ sqlite3 SQLite version 3.2.8 Enter ".help" for in

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
01:15 To: sqlite-users@sqlite.org Subject: Re: [sqlite] select from commandprompt with output to file "RB Smissaert" <[EMAIL PROTECTED]> writes: > How would I run these 4 commands via a .bat file or via whatever means: > > cd c:\test\ReadCodes > c:\test\Program\sqli

Re: [sqlite] select from commandprompt with output to file

2006-11-17 Thread Dan Kennedy
What sqlite versions, OS etc.? This worked for me: $ sqlite3 SQLite version 3.2.8 Enter ".help" for instructions sqlite> create table abc(a, b, c); sqlite> .output out.txt sqlite> select * from sqlite_master; sqlite> .quit $ cat out.txt table|abc|abc|2|CREATE TABLE abc(a,

Re: [sqlite] select from commandprompt with output to file

2006-11-16 Thread Derrell . Lipman
"RB Smissaert" <[EMAIL PROTECTED]> writes: > How would I run these 4 commands via a .bat file or via whatever means: > > cd c:\test\ReadCodes > c:\test\Program\sqlite3 c:\test\ReadCodes\ReadCode.db" > .output testfile.txt > select * from readcode where read_code glob 'G2*'; I haven't been trackin

RE: [sqlite] select from commandprompt with output to file

2006-11-16 Thread RB Smissaert
Original Message- From: Kees Nuyt [mailto:[EMAIL PROTECTED] Sent: 16 November 2006 21:36 To: sqlite-users@sqlite.org Subject: Re: [sqlite] select from commandprompt with output to file Hi RBS, On Thu, 16 Nov 2006 19:56:36 -, you wrote: >How do I do this: >From the command pr

RE: [sqlite] select from commandprompt with output to file

2006-11-16 Thread RB Smissaert
Subject: Re: [sqlite] select from commandprompt with output to file Hi RBS, On Thu, 16 Nov 2006 19:56:36 -, you wrote: >How do I do this: >From the command prompt issue a simple select query to a specified database >and direct the output to a file. >I can see there is the .out

Re: [sqlite] select from commandprompt with output to file

2006-11-16 Thread Kees Nuyt
put tmp/master.html sqlite> SELECT 'Database schema'; sqlite> SELECT 'Report on database schema TESTtables'; sqlite> .mode html sqlite> .headers on sqlite> select * from sqlite_master order by type,name; sqlite> .mode list sqlit

[sqlite] select from commandprompt with output to file

2006-11-16 Thread RB Smissaert
How do I do this: >From the command prompt issue a simple select query to a specified database and direct the output to a file. I can see there is the .output FILENAME option, but nothing seems to happen. .output stdout works fine with output to the screen. Must be overlooking something simple her

[sqlite] Select from indexed table

2006-04-03 Thread Davide Guidotti
Hi! I have sqlite version 3.1.3, and Suse 9.3. i have a table (LOG) with about 500.000 records. The column "result" is a indexed column, if i make the select "select * from LOG where (result ="OK") limit 10;" it takes over 24 second to access all Values, instead with "select * from LOG where (r

[sqlite] Select from a Select

2003-11-08 Thread Brian Pugh
Hello, My current SQLite application is written with Pyxia's IBasic, and by nature of the database, is form based. This works well now I have applied all the speed tweaks I have picked up from this forum I have added a button to the form to show records in Listview format. This works OK as long

Re: [sqlite] Select from Select

2003-10-19 Thread Michael A. Cleverly
On Sun, 19 Oct 2003, Brian Pugh wrote: > How many records in a certain Postcode area (Zip code to our > US friends!); > How many of those have telephones (ie, the field is blank if > they don't have a telephone); > How many with telephones can be canvassed (I have a field called > Canvass that has

[sqlite] Select from Select

2003-10-19 Thread Brian Pugh
Hi, I would like to be able to run a query on my names and addresses database, returning the following: How many records in a certain Postcode area (Zip code to our US friends!); How many of those have telephones (ie, the field is blank if they don't have a telephone); How many with telephones ca