Re: [sqlite] 'no such column' error returned in a CASE statement

2010-11-03 Thread Ioannis Epaminonda


Pavel Ivanov-2 wrote:
> 
> 
> Yes, it's expected. Column aliases are visible only in GROUP BY/ORDER
> BY/HAVING clauses and outer selects. All other places should use exact
> column expression instead.
> 
> Pavel
> 
> 

Ah, thanks Pavel for the clarification, now it makes sense.
This is a bit inconvenient but i guess i can use a VIEW for the second
select.

I noticed that the same applies for aggregate functions in the select
statement.

I was searching for some documentation in the sqlite site but didn't find
anything so i guess this is defined in the SQL standard.


-- 
View this message in context: 
http://old.nabble.com/%27no-such-column%27-error-returned-in-a-CASE-statement-tp30113686p30123189.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] 'no such column' error returned in a CASE statement

2010-11-02 Thread Ioannis Epaminonda

The following error 'no such column: A' is returned when i execute the
following statement.

SELECT 'test' as A,CASE WHEN A = 'test' THEN 'true' ELSE 'false' END as
ERRVAL

Is this the expected result or should the generated column be available to
the case statement.
Thanks.

-- 
View this message in context: 
http://old.nabble.com/%27no-such-column%27-error-returned-in-a-CASE-statement-tp30113686p30113686.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite3_create_function_v2 not available for extensions

2010-10-10 Thread Ioannis Epaminonda

sqlite3_create_function_v2 function is not defined in sqlite3ext.h hence not
available for use in extensions.
-- 
View this message in context: 
http://old.nabble.com/sqlite3_create_function_v2-not-available-for-extensions-tp29926215p29926215.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Mistake in documentation and question

2010-08-09 Thread Ioannis Epaminonda

In page http://www.sqlite.org/datatype3.html
under section 3.2 Affinity Of Comparison Operands 2nd bullet point should
read:
An expression  "CAST(expr AS type)"  instead of "CAST(expr TO type)"

In addition a quick question.
Is there a way to perform a division of two columns (real type) and force
the result to be presented/rounded in 2 decimal places ?

Thanks
-- 
View this message in context: 
http://old.nabble.com/Mistake-in-documentation-and-question-tp29387429p29387429.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users