[sqlite] field name in UDF

2015-11-09 Thread Nelson, Erik - 2
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 > >

[sqlite] field name in UDF

2015-11-07 Thread Stephan Beal
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

[sqlite] field name in UDF

2015-11-06 Thread Stephan Beal
On Fri, Nov 6, 2015 at 7:04 PM, Nelson, Erik - 2 < erik.l.nelson at bankofamerica.com> wrote: > select quarter(t1.a) from t1 ; > > I might hope to get 'a' or 't1.a'. Any ideas? > UDFs (in any scripting environment) don't get that level of info. They only get passed the values resolved by

[sqlite] field name in UDF

2015-11-06 Thread Stephan Beal
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

[sqlite] field name in UDF

2015-11-06 Thread Nelson, Erik - 2
Stephan Beal wrote on Friday, November 06, 2015 1:00 PM > On Fri, Nov 6, 2015 at 6:50 PM, Nelson, Erik - 2 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

[sqlite] field name in UDF

2015-11-06 Thread Nelson, Erik - 2
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

[sqlite] field name in UDF

2015-11-06 Thread Igor Tandetnik
On 11/6/2015 12:50 PM, Nelson, Erik - 2 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)

RE: [sqlite] Field name

2004-03-07 Thread Bronislav Klucka
sorry, your corrections are correct Thanks Brona > > 1. I think you meant 'John Smith'; that's correct. > > 2. Correct. Result is John "the Big" Smith > > 3. I'm sure you meant 'John ''the Big'' Smith'. >Result is John 'the Big' Smith > > > Regards

RE: [sqlite] Field name

2004-03-07 Thread Bronislav Klucka
Hi, That's not, what Richard wrote me ::( but when I insert text into table, is this all OK? name='John Smith" name='John "the Big" Smith' //double quotes around `the big` name='John ''the Big'' Smith" //two singe quotes around `the big` so it's exactly the oposite way Richard wrote me

Re: [sqlite] Field name

2004-03-07 Thread Kurt Welgehausen
You can solve all your problems by using strictly standard quoting. The single quote (') is the quote character for strings. The double quote (") is the quote character for identifiers, which include column names. You don't need to quote an identifier unless it has white space in it, so you

RE: [sqlite] Field name

2004-03-07 Thread Bronislav Klučka
> > Bronislav Klučka wrote: > > So there is nothing like C escape strings? (\", \',\\,etc.) > > And the way to do it is to leave the field name, column name or > string the > > way it is, close it into double quotes and duplicate all double > quotes in > > the identificator? > > > > Correct. That

Re: [sqlite] Field name

2003-11-28 Thread D. Richard Hipp
Bronislav Klučka wrote: So there is nothing like C escape strings? (\", \',\\,etc.) And the way to do it is to leave the field name, column name or string the way it is, close it into double quotes and duplicate all double quotes in the identificator? Correct. That is what the SQL standard

RE: [sqlite] Field name

2003-11-27 Thread Greg Obleshchuk
] Field name but the results column name seems to be [brona'-kluc"ka] instead of brona'-kluc"ka > -Original Message- > From: Greg Obleshchuk [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 27, 2003 10:32 AM > To: 'Bronislav Kluèka' > Subject: RE: [sqlite]

RE: [sqlite] Field name

2003-11-27 Thread Bronislav Klucka
but the results column name seems to be [brona'-kluc"ka] instead of brona'-kluc"ka > -Original Message- > From: Greg Obleshchuk [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 27, 2003 10:32 AM > To: 'Bronislav Kluèka' > Subject: RE: [sqlite] Field n

[sqlite] Field name

2003-11-27 Thread Bronislav Klučka
Hi, I've done this: create table 'brona''-klucka' ('brona''-kluc"ka' int) insert into 'brona''-klucka' ('brona''-kluc"ka') values (1); if I try: select * from 'brona''-klucka'; then it realy returns >1<, but how can I address the field? select "brona''-kluc"ka" from 'brona''-klucka';