I need to create a custom function that returns all the value from
that row.
If the * syntax was supported then I don't need to save or retrieve
all the column's name for that table.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/
On Oct 18, 2007, at 4:44 PM, Igor Tandetnik wrote:
Marco Bambini <[EMAIL PROTECTED]> wrote:
I created a custom function in sqlite, and when I try to execute it
with a statement like:
SELECT myfunction(col1, col2, col3) FROM table1 WHERE ...
then everything works fine.
The problem is that I don't know in advance the names of the columns
so I tried to use it with a statement like:
SELECT myfunction(*) FROM table1 WHERE ...
but when myfunction is executed the argc parameter is set to 0.
Is the * syntax supported in custom sqlite3 functions?
Well, it _is_ supported - you didn't get a syntax error in your
statement. It just doesn't do what you hoped it would.
I'm not sure why you expected it to pass a list of all the fields.
The only existing case of similar syntax I can think of is COUNT
(*), and clearly COUNT doesn't accept a list of fields, and
wouldn't know what to do with it.
Igor Tandetnik
----------------------------------------------------------------------
-------
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------
-------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------