Re: [sqlite] Can a custom SQL function return NULL?

2011-01-03 Thread Duquette, William H (318K)
On 12/22/10 12:46 PM, "Richard Hipp" wrote: > What if the API included a function null(x) that > returns NULL if x is the "nullvalue" string specified with > [$db nullvalue], and x otherwise? > You mean the "nullif()" function? http://www.sqlite.org/lang_corefunc.html#nullif It's amazing how you

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Richard Hipp
On Wed, Dec 22, 2010 at 1:41 PM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > On 12/22/10 10:35 AM, "Richard Hipp" wrote: > > On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < > william.h.duque...@jpl.nasa.gov> wrote: > > > If I define a custom SQL function i

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Duquette, William H (318K)
On 12/22/10 10:52 AM, "Simon Slavin" wrote: >> There is no way to get a Tcl function to return NULL, since TCL has no >> concept of NULL. So, no, sadly, you cannot get an SQLite function >> implemented in Tcl to return NULL. > > ... but you might find reading this useful: > >

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Simon Slavin
On 22 Dec 2010, at 6:35pm, Richard Hipp wrote: > On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < > william.h.duque...@jpl.nasa.gov> wrote: > >> If I define a custom SQL function in Tcl using the SQLite "$db function" >> command, is there any way to make the function return NULL? I

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Duquette, William H (318K)
On 12/22/10 10:35 AM, "Richard Hipp" wrote: On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > If I define a custom SQL function in Tcl using the SQLite "$db function" > command, is there any way to make the function return NULL? I'm guessing

Re: [sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Richard Hipp
On Wed, Dec 22, 2010 at 1:16 PM, Duquette, William H (318K) < william.h.duque...@jpl.nasa.gov> wrote: > If I define a custom SQL function in Tcl using the SQLite "$db function" > command, is there any way to make the function return NULL? I'm guessing > not. > There is no way to get a Tcl functi

[sqlite] Can a custom SQL function return NULL?

2010-12-22 Thread Duquette, William H (318K)
If I define a custom SQL function in Tcl using the SQLite "$db function" command, is there any way to make the function return NULL? I'm guessing not. Thanks! -- Will Duquette -- william.h.duque...@jpl.nasa.gov Athena Development Lead -- Jet Propulsion Laboratory "It's amazing what you can do