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  

Problem to write a query result in a text file.



 
 
Thread Tools Display Modes
  #1  
Old July 3rd, 2008, 12:48 PM posted to microsoft.public.access.queries
Marco
external usenet poster
 
Posts: 535
Default Problem to write a query result in a text file.

Hello.

I have an access database that write several queries result into several
text files. It's one query per text file.

In a particular one it's happening a strange thing. Access is inserting two
records into one column.

but it only makes that in ane record and for no particular reason.

But the most strange thing is that if I run the query as a select query it
show me everything ok.

I need this:
2402006|2006-04-17||N|||

and is happening me this:
2412006|2006-02452006|2006-04-17||N|||

"|" is the delimiter

What can be happening?

Regards,
Marco
  #2  
Old July 4th, 2008, 07:26 PM posted to microsoft.public.access.queries
Chris O'C via AccessMonster.com
external usenet poster
 
Posts: 1,160
Default Problem to write a query result in a text file.

Problem could be:

1 - source doesn't have proper field delimiters and end of record delimiter
on one of the records - which spills into the next record
2 - source is corrupt
3 - select query and output query aren't as identical as thought

Chris
Microsoft MVP


Marco wrote:
Hello.

I have an access database that write several queries result into several
text files. It's one query per text file.

In a particular one it's happening a strange thing. Access is inserting two
records into one column.

but it only makes that in ane record and for no particular reason.

But the most strange thing is that if I run the query as a select query it
show me everything ok.

I need this:
2402006|2006-04-17||N|||

and is happening me this:
2412006|2006-02452006|2006-04-17||N|||

"|" is the delimiter

What can be happening?

Regards,
Marco


--
Message posted via http://www.accessmonster.com

  #3  
Old July 7th, 2008, 09:19 AM posted to microsoft.public.access.queries
Marco
external usenet poster
 
Posts: 535
Default Problem to write a query result in a text file.

Hello.

The database and table I think they are ok.

It's a AS400 DB2 database.

But you gave me an ideia.

I'll create a access table very restritic and the export to txt and only
after I'll export the data.

I'll let you know the result.

Thanks,
Marco









"Chris O'C via AccessMonster.com" wrote:

Problem could be:

1 - source doesn't have proper field delimiters and end of record delimiter
on one of the records - which spills into the next record
2 - source is corrupt
3 - select query and output query aren't as identical as thought

Chris
Microsoft MVP


Marco wrote:
Hello.

I have an access database that write several queries result into several
text files. It's one query per text file.

In a particular one it's happening a strange thing. Access is inserting two
records into one column.

but it only makes that in ane record and for no particular reason.

But the most strange thing is that if I run the query as a select query it
show me everything ok.

I need this:
2402006|2006-04-17||N|||

and is happening me this:
2412006|2006-02452006|2006-04-17||N|||

"|" is the delimiter

What can be happening?

Regards,
Marco


--
Message posted via http://www.accessmonster.com


  #4  
Old July 7th, 2008, 09:51 AM posted to microsoft.public.access.queries
Marco
external usenet poster
 
Posts: 535
Default Problem to write a query result in a text file.

Hello.

I tried something that I think it worked.


I create a manually local table (not a make table querie) and I insert the
data inside.

then I create a macro to transfer text to text file and I think it's working.

Thanks for the ideia.

Regards,
Marco



"Chris O'C via AccessMonster.com" wrote:

Problem could be:

1 - source doesn't have proper field delimiters and end of record delimiter
on one of the records - which spills into the next record
2 - source is corrupt
3 - select query and output query aren't as identical as thought

Chris
Microsoft MVP


Marco wrote:
Hello.

I have an access database that write several queries result into several
text files. It's one query per text file.

In a particular one it's happening a strange thing. Access is inserting two
records into one column.

but it only makes that in ane record and for no particular reason.

But the most strange thing is that if I run the query as a select query it
show me everything ok.

I need this:
2402006|2006-04-17||N|||

and is happening me this:
2412006|2006-02452006|2006-04-17||N|||

"|" is the delimiter

What can be happening?

Regards,
Marco


--
Message posted via http://www.accessmonster.com


 




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


All times are GMT +1. The time now is 09:52 PM.


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