Thanks for your reply Birgitta
I typed the following in STRSQL to see the results
Select Repeat('0', 6 - Length(Trim(iitem))) concat Trim(Text) as
NewText, a.* from vitemd a
and this resulted in
Column TEXT not in specified tables.
am I missing something?
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
"Birgitta Hauser"
<Hauser@sss-softw
are.de> To
Sent by: "'Midrange Systems Technical
midrange-l-bounce Discussion'"
s@xxxxxxxxxxxx <midrange-l@xxxxxxxxxxxx>
cc
02/08/2010 09:09 Subject
AM AW: Using SQL to obtain a 6
character field from a 3, 4, 5 or
6 character string
Please respond to
Midrange Systems
Technical
Discussion
<midrange-l@midra
nge.com>
Sorry! Correction:
Select Repeat('0', 6 - Length(Trim(MyFld))) concat Trim(Text) as NewText,
a.*
From MyTable a
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Birgitta Hauser
Gesendet: Monday, 08. February 2010 14:55
An: 'Midrange Systems Technical Discussion'
Betreff: AW: Using SQL to obtain a 6 character field from a 3, 4, 5 or 6
character string
Hi,
Try the following:
Create View MySchema/MyView as
Select Repeat('0', Length(Trim(MyFld))) concat Trim(Text) as NewText,
a.*
From MyTable a
;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Alan Shore
Gesendet: Monday, 08. February 2010 14:32
An: Midrange Systems Technical Discussion
Betreff: Using SQL to obtain a 6 character field from a 3, 4, 5 or 6
character string
Good morning all
what I am trying to achieve sounds so familiar. I believe this was a
discussion that happened a couple of years ago, but I cannot seem to find
it.
Probably searching for the wrong thing
Anyway, heres my dilemma
I have a file with a 10 character field (lets call it FIELDA)
Within this FIELDA, I can have a 3, 4, 5, or 6 character string (not
necessarily left adjusted)
This string happens to be numeric (but for my purposes - it needs to remain
alpha)
I need to convert this numeric string into a 6 character string with
leading zeroes
AND
I need to create a view/index over this file using this new field as the
key
It being Monday morning, not having my 18th cup of coffee, bleary eyed from
staying up too long after the super bowl etc. etc.
I just cannot get my head around this, therefore, as always, any and all
help would be MUCH appreciated
Thanks in advance
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
--
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.
--
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.
--
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.