Subject | Re: [firebird-support] Detect all currency field in a database |
---|---|
Author | Martijn Tonies |
Post date | 2009-09-22T14:41:09Z |
Hello Stephane,
can do for your database is to create a domain for
currency:
create domain D_Currency as numeric(15, 5)
and use that for tables and so on:
create table mytab ( mycol D_Currency );
That way, you know when you're actually dealing with a currency type
as opposed to just another numeric.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
> I want to know if it's possible to detect all currency field in aFirebird doesn't have a Currency type, the best thing you
> database? for now i use this "trick": only currency field are
> Numeric(15,5) but i just want to know if their is no better way to put a
> "flag" or a comment on a field to indicate that it's store currency ?
>
> Also how to make a storedprocedure that will update in a database ALL
> field that are Numeric(15,5) ?
can do for your database is to create a domain for
currency:
create domain D_Currency as numeric(15, 5)
and use that for tables and so on:
create table mytab ( mycol D_Currency );
That way, you know when you're actually dealing with a currency type
as opposed to just another numeric.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com