[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: I am trying to update an oracle table with a numeric value wh ich needs to be eight positions. No ma



Or, if you cannot change the field from numeric to character type, maybe you 
can leave the database field the way it is
and display it with the leading zeroes when you want to read the value.  For 
example, if you were using SQR to get the
data out, and you knew you wanted eight positions, you could do something like

begin-select
this_field    ()  edit '00000000'
...
end-select


If you're looking at the data from some other reporting language or querying 
tool (e.g. PL/SQL), you should be able to
accomplish the same thing there.

hope this helps,
- Mark

-----Original Message-----
From: James Womeldorf [mailto:jwomeldo@FASTENAL.COM]
Sent: Thursday, July 12, 2001 1:51 PM
To: SQR-USERS@list.iex.net
Subject: Re: I am trying to update an oracle table with a numeric value
wh ich needs to be eight positions. No ma


If the leading zeros are important as data items then the field should be a
character field rather than numeric.  Then your leading zeros will 'stick'.

Jim Womeldorf
Programmer/Analyst
Fastenal Company
jwomeldo@fastenal.com
(507) 453-8250


-----Original Message-----
From: Peter Burton [mailto:pburton@BRIO.COM]
Sent: Thursday, July 12, 2001 11:54 AM
To: SQR-USERS@list.iex.net
Subject: Re: I am trying to update an oracle table with a numeric value
wh ich needs to be eight positions. No ma


If you want to have SQR display a number with leading zeros then you should
use the "0" edit mask as described in the SQR Language Reference Manual:

  Print 1234 () edit '099999'

would appear as

  001234

Peter Alan Burton, A.S.E.


-----Original Message-----
From: Charllotte Hurt [mailto:CHurt@YAR.MIRACOSTA.CC.CA.US]
Sent: Thursday, July 12, 2001 12:53 PM
To: SQR-USERS@list.iex.net
Subject: Re: I am trying to update an oracle table with a numeric value
which needs to be eight positions. No ma


Even when I edit the field using a character variable--and upon display it
shows 00001739--when I do the set on the update to this new variable, the
zeros are still stripped off.  I don't think I can change the value in the
database, a mod our dba would not want.


>>> Jason.Sekkes@STROEHMANN.COM 07/12/01 09:43AM >>>
If the field in Oracle is numeric you will not be able to get leading zeros
without editing the field when selecting it or changing the table definition
to alpha numeric.

Jason Sekkes
Programmer Analyst
Stroehmann Bakeries, LC
* (610)-631-8214
* Jason.Sekkes@Stroehmann.com


-----Original Message-----
From: Charllotte Hurt [mailto:CHurt@YAR.MIRACOSTA.CC.CA.US]
Sent: Thursday, July 12, 2001 12:30 PM
To: SQR-USERS@list.iex.net
Subject: I am trying to update an oracle table with a numeric value
which needs to be eight positions. No ma


I am trying to update an oracle table with a numeric value which needs to be
eight positions.  No matter what I try the number is coming out without the
leading zeros.  For example, the number should be 00001739, but the database
says 1739 after my update using sqr.

Even in sql if I say update table-in-question set field-in-question =
00001739, the value comes out in the database as 1739.

(The field is defined in the database as numeric.  I'm selecting the number
from the table and adding +1 to increment as I add records.)

Any help would be appreciated.  Thanks.

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.