Yannick DuchĂȘne Sent: Wednesday, December 20, 2017 5:23 PM

>I wonder is there is a way with SQLite3, to reuse a often used and
>moderately long common table expression without the need to copy/paste it in
>every query text it is used in.

I use a C preprocessor for this and pass the queries through that on their way 
to the engine so a user might write something like

#define LONG_EXPRESSION  some very long expression

select LONG_EXPRESSION from somewhere;

select LONG_EXPRESSION from somewhere_else;


----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to