Stephan Beal Sent: Saturday, November 07, 2015 3:54 AM > On Fri, Nov 6, 2015 at 6:50 PM, Nelson, Erik - 2 < > erik.l.nelson at bankofamerica.com> wrote: > > > I have a user-defined function something like > > > > void quarter_sqlite3(sqlite3_context *context, int argc, > sqlite3_value > > **argv); > > > > for each sqlite3_value being passed in, it would sometimes be helpful > > to have the associated field (if any) that the value is associated > with. > > > > Is there any way to retrieve that? > > An idea came to mind, but i'm not sure if it's usable for your case > (it's only potentially useful if the queries are static, not entered by > end > users): UDFs are variadic, so you could pass an optional 2nd parameter > with any information as a string to the final parameter, e.g.: > > select quarter(t.a, 't.a'), quarter(4,'four') from t;
That's not a bad idea, but in my case it's a user query so it doesn't work so well, as you mention. ---------------------------------------------------------------------- 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.

