I want to export from Access 2000 a numeric field (double) to a text
file. The export file should be fixed length (no delimiters), the
field should have 9 digits in total, including 2 decimals. I want the
field to be right aligned so that the decimal separator is always in
the same column in the text file. I don't want to fill any leading
blanks with zeros.
I tried to do this using the format function in a query but I always
end up with a left aligned table...
Can anyone help me?
Thanks 4 2858
<ja*********@gm ail.comschreef in bericht news:11******** **************@ g4g2000hsf.goog legroups.com...
>I want to export from Access 2000 a numeric field (double) to a text
file. The export file should be fixed length (no delimiters), the
field should have 9 digits in total, including 2 decimals. I want the
field to be right aligned so that the decimal separator is always in
the same column in the text file. I don't want to fill any leading
blanks with zeros.
I tried to do this using the format function in a query but I always
end up with a left aligned table...
Can anyone help me?
Thanks
Don't fill the leading blanks with zero's but with spaces...
Arno R
>
Don't fill the leading blanks with zero's but with spaces...
Arno R
I'm not sure how I can do that.
If the value of the record is eg. 1.23, I need to fill 6 leading
blanks with spaces. If the value is 1234.56, I need to fill 3 leading
blanks with zeros.
Can I do this using the format function?
Thanks ja*********@sca rlet.be wrote:
>>Don't fill the leading blanks with zero's but with spaces...
Arno R
I'm not sure how I can do that.
If the value of the record is eg. 1.23, I need to fill 6 leading
blanks with spaces. If the value is 1234.56, I need to fill 3 leading
blanks with zeros.
Can I do this using the format function?
Thanks
a = 123.45
? Right(string(10 ," ") & a,10)
123.45
or
? Right(string(10 ,space(1)) & a,10)
123.45
Salad wrote: ja*********@sca rlet.be wrote:
>>Don't fill the leading blanks with zero's but with spaces...
Arno R
I'm not sure how I can do that. If the value of the record is eg. 1.23, I need to fill 6 leading blanks with spaces. If the value is 1234.56, I need to fill 3 leading blanks with zeros. Can I do this using the format function? Thanks
a = 123.45
? Right(string(10 ," ") & a,10)
123.45
or
? Right(string(10 ,space(1)) & a,10)
123.45
Hmmmm...I decided to check for a number like 123.50.
a = 123.50
? Right(string(10 ,space(1)) & a,10)
123.5
? Right(string(10 ,space(1)) & format(a,"0.00" ),10)
123.50
You might want to format to keep the ending 0's. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ted Theodoropoulos |
last post by:
i posted an earlier thread about exporting data from a subform in an
..ADP to an .MDB file. i had only one gracious response but it
wouldn't work in the given situation. so i thought i would share the
code with you that i wrote to solve the problem. certainly nothing
sophisticated but it would have been very helpful to me had i gotten
ahold of it when i started out to tackle the problem. i welcome any
feedback.
the solution uses a...
|
by: M.A. Oude Kotte |
last post by:
Hi All,
I hope this is the correct mailing list for this question. But neither
postgresql.org nor google could help me out on this subject.
I did find one disturbing topic on the mailing list archives
(http://archives.postgresql.org/pgsql-admin/2000-05/msg00032.php), but
since it was quite old I'm posting my question anyway.
I'm writing a generic database layer that should support a fixed number
of generic numeric types on a number of...
|
by: Taffman |
last post by:
I've searched this goup for an answer to this, there are many
discussions that come close but non that I can find that actually
addresses this particular problem.
I'm exporting queries to Excel. These queries have memo fields in them
Each memo field is trunkated, i.e cuts off after 255 characters.
Is there any way either via VBA or otherwise to get all my memo text to
export to Excel.
I note that there is no such limit when exporting...
|
by: ANDRESUK |
last post by:
Everyone,
I'm trying to export a table containing numeric fields with formats
such as "00000000" which would return the value with some leading
zeros. It works fine in the table as it is displayed as I want, the
problem is that I lose the formats when I try to export the table to a
TXT file; e.g. in the table the numeric field is displayed as 00034569
but it exports as 34569.
I know I can convert the numeric field to "Text" with the...
|
by: sstell |
last post by:
I’m doing a Data Transformation Service extract of data under MS-SQL 7.0. I have two fields that are numeric. I need to extract them to a text, fixed length file. When I extract them – I can get them to the right field(column), but they export in a ‘right-justified’ format.
Ie. From database table: Receipt_amount defined as decimal (19,7) has a value of ‘123.45’
When I extract, I want it to go into a text, fixed length field, I’ll...
| |
by: Takeadoe |
last post by:
I've got a favor to ask -
Consider the following numeric field:
511
6805
3205
403
I need to make 2 new numeric fields from this variable, call it CS
|
by: vbvr |
last post by:
I need to export a numeric field (TAX ID) from vb.net to Excel. The value gets converted to Numeric in Excel and leading zeroes are lost. I tried to use code posted on this site. But the style defined here does not get applied in Excel. Following is the sample code.
Any suggestions on how to keep the text "02345" in the same format in Excel?
>>>>>>>>>>>>>>>>>>>>
Dim Excel As New Excel.Application
Dim wb As Excel.Workbook
...
|
by: NEWSGROUPS |
last post by:
I have data in a table in an Access 2000 database that needs to be exported
to a formatted text file. For instance, the first field is an account number
that is formatted in the table as text and is 8 characters long. This field
needs to be exported as pic(15) padded in the front with 0's (zeros). The
next field an ID name that is 15 characters that needs to be exported as
pic(20) padded with trailing spaces. There are about 5 fields in...
|
by: mkbrady |
last post by:
I have a query that includes calculated fields that generate numeric results.
I have wrapped conversion functions CLng() and CDdl() around the calculated
fields to ensure the data types are correct. The query results are correct
in MS Access 2007 but when I export to MS Excel 2007, some of the numeric
fields are converted to text. I cannot find an explanation. I am using a
Macro to export, and would prefer to avoid VBA for this...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |