Back to the month index |
Back to the list index
|
David H Dennis (david@amazing.com)
Sat, 7 Sep 1996 22:48:27 -0700 (PDT)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Carlos M. Gutierrez: "Re: [mSQL] A few miscellaneous questions..."
- Previous message: Anderson, Hans: "Re: [mSQL] Empress SQL vs. mSQL (1.x - 2.x)"
- In reply to: Jon Lei: "[mSQL] Empress SQL vs. mSQL (1.x - 2.x)"
- Next in thread: Carlos M. Gutierrez: "Re: [mSQL] A few miscellaneous questions..."
From: David H Dennis <david@amazing.com> Message-Id: <199609080548.WAA11797@remarkable.amazing.com> Subject: Re: [mSQL] A few miscellaneous questions... Date: Sat, 7 Sep 1996 22:48:27 -0700 (PDT)> miserable time with MS-SQL Server. I don't really need a database program,
I'd be curious to hear what sort of problems you've run into, if you
don't mind emailing me privately. (I don't think the whole list really
needs to hear about them :-) ).
> This real number "bug" concerns me. If I insert a 2.5 into the
> database, sometimes it might print out as 2.50000000001. Not only does it
> screw up the output columinization, but it could possibly mess up a query
> too. Why is this behavior so sporadic? Aside from storing the real as a
> character, is there any way around this? I did check the current FAQ,
> and didn't see anything mentioned about it. My goal is to store monetary
> amounts as reals, and do comparasions with (>), (<), and (=). Maybe even
> some multiplication too. I can't do this with char-type or ints.
For comparisons in queries, you might do something like this:
sprintf(query, "insert into database (string_variable) ('%12.2f')",
real_value);
(That's in C, since that's the language I use, but I think you get
the idea). That will work fine for comparisons, although of course you'll
need to do similar things with the queries:
sprintf(query, "select * from database where string_variable >= '%12.2f' and string_variable <= '%12.2f'", real_value, real_value);
I think this will work fine.
Multiplying columns to get a new column can be done in the output
routine in your programming language of choice.
I think mSQL might be a bit slow on a 100mb file, however. I would
recommend splitting your big database into smaller files (there are,
of course, plenty of ways to do this, depending on your exact database
organization).
If you are talking about organizing vast amounts of data, you might
want to try WAIS. WAIS is a text search tool, so you don't have
the option of > or < style processing, but it is very fast and
it's probably the best option I know of for scaling to massive amounts
of data (multi hundred megabyte files don't faze it).
Good luck!
D
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Carlos M. Gutierrez: "Re: [mSQL] A few miscellaneous questions..."
- Previous message: Anderson, Hans: "Re: [mSQL] Empress SQL vs. mSQL (1.x - 2.x)"
- In reply to: Jon Lei: "[mSQL] Empress SQL vs. mSQL (1.x - 2.x)"
- Next in thread: Carlos M. Gutierrez: "Re: [mSQL] A few miscellaneous questions..."