Help with VARCHAR needed
Edis, Robert
Robert.Edis@blistex.com
Tue, 25 Mar 2003 09:26:30 -0600
As Quiz is meant to provide formatted output, especially to a printer, I
would not expect what you see to be anything less than either the size of
the longest value or the max potential size of the field.
Generally VARCHAR is used to A) conserve storage space as the actual amount
used will be the length of the value plus 1 byte and B) for better data
comparison as you don't need to worry about trailing blanks.
Oracle is not the only company that uses the VARCHAR data type. I know that
Microsoft does as well.
The big difference between outputting a CHAR vs. VARCHAR will occur in a
subfile. I expect a CHAR will be right padded with spaces to the size of
the field whereas VARCHAR will not thereby reducing the overall size of the
subfile.
Blue
-----Original Message-----
From: Leonard_Berkowitz@harvardpilgrim.org
[mailto:Leonard_Berkowitz@harvardpilgrim.org]
Sent: Tuesday, March 25, 2003 8:53 AM
To: terrycurran@onetel.net.uk
Cc: powerh-l@lists.swau.edu; powerh-l-admin@cube.swau.edu
Subject: RE: Help with VARCHAR needed
Terry Curran wrote:
<<I believe that VARCHAR only exists because Oracle has a VARCHAR
datatype, I don't think there is any valid use for it as PowerHouse
treats all string as fixed lengths, so VARCHAR*2000 will be the same as
CHAR*2000.
If you are outputting to Excel, then the fixed column format is probably
fine. Its one of the formats that excel is OK with importing. If you
start doing CSV files or anything else fancy like that then you will
have to start converting numbers to characters, etc. The only drawback
is that if you use the REPORT statement to output strings then the
maximum page witdh is 255. Generally I would uses a SUBFILE as the
output format, you would then need to adjust the format , and convert
everything to s character string. If you use a subfile in this way then
you probably should use a CSV format, and terminate each record with a
<CR><LF>, if you pack your strings to remove excess space then it
doesn't matter about having trailing spaces in the subfile records -
providing you end each set of data with <CR><LF>.
>>
Terry, thanks for your note. Yes my intention is to use a subfile,
ultimately. I am just using QUIZ to report to validate my logic.
Leonard
--
Leonard S. Berkowitz
Perot Health Care Systems
(Harvard Pilgrim Health Care account)
voice: 617-509-1212
fax: 617-509-1955
pager: 781-226-2431
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.