Power2000

Deskin, Bob Bob.Deskin at Cognos.COM
Wed Sep 28 04:49:16 CDT 2005


Before anyone asks, please note that Power2000 is no longer available for sale. It was specifically designed for correcting Y2K issues and was removed from sale shortly after 2000 began.

Bob

-----Original Message-----
From: powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com
[mailto:powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com]On
Behalf Of Robert Edis
Sent: September 28, 2005 5:00 AM
To: PH List
Subject: RE: varchar vs char


varchar vs charAre you sure no Oracle RDBMS will load the trailing spaces in
this case?  It seems to me that you explicitly TELLING the code to do this!
I believe SQL Server will add the trailing spaces in a case like this and I
ALWAYS make sure I use RTRIM() when loading data.  The same applies to PH.
Using TRUNC() when loading a VARCHAR column should be second nature as long
as you don't want the trailing spaces.

To save time you can automate changes to your code using the wonderful
Power2000 tool from Cognos. :)

Blue

  -----Original Message-----
  From: powerh-l-bounces+robeconsult=sbcglobal.net at lists.sowder.com
[mailto:powerh-l-bounces+robeconsult=sbcglobal.net at lists.sowder.com]On
Behalf Of fernando.olmos at hpa.com.au
  Sent: Wednesday, September 28, 2005 4:44 PM
  To: powerh-l at lists.sowder.com
  Subject: varchar vs char


  Can someone please explain why this is happening and is it correct?

  Why is it that in PH (and this does not happen in Oracle), a column with a
varchar will retain any trailing spaces when data with spaces after the last
char is read into it?

  ie:
          define a varchar * 10 = "abc   "        ;has 3 spaces after the
'c' letter
          define b char*20 = "|" + a + "|"
          report a b
          go

  This shows ...

    A           B

    abc         |abc   |

  Of course if I change the B define to trunc() the A define it works ...

          define b char*20 = "|" + trunc(a) + "|"

  It won't make any difference if I change the char*20 to varchar*20 either.

  I don't want to have to use trunc(). We have tons of columns we're
migrating over to a new PH environment that are all varchars. I don't want
to have to specify trunc() on ever item that populates those columns. Is
there a setting in PH that tells the dictionary to "naturally" trunc()?

  Thanks again gang.

  Fernando Olmos
  M.I.S.

  HPA
  Direct:  03 9217 5411
  Mobile: 0410 382 857
  Fax:     03 9217 5716

  www.hpa.com.au



**********************************************************************
IMPORTANT
The contents of this e-mail and its attachments are confidential and
intended
solely for the use of the individual or entity to whom they are addressed.
If
you received this e-mail in error, please notify the HPA Postmaster,
postmaster at hpa.com.au,
then delete  the e-mail.
This footnote also confirms that this e-mail message has been swept for the
presence of computer viruses by Ironport. Before opening or using any
attachments, check them for viruses and defects.
Our liability is limited to resupplying any affected attachments.
HPA collects personal information to provide and market our services. For
more
information about use, disclosure and access see our Privacy Policy at
www.hpa.com.au
**********************************************************************

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber. 
  
       This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you. 
        
 



More information about the powerh-l mailing list