× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Instead of writing 35 spaces, which I find prone to error and not very
self-documenting (in the case you save your DDLs as I do), I would suggest
one of the following options for newfield (using only one space between
apostrophes):

1) Cast(' ' as char(35) ) as newField
2) Repeat(' ', 35) as newField


Regards

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


On Fri, Apr 30, 2010 at 10:48 PM, Dennis Lovelady <iseries@xxxxxxxxxxxx>wrote:

select field1, field2, char(35) as newfield, field3 from oldfile

FIELD1 FIELD2 FIELD4 FIELD3
a b 35 c
d e 35 f
g h 35 i
******** End of data ********


How about this:

select field1, field2, ' (total 35 spaces) ' as newfield, field3
from oldfile

Should do the trick.

Joe

Golly Jeepers, Joe! Glenn is not the only tired one, huh?!!? How did I
miss that?!?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Thought for the day:
"Smile", they said, "it could be worse!" So I did, and it was.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.