Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Qry from Linked Table As Text Error/Issue

Status
Not open for further replies.

sxschech

Technical User
Jul 11, 2002
1,034
US
I'm having difficulty exporting a query that is Linked to an SQL Server table. When I export as Text (Delim or Fixed - they want the export in fixed format) if I use the date of birth as is it works fine. If I format as YYYYMMDD it fails to create the file, but sometimes error message says

the field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.

Or it says that the file is opened (even though not)

Or it says that there is a key violation and it creates the file with all data except date of birth.

When I export to Excel (Tools Office Links Analyze with Excel) there are no error messages and it is okay with the format() of date.

The query is looking at one table only, there are no joins or complicated statements.

[tt]
SELECT DISTINCT UA_SSN, UA_USF_ID, UA_TERM, UA_COLLEGE, UA_DEGREE, UA_PROGRAM, Format([UA_DATE_OF_BIRTH],"yyyymmdd") AS Date_Of_Birth, UA_COUNSELOR_CODE, UA_REQ_RULE
FROM dbo_UNDERGRAD_ADM
WHERE UA_TERM="06F";
[/tt]

Here are the export Specs...

[tt]
Field Name Start Width
UA_SSN 1 10
UA_USF_ID 11 9
UA_TERM 20 4
UA_COLLEGE 24 3
UA_DEGREE 27 4
UA_PROGRAM 31 5
Date_Of_Birth 36 10
UA_COUNSELOR_CODE 46 4
UA_REQ_RULE 50 4
[/tt]

Is there something I'm missing here regarding formats and text fixed width exports?

 
Problem solved. After much frustration (compact/repair, etc), ended up creating a new export spec file and to be safe, instead of saving it with the same export spec name, gave it a different spec name. After that all worked as expected. I guess one of those unknown things that Access sometimes does.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top