Ask Your Question

How to determine the format of a field in a table using sql? [closed]

asked 2017-07-24 21:44:29 +0100

Quarto Die gravatar image

updated 2017-07-24 21:44:57 +0100

I am attempting to create a table using sql. I want the "dollars" field to show up as currency in this format: $0.00. Using the the following command I can only get the format without the dollar sign.

CREATE TABLE "mytable3" ("id" INTEGER PRIMARY KEY, "dollars" NUMERIC (10,2))

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-10-11 00:25:52.916542

1 Answer

Sort by » oldest newest most voted

answered 2017-07-24 22:41:11 +0100

Ratslinger gravatar image

Using SQL sets the internal DB format of the field. What you are looking for is the display format of the field.

Now normally you can just edit the table and change the field format. However, based upon previous questions (and you should have stated here) you have a split DB so you cannot edit table fields.

To change the display format in a split DB, view the table. Right click the column heading you want to modify and select Column format.... Then choose the format you wish to display - in your case Currency. when completed make sure you save the changes - will be indicated on main .odb form. Will display in your format from that point on.

edit flag offensive delete link more


I am really trying to create new tables (over and over again) with a column immediately with that format i.e. currency and put it in a macro I can use by the click of a button. But your answer seems to indicate that it is not possible to do this using sql which concords with its lack of presence in the sql manual.
Thank you for your tip on right clicking the column, and bringing up column format, however as I have do the operation several times in an automated way, it is not what I hoped for.

Quarto Die gravatar imageQuarto Die ( 2017-07-25 05:52:18 +0100 )edit

Question Tools

1 follower


Asked: 2017-07-24 21:44:29 +0100

Seen: 108 times

Last updated: Jul 24 '17