troubleshooting Question

Padding SQL query to created fixed width text file

Avatar of MrAutomate
MrAutomateFlag for United States of America asked on
Microsoft SQL ServerDB2
11 Comments1 Solution2916 ViewsLast Modified:
Experts:  I am stuck on 2 things:

1.  How can I make this query control the size of the columns?  I need a fixed width export for another system to read in.The loan number needs to be a width of 30, Name of 50
, Phone of 5, Fax of 12, email of 63

2.  The fax data needs to be formatted at @@@.@@@.@@@@ with a DOT as a separator.

Many thanks!


SELECT


o.LN_NO,      

       a.PTY1_NM,
       a.PTY_TELEPHONE_NO,
       a.PTY_FAX_NO,
       a.PTY_EMAIL_ADR_XX

  FROM RDX_BDE.T_PARTY a
 
join RDX_BDE.T_POINT_OF_CONTACT o
on o.POC_PROCESSOR_ID = a.PTY_ID
and o.POC_PROCESSOR_ID = a.PTY_ID
 WHERE (((a.PTY_TITLE_XX) Like '%HPC%'));
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros