473,499 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting a Fixed With Query Column

18 New Member
I have a field in SQL that contains a Currency amount, which will be used for an export. It needs to be 13 characters long, preceded by 0 then the dollar amount, without the decimal point.

The field name is DOCAMT. To get the full amount, I'm sure that I need to multiply the currency by 100, but how do I get the dynamic part of the field to be 0's.

Since this will be an export, it would need to be a query instead of vba.

Example:

DOCTAMT= 205.47
Multiplied by 100 gives me 20547, which is correct.
But how do I get 8 0's in front of it, ie. 0000000020547.

The next DOCAMT might be 1234.56 and would need to be 0000000123456

Any ideas?

Thanks

Jeff
Aug 10 '10 #1
1 1144
jimatqsi
1,271 Recognized Expert Top Contributor
You could do this
Format (Cint(DOCAMT*100),"0000000000000")

Jim
Aug 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3228
by: Michael Hill | last post by:
I am having a problem formatting the third column. It should be 70px wide, but it is extending well beyond 70. The 2nd and 3rd column should be the same width. The content of the 3rd column...
3
2013
by: Billy Jacobs | last post by:
I have created a DataGridColumnDatePicker Component so that I can put a datetimepicker control in my datagrid. It almost works. When I put my mouse in the cell it changes to a datetimepicker...
3
7047
by: Spondishy | last post by:
OK... After a previous post, I've decided that the site layout will be two columns The layout will be: 1) Page 100% wide 2) Right column will be fixed 150px, left column will use the rest...
7
6258
by: Jean | last post by:
Hello I have a query that takes information from the column of a table, very simply: SELECT NAME FROM tblPeople; I want to add another column to my query, but I just want the rows to...
40
4421
by: Mark | last post by:
Hello i like to make the following lay out: - 3 columns - center column = fixed width - left and right columns are not fixed and must take all the available space there is left. - left...
9
3094
by: TristaSD | last post by:
Hi, How do I accomplish the following: In a two-column layout, the right column is 200px wide, and the left column is fluid? Thanks!
2
3145
by: sunilkes | last post by:
Hi, I have a crosstab query made by a linked table, the row headers are displayed correctly, but the column headers are showing the SNo (Autonumber) value instead of the NAME field. Please...
3
8806
by: David | last post by:
I am using .Net 2.0 and VS2005 with SQL server db. The datetime columns on SQL have the date and time in them. How can I display just the short date format (e.g. a datetime of 10/19/2006 11:23:57...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.