Re: Re: [sqlite] Need help on build query.

2007-02-12 Thread Artem Yankovskiy
Thanks
--- [EMAIL PROTECTED] wrote:

> "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> > Artem Yankovskiy
>

> > wrote:
> > > I know about DROP TABLE.
> > > I have not knew when compatibility DROP TABLE
> and
> > > SELECT...
> > >
> > > DROP TABLE (select name from sqlite_master
> where...)
> > > did not work.
> > > Can I build resembling query?
> > 
> > No. You will have to run the select, store table
> names in memory, then 
> > build and run a separate DROP TABLE query for each
> table name.
> > 
> 
> Igor is correct - you cannot do that now.  But I
> have sometimes
> wondered if it would be nice to add an exec()
> function to SQLite
> that would recursively invoke its argument as an SQL
> script.
> For example:
> 
>SELECT exec('DELETE FROM ' || quote(name))
>  FROM sqlite_master
> WHERE ;
> 
> There would be security implications here, of
> course.  Clearly
> one would need to make sure that user-entered SQL
> (such as can
> be seen at http://www.sqlite.org/cvstrac/new) does
> not have access
> to the eval() function, just as it does not have
> access to the
> the load_extension() function.
> 
> --
> D. Richard Hipp  <[EMAIL PROTECTED]>
> 
> 
>
-----
> To unsubscribe, send email to
> [EMAIL PROTECTED]
>
-
> 
> 


Best regards,
Artem Yankovskiy







Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



Re: [sqlite] Re: Re: Need help on build query.

2007-02-11 Thread Artem Yankovskiy
It's a pity :(

--- Igor Tandetnik <[EMAIL PROTECTED]> wrote:

> Artem Yankovskiy
>

> wrote:
> > I know about DROP TABLE.
> > I have not knew when compatibility DROP TABLE and
> > SELECT...
> >
> > DROP TABLE (select name from sqlite_master
> where...)
> > did not work.
> > Can I build resembling query?
> 
> No. You will have to run the select, store table
> names in memory, then 
> build and run a separate DROP TABLE query for each
> table name.
> 
> Igor Tandetnik 
> 
> 
>
-
> To unsubscribe, send email to
> [EMAIL PROTECTED]
>
-----
> 
> 


Best regards,
Artem Yankovskiy







Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



Re: [sqlite] Re: Need help on build query.

2007-02-11 Thread Artem Yankovskiy
Hi Igor.
I know about DROP TABLE.
I have not knew when compatibility DROP TABLE and
SELECT...

DROP TABLE (select name from sqlite_master where...)
did not work. 
Can I build resembling query?
Thanks.

--- Igor Tandetnik <[EMAIL PROTECTED]> wrote:

> Artem Yankovskiy
>

> wrote: 
> > I like delete some of table.
> 
> DROP TABLE tableName;
> 
> http://sqlite.org/lang_droptable.html
> 
> Igor Tandetnik
> 
>
-
> To unsubscribe, send email to
> [EMAIL PROTECTED]
>
---------
> 
> 


Best regards,
Artem Yankovskiy







Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



[sqlite] Need help on build query.

2007-02-08 Thread Artem Yankovskiy
Hello.
I like delete some of table.
For example:
I can run query:
select name from sqlite_master where name like
'prefix_%';

Can I delete found tables?

Using only sql.
It's real?



Best regards,
Artem Yankovskiy







Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



Re: [sqlite] Running out of disk space.

2007-02-08 Thread Artem Yankovskiy
Hi.
You do not receive the error message until receive 0
free disk spaces.
When queryes are running in transaction, record in a
DB does not write, the journal-file is created only,
therefore you see your changes. As soon as you make
commit, there is a records of changes in a DB. During
this moment there can be an ending of an empty space
on volume, then sqlite will return an error and will
roll away changes.

--- Jeffrey Rennie <[EMAIL PROTECTED]> wrote:

> What happens, and/or what is supposed to happen when
> sqlite runs out of disk
> space?
> 
> In an extremely disk-space constrained situation, I
> create a bunch of
> tables, without any sqlite errors, and then later
> the tables are not found.
> I see the same thing when inserting rows: no error,
> but later look-ups don't
> find inserted rows.  I'd like to detect that the
> write to DB failed at time
> of write, not a later read.  I'm also doing the
> INSERTS and CREATE TABLES
> within a transaction, and again all the sqlite calls
> succeed, even the
> COMMIT TRANSACTION.  There are no other pending
> statements at the time of
> the COMMIT TRANSACTION.
> 
> I'm using version 3.3.4 on Windows.
> 
> Thanks,
> Jeffrey Rennie
> 


Best regards,
Artem Yankovskiy







Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



Re: [sqlite] selecting a random record from a table

2007-01-25 Thread Artem Yankovskiy
select * from table1 order by random(id) limit 1
?

--- P Kishor <[EMAIL PROTECTED]> wrote:

> 1. given a non-sequential id, select all the ids
> 2. grab a random id
> 3. select the row with that id.
> 
> is there a better way of accomplishing this, one
> that requires a
> single round-trip to the db?
> 
> -- 
> 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]
>
-----
> 
> 


Best regards,
Artem Yankovskiy







Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



Re: Re: Re: [sqlite] Sample dll using

2006-12-23 Thread Artem Yankovskiy
Thanks. :-)

--- Jay Sprenkle <[EMAIL PROTECTED]> wrote:

> On 12/22/06, Artem Yankovskiy
> <[EMAIL PROTECTED]> wrote:
> > Thanks!
> > Can at whom is small sample on C/С ++?
> 
> 
> some example code here:
> 
> SqliteImporter and SqliteReplicator: Command line
> utilities for Sqlite
> http://www.reddawn.net/~jsprenkl/Sqlite
> 


Best regards,
Artem Yankovskiy

   Yahoo!? 
 
 
  
Yahoo! ! 
http://ru.mail.yahoo.com 

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



Re: Re: [sqlite] Sample dll using

2006-12-22 Thread Artem Yankovskiy
Thanks!
Can at whom is small sample on C/С ++?


--- jose isaias cabrera <[EMAIL PROTECTED]> wrote:

> 
> http://www.dprogramming.com/enticeaddrbook.html
> 
> 
> 
> 
> - Original Message - 
> From: "Artem Yankovskiy" <[EMAIL PROTECTED]>
> To: <sqlite-users@sqlite.org>
> Sent: Thursday, December 21, 2006 7:51 PM
> Subject: [sqlite] Sample dll using
> 
> 
> > Hello!
> > Can I get sample source code for using DLL?
> >
> >
> > Вы уже с
> Yahoo!? 
> >
> Испытайте
> 
> >
> обновленную
> 
> > и 
> >
> улучшенную
> 
> > Yahoo! Почту!
> > http://ru.mail.yahoo.com
> >
> >
>
-
> > To unsubscribe, send email to
> [EMAIL PROTECTED]
> >
>
-
> > 
> 
> 
>
---------
> To unsubscribe, send email to
> [EMAIL PROTECTED]
>
-
> 
> 


Best regards,
Artem Yankovskiy

   Yahoo!? 
 
 
  
Yahoo! ! 
http://ru.mail.yahoo.com 

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



[sqlite] Sample dll using

2006-12-21 Thread Artem Yankovskiy
Hello!
Can I get sample source code for using DLL?


   Yahoo!? 
 
 
  
Yahoo! ! 
http://ru.mail.yahoo.com 

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



Re: [sqlite] combining multiple queries

2006-12-15 Thread Artem Yankovskiy
Hi Jason.
Can make is easier so:
SELECT * FROM film WHERE 
genre IN ("comedy", "drama")
 AND tag IN ("bill murry", "scarlett o'hara"
,"silly");

--- jason schleifer <[EMAIL PROTECTED]> wrote:

> heya folks,
> 
> I'm trying to figure out the proper syntax for doing
> a query of something
> like this:
> 
> I have two different types of things that people
> will be querying for, and I
> want to do an OR on each, but and AND between them..
> 
> So let's say i've got a table that looks like this:
> 
> Create TABLE film (id INTEGER PRIMARY KEY, genre
> VARCHAR, tag VARCHAR):
> 
> Genre can be of whatever genre the user wants..
> comedy, drama, etc.
> tag is a list of words that are separated by ;..
> "kennedy;marilyn;funny;"
> etc
> 
> If the user doesn't specify either genre or a tag
> when they're querying, I
> want to return the whole list of films (that's an
> easy one).
> 
> If the user specifies one or more tags, I want to be
> able to return all
> moves that match EITHER tag.. for example, if htey
> specify "carrey" and
> "snow", it should return all movies that have either
> carrey or snow in the
> list.
> 
> If they then specify a genre, I want it to return
> ONLY the movies in the
> specified genre that match carrey or snow.
> 
> Then (just to make it more complicated), if they
> specify two genres, it
> should return all movies in either of those genres
> that match either carrey
> or snow.
> 
> Does this make sense?
> 
> I know how to string a whole bunch of LIKEs together
> with an OR to get it to
> work so you could get it to match a genre or a tag..
> but how do I do
> something like:
> 
> SELECT * FROM film WHERE (genre = "comedy" OR genre
> = "drama") AND (tag =
> "bill murry" OR tag =  "scarlett o'hara" OR tag =
> "silly");
> 
> any help is greatly appreciated..
> 
> cheers!
> -jason
> -- 
> jason schleifer
> ah-ni-may-tor | weirdo
> http://jonhandhisdog.com/
> 


   Yahoo!? 
 
 
  
Yahoo! ! 
http://ru.mail.yahoo.com 

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



[sqlite] Ответ: Re: [sqlite] count up how much an free space on DB

2006-12-14 Thread Artem Yankovskiy
Thanks Richard.
I will try.

--- [EMAIL PROTECTED] пишет:

> Artem Yankovskiy <[EMAIL PROTECTED]> wrote:
> > Question, whether probably to count up how much an
> > free space there is in this a DB?
> > 
> 
> If the first byte of the database file is called
> byte 0,
> then bytes 16 and 17 form a 16-bit big-endian
> integer
> which is the number of bytes per page.  Bytes 36-39
> form
> a 32-bit big-endian integer which is the number of
> unused
> pages in the database.  If you multiple those two
> numbers
> together, you will get the amount of reusable free
> space
> in the database file.
> 
> --
> D. Richard Hipp  <[EMAIL PROTECTED]>
> 
> 
>
-
> To unsubscribe, send email to
> [EMAIL PROTECTED]
>
-
> 
> 








Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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



[sqlite] count up how much an free space on DB

2006-12-14 Thread Artem Yankovskiy
Hello.
There is a DB. auto_vacuum is not used. One of tables
of a database contains 500 records. 
We for example delete from it 300 records. The place
in a database was released, but the size of a file has
not decreased how is not set auto_vacuum.
Question, whether probably to count up how much an
free space there is in this a DB?








Вы уже с Yahoo!? 
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com

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