exporting to .txt w/ field names? 
Author Message
 exporting to .txt w/ field names?

Hi

Wondering what's the best way to export records to a text file with the
field names attached to each field's data.

I have a db which processes briefing notes, and which I'd like to have
e.mailed out periodically. Sure would be easy to do with the field names
leading each field data, since I have to batch them out 20 records or so
at a time, each record with about 10 fields.

Must I venture forth into Applescript? The person agitating for this
functionality the most, doesn't normally have AS installed because of
memory limitations.

TIA,
w
____________________________

http://www.***.com/



Wed, 07 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:

> Hi

> Wondering what's the best way to export records to a text file with the
> field names attached to each field's data.

> I have a db which processes briefing notes, and which I'd like to have
> e.mailed out periodically. Sure would be easy to do with the field names
> leading each field data, since I have to batch them out 20 records or so
> at a time, each record with about 10 fields.

> Must I venture forth into Applescript? The person agitating for this
> functionality the most, doesn't normally have AS installed because of
> memory limitations.

> TIA,
> w
> ____________________________

> http://www.radiant.net/wreford

A quick and dirty way is to put the field names in your first record.
Put a few spaces before the entry you're sorting on to force it to the
top.

Dave Hass



Wed, 07 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:

> Wondering what's the best way to export records to a text file with the
> field names attached to each field's data.

> I have a db which processes briefing notes, and which I'd like to have
> e.mailed out periodically. Sure would be easy to do with the field names
> leading each field data, since I have to batch them out 20 records or so
> at a time, each record with about 10 fields.

> Must I venture forth into Applescript? The person agitating for this
> functionality the most, doesn't normally have AS installed because of
> memory limitations.

Do you want to have the field name in every record?

If you think it's enough to have the field names added as the first
record use the "merge"-format.

--



Wed, 07 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:

>> I have a db which processes briefing notes, and which I'd like to have
>> e.mailed out periodically. Sure would be easy to do with the field names
>> leading each field data, since I have to batch them out 20 records or so
>> at a time, each record with about 10 fields.
>Do you want to have the field name in every record?

Yes, I would, thusly:

Field1
Field1 data blah blah blah

Field2
Field2 data blah blah blah

... and on, for each record; in short, I would like the field name to be a
header for each iteration of each field.

w
____________________________

http://www.radiant.net/wreford



Thu, 08 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:


> >> I have a db which processes briefing notes, and which I'd like to have
> >> e.mailed out periodically. Sure would be easy to do with the field names
> >> leading each field data, since I have to batch them out 20 records or so
> >> at a time, each record with about 10 fields.

> >Do you want to have the field name in every record?

> Yes, I would, thusly:

> Field1
> Field1 data blah blah blah

> Field2
> Field2 data blah blah blah

> ... and on, for each record; in short, I would like the field name to be a
> header for each iteration of each field.

> w

The only way to get this might be to duplicate each field you want to
export by a calculation field "F n with name": inserting the name of the
field in front of the data. Then you can export these calculation fields
instead of the original fields.

--



Fri, 09 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:

>> Field1
>> Field1 data blah blah blah

>> Field2
>> Field2 data blah blah blah

>> ... and on, for each record; in short, I would like the field name to be a
>> header for each iteration of each field.

>> w

>The only way to get this might be to duplicate each field you want to
>export by a calculation field "F n with name": inserting the name of the
>field in front of the data. Then you can export these calculation fields
>instead of the original fields.

Eureka!

Thanks, eh!

Oh, but that does make for a much bigger file. Drats.

Maybe this IS an applescript job.
____________________________

http://www.radiant.net/wreford



Fri, 09 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:


> >The only way to get this might be to duplicate each field you want to
> >export by a calculation field "F n with name": inserting the name of the
> >field in front of the data. Then you can export these calculation fields
> >instead of the original fields.

> Oh, but that does make for a much bigger file. Drats.

No! The only thing you have to do is to add the definitions to your
file, not the calculated data, as you (as i think) don't use these calc.
fields very often. It will be a bit slower then while exporting, but the
file stays smaller.

--



Fri, 09 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?
If you don't have date fields, you may create 10 new text fields for the
export only. These text fields would be the same as the original fields but
with a ";". For example, "Name" would be "Name;". Run a script to replace
the data in these new fields with;
Status ( CurrentFieldName ) & Name
just before the export.

Hope this will help!

Andy Schwarcz
Emma's Consultants

Quote:

> Hi

> Wondering what's the best way to export records to a text file with the
> field names attached to each field's data.

> I have a db which processes briefing notes, and which I'd like to have
> e.mailed out periodically. Sure would be easy to do with the field names
> leading each field data, since I have to batch them out 20 records or so
> at a time, each record with about 10 fields.

> Must I venture forth into Applescript? The person agitating for this
> functionality the most, doesn't normally have AS installed because of
> memory limitations.

> TIA,
> w
> ____________________________

> http://www.radiant.net/wreford



Fri, 09 Mar 2001 03:00:00 GMT
 exporting to .txt w/ field names?

Quote:

>If you don't have date fields, you may create 10 new text fields for the
>export only. These text fields would be the same as the original fields but
>with a ";". For example, "Name" would be "Name;". Run a script to replace
>the data in these new fields with;
>Status ( CurrentFieldName ) & Name
>just before the export.

ah. I do have a key date field to export, but DateToText (Da{*filter*}tered)
should take care of that.
To keep the file size down, I'll either put in a purge fields set of
script steps, or make unstored calc fields, as Eberhard suggests.

Thank you both for your useful suggestions.
____________________________

http://www.***.com/



Sat, 10 Mar 2001 03:00:00 GMT
 
 [ 9 post ] 

 Relevant Pages 

1. Exporting tbl to txt: Naming txt file

2. Export and Import via Named Pipe - 007DBS.err.txt

3. Exporting from TBL to TXT: Renaming TXT file

4. Query Analyzer not exporting field names

5. Exporting recordset to Excel, need field names on top

6. Export: Invalid Field name?

7. Include field names in export

8. Export records with field names on the top row

9. Exporting data with field names

10. Export with field names??

11. defining a export file name in a field

12. Exporting Field Names


 
Powered by phpBB® Forum Software