Is this some mental exercise? Why can't you do this in the calling code rather than some funky SQL select? Or add a custom function?
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Mikael Sent: Saturday, July 20, 2013 8:54 AM To: General Discussion of SQLite Database; luu...@gmail.com Subject: Re: [sqlite] Anything like "select 7 as a, 8 as b, a / b as c; " possible whatsoever? Ah I realize now I didn't write it out in the example, but by thing and thing2 I just allegorically wanted to represent a *very complex* subselect, so here we go more clearly: Inlining this subselect's SQL expression in the "A / B" part would make it need to execute once more, which would make it take double the time, which would be really long. So again, SELECT id, (SELECT [very complex subselect here, that uses categories.id as input]) AS a, (SELECT [another very complex subselect here, that uses categories.id as input]) AS b, a / b AS c FROM categories ORDER BY c; any way to do it whatsoever? Thanks :)) Mikael _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users