ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Query field names

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query field names

    Hi,
    I need to include field names from a file that I'm adding Query output to so, when I use CPYTOIMPF and then SNDSMTPEMM to send the file as an attachment in an email, it opens in Excel with column headings.

    I've tried a few things like:
    1. Creating a header record that I add to the stream file before the data - failed.
    2. Someone said use Alias names in the file dds - failed
    Any ideas?
    Everyday's a school day, what grade are you in?

  • #2
    Did you try the parameter ADDCOLNAM on CPYTOIMPF? It has options to use SQL or SYS column names.

    Comment


    • #3
      Scott M.
      That did it.

      Thanks.
      Everyday's a school day, what grade are you in?

      Comment

      Working...
      X