Can anyone tell me set-by-step how to add a CURRENT_USER() function to
SQLLITE that will return the current linux login?
I'm not a C programmer and I have JUST picked up SQLite.
I am trying to convert a Sybase schema to SQLite. The schema has
triggers triggers but so far they convert in a
if comments is null then comments||? is also null, try this:
comments=coalesce(comments,'')||?
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Gert Cuykens
Sent: Sunday, January 18, 2009 10:15 AM
To: sqlite-users@sqlite.org
You are comparing the values as strings.
Instead, format your dates as -MM-DD and use the date function to
convert strings to dates for comparison:
select date from envelope where date > date('2009-01-20') limit 3;
here are some examples:
sqlite> select date('2009-07-01')
ice if it understood some other formats, too, such as 02-JAN-09 or
11/17/2004...
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Hoover, Jeffrey
Sent: Wednesday, January 21, 2009 10:35 AM
To: General Discussion of SQLite Database
Subject:
...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: Wednesday, January 21, 2009 10:57 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date datatype
Hoover, Jeffrey <jhoo...@jcvi.org> wrote:
> You are comparing the values as strings.
>
> Instead, format your dates as -MM-DD and use th
that's what date masks are for..
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: Wednesday, January 21, 2009 10:56 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date datatype
Hoover, Jeffrey <j
Use the min function (since they are all have the same value)
-Jeff
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of johnny depp
(really!)
Sent: Tuesday, February 17, 2009 3:44 AM
To: sqlite-users@sqlite.org
Subject: [sqlite]
use the coalesce function
coalesce(xxx,'A') returns 'A' if xxx is null, otherwise returns the
value of xxx (but remember that '' is NOT null in SQLite).
coalesce((select y_value from y where y_id = x_id),'darn')
replaces your case statement
-Original Message-
From:
Assumming this is only one row in tbl2 where name='Joe'...
this should work:
SELECT * FROM tbl1
WHERE description='someval'
AND foreign_key_id=(select id from tbl2 where name='Joe');
this is better:
select tbl1.* from tbl1, tbl2
where tbl1.description='someval'
AND tbl2.name='Joe' and
I think its because sqlite (and most rdbms's) expect literal strings to
be enclose in ' not ".
I think sybase is an except, accepting either.
In SQLite you use " to enclose table/column names that contain
non0standard characters or where object id is case sensitive, such as
select "grant#" from
]
On Behalf Of Dermot
Sent: Wednesday, March 18, 2009 12:05 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Newbie question
2009/3/18 Hoover, Jeffrey <jhoo...@jcvi.org>:
>
> Assumming this is only one row in tbl2 where name='Joe'...
>
> this should work:
&g
is autocommit on?
try adding a manual commit.
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Olivier FAURAX
Sent: Thursday, March 19, 2009 10:56 AM
To: General Discussion of SQLite Database
Subject: [sqlite] What am I doing
Wouldn't a period VACUUMing of the database alleviate fragmentation?
- Jeff
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Konrad J Hambrick
Sent: Tuesday, June 16, 2009 1:43 PM
To: General Discussion of SQLite Database
to run before a backup or something, if your
application would be prone to this sort of fragmentation.
Wes
On Tue, Jun 16, 2009 at 1:44 PM, Hoover, Jeffrey<jhoo...@jcvi.org>
wrote:
> Wouldn't a period VACUUMing of the database alleviate fragmentation?
&
Maybe if you write-protected the file before starting the copy...
My guess is that the process that connects to do the query opens the
file in read/write mode causing the operating system to think someone is
trying to write to the file. So the OS tries to keep a copy of the data
being read by
Why not just make the file read-only before copying it, then restoring
write-access when the copy finishes?
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Stan Bielski
Sent: Tuesday, July 07, 2009 6:39 PM
To: General
if your are using Perl you can "bulk insert" the data...
.
.
.
use DBI;
our $errorMessage;
.
.
.
my @mydata = ();
{
my @myrow = (1,1);
push @mydata, \...@myrow;
}
{
my @myrow = (2,2);
push @mydata, \...@myrow;
}
{
(apologies, I had a typo in my code sample, here is a correction)
if your are using Perl you can "bulk insert" the data...
.
.
.
use DBI;
our $errorMessage;
.
.
.
my @mydata = ();
{
my @myrow = (1,1);
push @mydata, \...@myrow;
}
{
I saw something about an ODBC module for SQLite.
Could you workaround the PHP-SQLite issues via ODBC?
-Jeff
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Fred Williams
Sent: Friday, September 11, 2009 4:24 PM
To: General
Could you be omitting the database commit?
Try adding an explicit commit after your inserts.
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kavita Raghunathan
Sent: Tuesday, September 22, 2009 5:59 PM
To: sqlite-users
Isn't most of the complexity in the software?
Representing a tree is fairly simple, it just requires a foreign key in
the table referencing the primary key of the same table...
Create table tree_node (
node_id integer primary key,
distance_from_root integer not null,-- 0
I am trying to import a tab delimited file into a table containing 21 columns.
It fails on this record
Sapurv10037426m 176 RPS-BLAST(BLASTP) cdd gnl|CDD|239293
72 159 1 89 33.756.5174 70.792
cd02995, PDI_a_PDI_a'_C, PDIa family,
22 matches
Mail list logo