Subject Re: [firebird-support] Detect all currency field in a database
Author Martijn Tonies
Hello Stephane,

> I want to know if it's possible to detect all currency field in a
> 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) ?

Firebird doesn't have a Currency type, the best thing you
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