Hi,
this seems like correct SQL to me. SQLite should execute it.
Doesn't it work?
Martin
Am 08.08.2011 07:50, schrieb William Canfield:
> Hi,
> I am having trouble writing a select statement. What I want to do is this:
>
> SELECT * FROM customers WHERE NOT EXISTS (SELECT * FROM orders WHERE
>
Hi,
i apologize beforehand if my post does not answer your question
directly. It seems to me that you may be missing a basic concept.
Data in an SQL table is never sorted in itself. So, you can not sort a
table before you query it.
If you select data without an "order by" - clause, the order
Hi,
you can look at the changes doumented here
http://www.sqlite.org/changes.html
and determine if they are beneficial for your application.
Also, my own application runs faster with the newest version (I upgraded
from version 3.2.5)
Martin
Am 27.06.2011 09:48, schrieb Hoang Linh Duong:
>
Hi,
make sure you have an index on category and distance, like
create index MyIndex on Location (category, distance)
Because many records fulfill the category=17 condition, and if database
size is an issue, an index only on distance might help also.
Martin
Am 14.06.2011 13:01, schrieb
Hello Sridhar,
please tell us more: what interface are you using? what OS?
SQLException is not a part of the sqlite library, so obviously you use
an additional layer.
Martin
Am 08.06.2011 16:44, schrieb Sridhar Polavarapu:
> Appreciate if anyone can help me.
>
> Thanks
> Sridhar
>
> On
Am 08.06.2011 16:37, schrieb Marco Bambini:
> Thanks Martin and Richard, solution was so simple that I think to need a time
> break today.
No, an order by does not make any sense here, because the result set
contains exactly one row.
> Should I add an ORDER BY rowid clause at the end of the
Hi,
select count(*) from foo where rowid < X
Martin
Am 08.06.2011 16:18, schrieb Marco Bambini:
> I have a table foo with N rows and I want to know the offset of the row with
> rowid X inside that table.
> What query/strategy should I perform?
>
> I assume that a brute force algorithm should
Hi,
you cannot bind the name of a table. Bind variables only work for Values
in the database, like you used in the VALUES('1', ?) - clause.
Names of tables, columns or other items of the schema must be written in
the sql statement.
You will have to build your statement (using sprintf() or
Hi,
select a.ID
from a
join b on b.aID = a.ID
where b.user = 'MyUser'
The join is an inner join, so that only rowa of table a are selected
where a rocord in b exists. This seems to be what you want.
Martin
Am 21.01.2011 12:33, schrieb Ian Hardingham:
> Hey guys.
>
> This is just an
Hi,
this is the expected behaviour.
See http://www.sqlite.org/lang_corefunc.html
"The ltrim(X,Y) function returns a string formed by removing any and all
characters that appear in Y from the left side of X. If the Y argument
is omitted, ltrim(X) removes spaces from the left side of X. "
The
Hi,
the condition in your query
select achr,bchr from c where achr=bchr
involves 2 columns of the table. In this case, an index is useless.
If you do
select achr,bchr from c where achr='foo'
then the index will be used.
Martin
Am 15.10.2010 15:09, schrieb Black, Michael (IS):
> Ok
Hello Gerald,
i think you should tell us more about what you are trying to do and add
some C code.
what do you mead by "return value"? What functions do you call? Do you
know that you have to get the selected value by calling a function like
sqlite3_column_text ?
Martin
Am 30.09.2010
Am 12.08.2010 13:04, schrieb TeDe:
> Am 12.08.2010 12:16, schrieb Martin.Engelschalk:
>> Am 12.08.2010 12:08, schrieb TeDe:
>>>Hello,
>>>
>>> I want to import a big subset of data from one database to a new one. I
>>> attach the two databases t
Am 12.08.2010 12:08, schrieb TeDe:
> Hello,
>
> I want to import a big subset of data from one database to a new one. I
> attach the two databases together and use
>
> insert into customers select * from source.customers where name LIKE 'x%'
>
> I can approximately calculate, how big the new
Am 09.08.2010 16:57, schrieb Oliver Peters:
> [...]
>
> To my mind the simplified question is:
>
> why returns the "INSERT INTO a" not an error while the "INSERT INTO b" does?
> How
> corresponds this behaviour to the concept of FOREIGN KEYS?
>
> I wrote the code into file.sql (encoding=utf8,
Hi,
try this:
select coalesce(min(length), 0) from t where id = ?
Martin
Andrea Galeazzi schrieb:
> Hi All,
> I've got a table T made up of only two fields: INT id (PRIMARY KEY) and
> INT length.
> I need a statement in order to yield 0 when the key doesn't exist. At
> this moment the query
Hi,
a sqlite database is a file, you can get its size using OS calls.
It is not possible to create a database with an initial size, because
the file grows dynamically when you insert data.
To avoid fragmentation, I also looked for a way to allocate empty space
inside the database file when
Hi,
sqlite works like any other database I know, and afaik conforms to sql
standard.
Martin
nick huang schrieb:
> Hi Igor,
>
>
>
> You are absolutely right that its type is NULL and min(id) returns 0 as I use
> sqlite_column_int64 to retrieve data. However, isn't it confusing that the
>
Hi,
this requires a simple join:
select siterate.name, sitetype.name
from siterate
join sitetype on sitetype.id = siterate.type
where sitetype.status!=1
This supposes that for every entry in siterate, there exists an entry in
sitetypes with sitetype.id = siterate.type
It seems to me that you
Hello Raghu,
it seems to mee that you misunderstand the backup api. This api does not
"know" or care for your schema and tables, but backups the database
block for block. In this sense, the api does not know "old" contents and
can not add "new" content.
The backup api can not help you in your
Hi,
you can use the online backup api described here:
http://www.sqlite.org/backup.html
Martin
Andres Velasco Garcia schrieb:
> Hello,
>
> Do any of you know if it is possible to backup an in-memory database to disk
> so it can be recovered later from disk.
>
> Thanks
>
> Andres Velasco
> M:
Hi,
The sorting used by default in sqlite uses normal strcmp - like comparison.
This problem has been discussed several times in the mailing list:
perhaps you want to search the archive.
You will have to write your own collation, perhaps using the ICU.
See
Hi,
see http://www.sqlite.org/lang_attach.html
you attach a second database, giving it a name, and prepend this name to
the table name.
Martin
Zhenyu Guo schrieb:
> Hi guys,
>
> I have multiple sqlite databases in hand, and I would like to perform the
> following several tasks:
>
> . two
Hi,
Does the user under which the application runs have write permission on
the Directory the database resides in?
Are you sure that the segfault occurs inside sqlite and not in your own
code?
Martin
Pramoda M. A schrieb:
> Hi All,
>
>I am working on Fedora 10. Using C interfaces, I am
Hi,
if you are talking about a feature request: Oracle supports sql syntax
to enable or disable a certain trigger (as opposed to all triggers as
you suggested):
ALTER TRIGGER DISABLE
or
ALTER TRIGGER ENABLE
This would be nice.
Martin
Michal Seliga schrieb:
> hi
>
> attached is patch which
Hi,
type names do not matter in sqlite, see http://www.sqlite.org/datatype3.html
Martin
Kermit Mei schrieb:
> Hello, I'm a newbie for sqlite3, I hope somebody can tell me what's the
> different of TEXT and VARCHAR. Does TEXT can save arbitrary characters,
> but VARCHAR? Which is better, then?
Hi,
what do you mean by "command"? The command line tool takes commands
entered by the user, such as SQL - statements. These do not have
returncodes. If an error occurs, the command line tool will print out
the error message.
The functions of the sqlite3 library have returncodes, but they can
Hi,
First, you have to declare the index as unique:
CREATE UNIQUE INDEX i_data ON data (num, di, time1);
or - depending on your database design, declare a primary key with these
three fields.
Second, the error message says it all: You supplied three column -
names, but 6 values.
Martin
Hi,
i imagine that your problem has nothing to do with your driver.
Have you looked at http://www.sqlite.org/faq.html#q5 ?
Martin
Laurent Burgy schrieb:
> Hi,
> I was using sqlite with only one java process (using the sqlitejdbc driver)
> and everything was ok... now i'm trying to run several
Hi,
select * from sqlite_master;
Martin
PS.: Please provide a subject which summarises your question.
Manasi Save schrieb:
> Hi All,
>
> Can anyone help me out with the command to see the SQLite table defination
> on command-line SQLite application.
>
Hello Brian,
you do not need a VALUE keyword in this case.
INSERT INTO "subscribers_new"
--VALUES <- remove this
SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;
See the syntax diagram for the insert command:
http://www.sqlite.org/lang_insert.html
Martin
Brian
Hi,
from the website http://www.sqlite.org/oldnews.html:
The file format for version 3.3.0 has changed slightly to support
descending indices and a more efficient encoding of boolean values.
SQLite 3.3.0 will read and write legacy databases created with any prior
version of SQLite 3. But
Hi,.
baxy77bax schrieb:
> hi my question is : if i create table that contains primary key like;
>
> create table TEST (field1 varchar not null primary key);
>
> do i need to create index on it or not?
>
Yes, the primary key is indexed
> and is it better to create table with a primary key and
Hi,
see sqlite3_bind_null:
http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob
Martin
Andrea Galeazzi schrieb:
> Hi All,
> I'm developing an application which relies on sqllite as back-end. Now
> I face to this problem: I've got a form that allows the user to fill a
> lot of fields,
Hi,
what is your "DOS Prompt"? There are "command.com" and "cmd.exe". Try
using "cmd.exe".
Martin
Richard Hardwick schrieb:
>> selecting the UNBLOCK button from the window displayed, and unzip and
>>
> Well I dont seem to have an unblock button
> Here is what I did
>
> I downloaded
>
Hi,
no, you habe 13 placeholders and one string constant '?' on position 9.
You do not need to include the ? in quotes if the value you want to bind
is a string.
Martin
hussainfarzana schrieb:
> Yes,the SQL prepared statement has got 14 placeholders.
>
> The statement is "INSERT INTO
Hi Jeffrey,
use something like this:
struct passwd *who;
if ((who = getpwuid(getuid ())) != NULL)
{
oUserName = who->pw_name;
}
where oUserName is the desired result.
See http://www.sqlite.org/capi3ref.html#sqlite3_create_function how to
define your function.
Hello Dan,
yes, you are right, Thank you.
Is there a reason for this?
martin
Dan schrieb:
> On Jan 9, 2009, at 9:43 PM, Martin.Engelschalk wrote:
>
>
>> Hello list,
>>
>> I definied a collation and used it in the order by - clauses of
>> queries.
>> I
Hello list,
I definied a collation and used it in the order by - clauses of queries.
In one query, sqlite calls the collation function, and in the other
query, it does not (i checked by inserting a printf inside the collation
function).
The queries differ only in the order by - clause.
This
Hi Pierre,
you can open both database files at the same time and using the same
connection: Look at the attach - Command:
http://www.sqlite.org/lang_attach.html
You can then use both databases in the same statement (insert into
MyTable (... columns ...) select ... columns ... from
Hi,
My idea would be a to define a function which drops the trigger and
returns some dummy value and call ist like this:
SELECT MyDropFunction(name) from trigger_status where status = 1
However, i do not know if this will work.
Martin
timdbu...@gmail.com schrieb:
> Hi,
> Is there any way
regarding text and number.Can I assume the size
> of number and text as unlimited.
>
> Regards,
> G.Satish.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Martin.Engelschalk
> Sent: Wednesday, December 10, 2008 5:45 PM
> To: General D
Hi,
See http://www.sqlite.org/limits.html
Martin
Satish schrieb:
> Hi Igor,
>
> Can I know the Maximum size of Record in sqlite or Can I
> know the maximum size of NUMBER,TEXT and BLOB Data types.
>
>
>
> Regards,
>
> G.Satish.
>
>
Hi,
i remember the posts you mention, and I know these error reports from
valgrind. I get them outside of sqlite also, and have learned to ignore
them.
Martin
Kent Dahl schrieb:
> Hi.
>
> After running valgrind on my program that is using sqlite (3.6.6.2,
> statically linked on Linux, Ubuntu
Hello Rachmat,
by creating one and using a fitting where- or order-by - clause.
See http://www.sqlite.org/lang_createindex.html
perhaps you would like to ask you question with a litte bit morte detail?
Martin
Rachmat Febfauza schrieb:
> how to make sqlite use index?
>
>
>
>
>
Hi,
text constants have to be set between single quotes:
insert into sometable values ( 5 , 'text' )
If the text contains a single quote, double it:
insert into sometable values ( 5 , 'Don''t do this' )
Martin
Mauricio schrieb:
> Hi,
>
> I would like to
>
> insert into sometable values (
Hi,
sqlite supports unicode. Internally, thext is stored in UTF-8 or UTF-16,
depending on sqlite3_open or sqlite3_open16, respectively.
See http://www.sqlite.org/c3ref/funclist.html,
There functions named sqlite3_xxx16 are described , which take UTF-16 as
arguments.
Martin
[EMAIL PROTECTED]
hi,
attachments do not reach this list, please specify the error.
Martin
AVINASH MITTAL schrieb:
>
> Hi,
>
> while executing tests for amalgamation for version 3.6.5 i got this error,
> can somebody help me in this regard
>
> Regards
> ___
>
Hello Luigi
sqlite cannot be installed or run, but only compiled and inked into an
application. There is no server.
See http://www.sqlite.org/about.html
Martin
[EMAIL PROTECTED] schrieb:
> I have been trying to understand if and how it is it possible for me
> to install SQLite, but due to my
Hello Hariom,
- use single quotes around text constants: select * from my_table where
Primarykey='google.com'
- use sqlite3_prepare and sqlite3_step to select data. First call
sqlite3_prepare for your statement and then sqlite3_step in al loop
until it returns SQLITE_DONE
- It is not an error
Hi all,
i create and fill database files which reach quite a large size after a
while, because i only add data and never remove it.
The database files themselves become quite fragmented on the disk.
Because I can in many cases calculate in advance the size to which the
file will grow, i would
Hi,
look at the replace() - Function at
http://www.sqlite.org/lang_expr.html#corefunctions
and use a statement like
update Aircraft set OperatorFlagCode = replace(OperatorFlagCode,
'~','-') where ... OperatorFlagCode like '%~%'
Martin
> Hi All,
>
> I need to change all occurances of a
Hi,
there is a pragma: PRAGMA read_uncommitted = 1;
You can select the uncommitted data and show ist before commit.
Have a look here: http://www.sqlite.org/pragma.html
Martin
Alex Katebi schrieb:
> Hi All,
>
> Let's say I start a transaction and do bunch of insertions etc. Before my
> commit I
Hello Marten,
do this:
insert into persons(name, birthday) values( ?, date(?))
And bind the string '1964-04-01'
Martin
Marten Feldtmann schrieb:
> I'm not sure how to use a function call in a prepared statement:
>
> insert into persons(name, birthday) values( ?,?)
>
> how to I bind the value
54 matches
Mail list logo