Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Nico Williams
On Sun, Mar 27, 2011 at 10:20 PM, Darren Duncan wrote: > Nico Williams wrote: >> User defined types.  There are two types in particular that I'd like >> to see added: >> >>  - Bit strings.  Bit strings are like character strings, but the >> elements can only be bits.  The

[sqlite] ICU Collator Base on Locale and Customize Rule

2011-03-27 Thread ashish yadav
Hi , If its possible to use Collator of ICU collation service which is base on both simultaneously : 1. Locale base like "ko_KR" ( coll = ucol_open("ko_KR", ) ) 2. Customized Rules ie "tailoring" ( coll = ucol_openRules(rlz, rlen, UCOL_OFF,UCOL_TERTIARY,NULL,) ) Collator_Final =

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Darren Duncan
Nico Williams wrote: > User defined types. There are two types in particular that I'd like > to see added: > > - Bit strings. Bit strings are like character strings, but the > elements can only be bits. The key is that bit string length matters > when it comes to collation (000 sorts before

Re: [sqlite] Import data in SQLite from excel using C# code

2011-03-27 Thread Mohd Radzi Ibrahim
Hi, Try use www.libxl.com that has C/C++/C#/Delphi interface to read excel files. The rest are just normal sqlite commands. On 28-Mar-2011, at 9:17 AM, Deepti Marathe wrote: > > Hi, > > I am new to SQLite and am using it for the first time. I need to create an > application using C# that

Re: [sqlite] SQLite & NHibernate

2011-03-27 Thread Nico Williams
On Sat, Mar 26, 2011 at 8:56 PM, Patrick Earl wrote: > 1.  Support for a base-10 numeric data type. Looking at the wikipedia page for NHibernate it seems that you don't export a SQL interface -- all SQL is generated. So, given that, you should be able to generate SQLite3

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Nico Williams
On Sun, Mar 27, 2011 at 11:33 AM, jeff archer wrote: >>From: Patrick Earl >>Subject: Re: [sqlite] Lack of "decimal" support >> >>If SQLite can't decide on a base-10 format itself, perhaps the answer >>lies in enhancing the API to allow for custom type

Re: [sqlite] Installing _sqlite3.so for Python 2.7 on ubuntu

2011-03-27 Thread Tim Johnson
* Tim Johnson [110327 16:59]: > I have python 2.6 on my ubuntu 10.04 workstation. > the sqlite module imports without a problem. > > I have installed python 2.7 by compiling it. > There is no /usr/local/lib/python2.7/lib-dynload/_sqlite3.so, > so am getting an import

[sqlite] Import data in SQLite from excel using C# code

2011-03-27 Thread Deepti Marathe
Hi, I am new to SQLite and am using it for the first time. I need to create an application using C# that will export the data from EXCEL to SQLite. Please can anybody guide me. Thanks in advance! -- View this message in context:

Re: [sqlite] sqlite3_step behavior on empty set

2011-03-27 Thread Igor Tandetnik
Sam Carleton wrote: > Is my impression correct that when calling sqlite3_step() on a query > that returns no rows, the result will be [SQLITE_DONE]? Yes. > If that is the case, might that be added to the documentation? "SQLITE_DONE means that the statement has

[sqlite] Installing _sqlite3.so for Python 2.7 on ubuntu

2011-03-27 Thread Tim Johnson
I have python 2.6 on my ubuntu 10.04 workstation. the sqlite module imports without a problem. I have installed python 2.7 by compiling it. There is no /usr/local/lib/python2.7/lib-dynload/_sqlite3.so, so am getting an import error. What do I need to do? FYI: Programmer 24 years, linux 11 years,

Re: [sqlite] sqlite3_step behavior on empty set

2011-03-27 Thread Simon Slavin
On 27 Mar 2011, at 9:24pm, Sam Carleton wrote: > Is my impression correct that when calling sqlite3_step() on a query > that returns no rows, the result will be [SQLITE_DONE]? If that is > the case, might that be added to the documentation? The SQLite documentation would profit greatly from a

[sqlite] sqlite3_step behavior on empty set

2011-03-27 Thread Sam Carleton
Is my impression correct that when calling sqlite3_step() on a query that returns no rows, the result will be [SQLITE_DONE]? If that is the case, might that be added to the documentation? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Simon Slavin
On 27 Mar 2011, at 7:17pm, Darren Duncan wrote: > Simon Slavin wrote: >> I forgot a bunch of functions. You need to be able to do comparisons, so you >> can determine whether one decimal is greater, less or equal to another. And >> users will want abs(), max(), min(), round(), avg(), sum(),

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Darren Duncan
Simon Slavin wrote: > I forgot a bunch of functions. You need to be able to do comparisons, so you > can determine whether one decimal is greater, less or equal to another. And > users will want abs(), max(), min(), round(), avg(), sum(), and total(). What is this "total" function you speak of

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread jeff archer
>From: Patrick Earl >Subject: Re: [sqlite] Lack of "decimal" support > >If SQLite can't decide on a base-10 format itself, perhaps the answer >lies in enhancing the API to allow for custom type storage and >operators. >   So, like a virtual type interface.  This would be a

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Simon Slavin
On 27 Mar 2011, at 11:49am, Simon Slavin wrote: > decimal + decimal --> decimal > decimal - decimal --> decimal > decimal * real --> decimal > decimal / real --> decimal > decimal / decimal --> real I forgot a bunch of functions. You need to be able to do comparisons, so you can determine

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Jean-Christophe Deschamps
>This page has a lot of info about >Decimal Number support, including >a set of libraries: > >http://speleotrove.com/decimal/ Yes! IBM and Intel are two of the big names having done significant work in this direction and made research and/or results publicly available.

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Jean-Christophe Deschamps
>There are many cases where people are doing calculations or using >numbers expecting them to retain all digits. This would allow the BCD >type to be used for that if they really need it. Currency conversions (rarely exact!) or tax (or margin) calculations come to mind as very common uses

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Konrad J Hambrick
All -- This page has a lot of info about Decimal Number support, including a set of libraries: http://speleotrove.com/decimal/ -- kjh Black, Michael (IS) wrote, On 03/27/2011 06:29 AM: > Base 10 multiplication is needed. Although money is the main reason for > doing BCD due to cumulative

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Black, Michael (IS)
Base 10 multiplication is needed. Although money is the main reason for doing BCD due to cumulative errors it's not the only reason. So I'd recommend adding decimal*decimal -> decimal just to be complete. It's easy enough to implement using the + function so could just be noted as "slow".

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread Simon Slavin
For those who are scared by this, there really isn't that much to do. Let us, for the same of argument, say we're going to allow decimal values to an arbitrary length: any number of digits, possibly with a decimal point somewhere along the string, possibly starting with a minus sign. The

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread TR Shaw
On Mar 26, 2011, at 10:15 PM, BareFeetWare wrote: > On 27/03/2011, at 12:39 PM, Patrick Earl wrote: > >> Base-10 numbers are frequently used in financial calculations because >> of their exact nature. SQLite forces us to store decimal numbers as >> text to ensure precision is not lost.

Re: [sqlite] Lack of "decimal" support

2011-03-27 Thread BareFeetWare
On 27/03/2011, at 3:04 PM, Patrick Earl wrote: > If you use a view to return a double, you've lost the exact value you were > trying to save by storing the decimal as a text value. I'm not suggesting storing as a text value. I'm suggesting storing as an integer and only converting to a float