Hi Jeff,

I'm not a Tcl user. I use C# and Robert Simpson's SQLite ADO.NET 2.0
provider to access SQLite databases. 

SQLite allows you to define both scalar and aggregate user defined
functions. I think the way to approach your issue is to define a scalar user
defined function. I don't know how to do it with Tcl, I just know how to do
it with c#.

Regards:

Jesús López


-----Mensaje original-----
De: Jeff Godfrey [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 19 de diciembre de 2006 21:45
Para: sqlite-users@sqlite.org
Asunto: [sqlite] Mathematical "power" operator?

Hi All,

New to SQLite, so bear with me... ;^)

I'm trying to migrate an MS-Access database over to SQLite.  I have a VIEW
created from a SELECT statement that uses the mathematical "power" operator
("^") for both "square root" and "squared" operations.  It seems that SQLite
doesn't support the "^" operator, so I'm trying to find the best way around
that.  I'm using SQLite from Tcl.  I know that I can create my own Tcl-based
replacements for these functions and register them with SQLite via the
"function" method, though that still seems to leave an issue.

I am using a 3rd part tool (SQLite Expert Personal) to create, manipulate,
and generally experiment with my SQLite database.  Obviously, if I create a
Tcl-based function replacement, I can use it from within my code, but it
won't be recognized when I open up the VIEW query that uses it via the 3rd
part tool.

Also, I can fairly easily change the query to get by without the need for
the "squared" function, though the "square root" function would seem to be a
bit more tricky to "code around".  So, a few questions:

1.  Thoughts on my specific issue with the missing mathematical operator?
2.  More generally, do people who "add" functions to SQLite just not use 3rd
party tools to work with their data?

Thanks for any insight...

Jeff Godfrey


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to