Re: [sqlite] SQLite query help pls

2010-10-17 Thread Germán Herrera
You want to strip a complete path + name and save them as separate
fields, or you already have it splitted and want to join them together ?

On 10/17/2010 09:26 AM, Dickie.wild wrote:
> 
> Hi All,
> 
> I was hoping for a little help, well little would be an understatement, I
> currently have a file location in a field and i would like to take all of it
> up untill the last / (folder) and copy it in to another column and then
> attach folder.jpg on the end. So the end result ends up being something like
> c:\rich\Eminem\folder.jpg
> 
> I have never used SQLite before and help would be great
> 
> R
> 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling Error

2010-10-16 Thread Germán Herrera
If I understand the question.. It seems that you have no main() on that
source file.

If you want to compile only (without linking), you should run:

g++ -c sqlite3.o sqlite3.c

and then link that .o to the object file that holds your main().

Regards!

On 10/16/2010 11:56 AM, Will Bonney wrote:
> Hello, I am new to this list.
> 
> 
> I am attempting to compile the amalgamation of SQLite3 and get the  
> following error:
> 
> 
> 
> 
> $ gcc sqlite3.c
> Undefined symbols:
>"_main", referenced from:
>start in crt1.10.5.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> $
> 
> 
> How do I get this to compile?
> 
> 
> Many thanks  -Will
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with aggregate query

2010-10-16 Thread Germán Herrera
So maybe this is done to relieve the parser for doing the semantic check,
and so improve query speed..

Well, if that's the reason, maybe is better that way.

Thanks. And sorry about the repost, it won't happen again.

Regards

On Sat, Oct 16, 2010 at 9:16 AM, Drake Wilson  wrote:

> Quoth Germán Herrera , on 2010-10-16 00:10:23
> -0300:
> > As you may know, both MySQL and SQL Server engines would refuse to run
> > the last query, indicating an error because not all columns come from
> > aggregate functions and there is no "group by" clause..
> >
> > Is this left on purpose?, can this behavior be switched? (already
> > searched in the Documentation, and in the list of pragmas and couldn't
> > find anything).
>
> I doubt it has to be "left on purpose"; in fact it's more the
> opposite.  I would think it's more work to detect queries that use
> combined aggregate and non-aggregate results in ill-specified ways,
> depending on how one's query compiler is built, so it's just a matter
> of an extra feature that was never implemented because there was no
> need for it.
>
> Is there a reason you want this type of query to raise an error?  Is
> it just a matter of a safety net, wanting to know when you're doing
> something that's not that well-defined?  The query is semantically not
> very good, but there are many other kinds of meaningless queries that
> are valid SQL; it's not really SQLite's job to check that for you.
>
> (I don't know what the SQL92 standard has to say on this, FWIW.)
>
>   ---> Drake Wilson
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with aggregate query

2010-10-16 Thread Germán Herrera
Anyone?

On 10/16/2010 12:10 AM, Germán Herrera wrote:
> Hi all
> 
> I found the following strange behavior. It's rather easy to stumble upon
> with:
> 
> sqlite> create table a(id,name);
> sqlite> insert into a values (1,'name1');
> sqlite> insert into a values (2,'name2');
> sqlite> select * from a;
> 1|name1
> 2|name2
> sqlite> select count(*), name from a;
> 2|name2
> sqlite>
> 
> As you may know, both MySQL and SQL Server engines would refuse to run
> the last query, indicating an error because not all columns come from
> aggregate functions and there is no "group by" clause..
> 
> Is this left on purpose?, can this behavior be switched? (already
> searched in the Documentation, and in the list of pragmas and couldn't
> find anything).
> 
> I'm kind of new in SQlite so please bare with my ignorance (and my poor
> english ;-)).
> 
> Thank you all for your help, and best wishes!
> German
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Problem with aggregate query

2010-10-15 Thread Germán Herrera
Hi all

I found the following strange behavior. It's rather easy to stumble upon
with:

sqlite> create table a(id,name);
sqlite> insert into a values (1,'name1');
sqlite> insert into a values (2,'name2');
sqlite> select * from a;
1|name1
2|name2
sqlite> select count(*), name from a;
2|name2
sqlite>

As you may know, both MySQL and SQL Server engines would refuse to run
the last query, indicating an error because not all columns come from
aggregate functions and there is no "group by" clause..

Is this left on purpose?, can this behavior be switched? (already
searched in the Documentation, and in the list of pragmas and couldn't
find anything).

I'm kind of new in SQlite so please bare with my ignorance (and my poor
english ;-)).

Thank you all for your help, and best wishes!
German
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users