A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Exporting Delimited Files



 
 
Thread Tools Display Modes
  #1  
Old January 18th, 2006, 11:02 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Exporting Delimited Files

When exporting a query in delimited format with null values the data is
pushed to the left. I need to be able to maintain consistency. I have
discovered I can use an IIF comb with the Space function to maintain
consistency. I am having a problem with concatenating 2 fields +
including the IIF and the Space functions.


ie... One of the fields may be null. It is only 2 characters. The other
field it is concatenated with is not null and is 5 chaacters. Therefore
I need to include 2 spaces for the fields that are null.

The tables are linked.

TIA

  #2  
Old January 18th, 2006, 11:11 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Exporting Delimited Files

Stryker22150 wrote:
When exporting a query in delimited format with null values the data is
pushed to the left. I need to be able to maintain consistency. I have
discovered I can use an IIF comb with the Space function to maintain
consistency. I am having a problem with concatenating 2 fields +
including the IIF and the Space functions.


ie... One of the fields may be null. It is only 2 characters. The other
field it is concatenated with is not null and is 5 chaacters. Therefore
I need to include 2 spaces for the fields that are null.

The tables are linked.

TIA


Nz(NullColumn,Space(2)) & FiveCharacterColumn

--
MGFoster:::mgf00 at earthlink decimal-point net
Oakland, CA (USA)
  #3  
Old January 18th, 2006, 11:33 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Exporting Delimited Files

picky
Sounds like you're talking about fixed-width, not delimited. If it were
delimited, you wouldn't care how many spaces it took: you'd have your
delimiter to indicate that the next field is starting.
/picky

Looks like you've got a workable answer, though.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Stryker22150" wrote in message
oups.com...
When exporting a query in delimited format with null values the data is
pushed to the left. I need to be able to maintain consistency. I have
discovered I can use an IIF comb with the Space function to maintain
consistency. I am having a problem with concatenating 2 fields +
including the IIF and the Space functions.


ie... One of the fields may be null. It is only 2 characters. The other
field it is concatenated with is not null and is 5 chaacters. Therefore
I need to include 2 spaces for the fields that are null.

The tables are linked.

TIA



  #4  
Old January 19th, 2006, 12:35 AM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Exporting Delimited Files

MG

Thanks for the quick response.

I have tried using the NZ function as suggested. Nz([field 2],Space(2))
& [table.field2] & [table.field 2]

This leaves the fields where "field 2" has some nulls untouched and
takes the first two characters and concatenates to the end of the
string. I now have a 9 sting and 5 string field. The field needs to be
7 characters.

I need a piped delimited file.

Doug;

If you could please explain why delimited file output is pushed to the
left when you export the file when a data field is null. This really
hashes the data. I have been able to generate a delimited piped file by
including Spaces for consistency. I am on the last one that is
concatentating two fields. Therefore I am hoping for a combination that
will fill the nulls with the required spaces.

In a Fixed width file I would hopefully have the file spec to ensure it
was in the same place every pull.

Thanks to all

  #5  
Old January 19th, 2006, 12:44 AM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Exporting Delimited Files

Please disregard. When I brought it back into Access it fell into place
albeit, the extra characters included g

When you look at the Text file the columns are not aligned. I guess it
is like cooking a steak by appearance alone? g

Thanks again.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting Table to comma delimited text file Ray S. Running & Setting Up Queries 2 May 13th, 2005 04:38 PM
Exporting Palm Desktop files to MS Outlook 2000 ekopriva Calendar 0 March 30th, 2005 03:38 AM
Can't Open Files or Load Access on New PC barbaraeh Setup, Installing & Configuration 15 March 12th, 2005 08:17 PM
Cannot access read-only documents. tomgillane General Discussion 14 February 7th, 2005 10:53 PM
how do i change my settings for exporting files althea Powerpoint 1 September 2nd, 2004 02:35 PM


All times are GMT +1. The time now is 05:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.