From: Wensui Liu on
this is exactly what i thought.
thanks, jack!

On Sat, Jan 2, 2010 at 1:18 AM, Jack Hamilton <jfh(a)alumni.stanford.org> wrote:
> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>
>> in this case, then what's the difference between varchar and char?
>
> None. They are synonyms in data sets created using the base SAS engine.
>
> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473683.htm
>
>
>
>
> --
> Jack Hamilton
> jfh(a)alumni.stanford.org
> Caelum non animum mutant qui trans mare currunt.
>
> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>
>> in this case, then what's the difference between varchar and char?
>>
>> On Sat, Jan 2, 2010 at 12:45 AM, Sigurd Hermansen <HERMANS1(a)westat.com> wrote:
>>> Wensui:
>>> Not to answer for Art, but try
>>> CREATE TABLE test(TEXT varchar 50);
>>>
>>> The length 50 could be set to a much larger value if required.
>>> S
>>>
>>> -----Original Message-----
>>> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Wensui Liu
>>> Sent: Friday, January 01, 2010 11:33 PM
>>> To: SAS-L(a)LISTSERV.UGA.EDU
>>> Subject: Re: does sas support varchar data type?
>>>
>>> as always, thank you so much, art!
>>> see the following code. is there a generic way to read the full string
>>> into table without specify the length?
>>>
>>> proc sql;
>>> CREATE TABLE test(TEXT varchar);
>>> insert into test values ('1234567890');
>>> quit;
>>>
>>> On Fri, Jan 1, 2010 at 11:20 PM, Arthur Tabachneck <art297(a)netscape.net> wrote:
>>>> Wensui,
>>>>
>>>> Take a look at:
>>>> http://books.google.ca/books?
>>>> id=uZYn6unDVtoC&pg=PT688&lpg=PT688&dq=sas+equivalent+varchar&source=bl&ots=r
>>>> 0a99KO47m&sig=6o_TIGSeiCe5-YdGy5-qnAcKqsw&hl=en&ei=lcg-
>>>> S6vdLszJlAfJu8yjBw&sa=X&oi=book_result&ct=result&resnum=2&ved=0CA4Q6AEwAQ#v=
>>>> onepage&q=sas%20equivalent%20varchar&f=false
>>>>
>>>> or, in short form: http://xrl.us/bgrsyh
>>>>
>>>> Art
>>>> -------
>>>> On Fri, 1 Jan 2010 22:46:44 -0500, Wensui Liu <liuwensui(a)GMAIL.COM> wrote:
>>>>
>>>>> joe
>>>>> varchar is character data type of indeterminate length. try this
>>>>> proc sql;
>>>>> create table test(TEXT varchar);
>>>>> insert into test values('1234567890');
>>>>> quit;
>>>>>
>>>>>
>>>>> On Fri, Jan 1, 2010 at 10:40 PM, Joe Matise <snoopy369(a)gmail.com> wrote:
>>>>>> VARCHAR is a SQL data type. SAS has character variables, just not called
>>>>>> VARCHAR. If you're noting that SAS doesn't have variable length
>>>> characters,
>>>>>> look at COMPRESS dataset/system option; make your characters long enough,
>>>>>> and then COMPRESS will make the space that wasn't being used go away.
>>>> SAS
>>>>>> doesn't natively do this, presumably for reasons of simplicity of storage
>>>>>> [knowing how big each row is ahead of time allows it to specify how much
>>>>>> storage space to use].
>>>>>>
>>>>>> -Joe
>>>>>>
>>>>>> On Fri, Jan 1, 2010 at 9:31 PM, Wensui Liu <liuwensui(a)gmail.com> wrote:
>>>>>>>
>>>>>>> i couldn't find any evidence that sas/base supports varchar data type.
>>>>>>> a little surprise though.
>>>>>>> any insight or experience?
>>>>>>>
>>>>>>> thank you so much and have a happy 2010!
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ==============================
>>>>> WenSui Liu
>>>>> Blog : statcompute.spaces.live.com
>>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>>>> ==============================
>>>>
>>>
>>>
>>>
>>> --
>>> ==============================
>>> WenSui Liu
>>> Blog : statcompute.spaces.live.com
>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>> ==============================
>>>
>>
>>
>>
>> --
>> ==============================
>> WenSui Liu
>> Blog : statcompute.spaces.live.com
>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>> ==============================
>
>



--
==============================
WenSui Liu
Blog : statcompute.spaces.live.com
Tough Times Never Last. But Tough People Do. - Robert Schuller
==============================
From: Arthur Tabachneck on
Wensui,

If the documentation is correct then I don't think that the answer is
"none." It states:

"Where possible define CHAR columns in place of VARCHAR and LONG
VARCHAR character Teradata columns. These data type changes can speed up
processing. But, only when you read the data using SAS/ACCESS. Therefore,
create anew table only if you intend to access the table primarily through
SAS/ACCESS.

Art
-------
On Sat, 2 Jan 2010 01:22:51 -0500, Wensui Liu <liuwensui(a)GMAIL.COM> wrote:

>this is exactly what i thought.
>thanks, jack!
>
>On Sat, Jan 2, 2010 at 1:18 AM, Jack Hamilton <jfh(a)alumni.stanford.org>
wrote:
>> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>>
>>> in this case, then what's the difference between varchar and char?
>>
>> None. They are synonyms in data sets created using the base SAS engine.
>>
>> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473683.htm
>>
>>
>>
>>
>> --
>> Jack Hamilton
>> jfh(a)alumni.stanford.org
>> Caelum non animum mutant qui trans mare currunt.
>>
>> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>>
>>> in this case, then what's the difference between varchar and char?
>>>
>>> On Sat, Jan 2, 2010 at 12:45 AM, Sigurd Hermansen <HERMANS1(a)westat.com>
wrote:
>>>> Wensui:
>>>> Not to answer for Art, but try
>>>> CREATE TABLE test(TEXT varchar 50);
>>>>
>>>> The length 50 could be set to a much larger value if required.
>>>> S
>>>>
>>>> -----Original Message-----
>>>> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
Wensui Liu
>>>> Sent: Friday, January 01, 2010 11:33 PM
>>>> To: SAS-L(a)LISTSERV.UGA.EDU
>>>> Subject: Re: does sas support varchar data type?
>>>>
>>>> as always, thank you so much, art!
>>>> see the following code. is there a generic way to read the full string
>>>> into table without specify the length?
>>>>
>>>> proc sql;
>>>> CREATE TABLE test(TEXT varchar);
>>>> insert into test values ('1234567890');
>>>> quit;
>>>>
>>>> On Fri, Jan 1, 2010 at 11:20 PM, Arthur Tabachneck
<art297(a)netscape.net> wrote:
>>>>> Wensui,
>>>>>
>>>>> Take a look at:
>>>>> http://books.google.ca/books?
>>>>>
id=uZYn6unDVtoC&pg=PT688&lpg=PT688&dq=sas+equivalent+varchar&source=bl&ots=r
>>>>> 0a99KO47m&sig=6o_TIGSeiCe5-YdGy5-qnAcKqsw&hl=en&ei=lcg-
>>>>>
S6vdLszJlAfJu8yjBw&sa=X&oi=book_result&ct=result&resnum=2&ved=0CA4Q6AEwAQ#v=
>>>>> onepage&q=sas%20equivalent%20varchar&f=false
>>>>>
>>>>> or, in short form: http://xrl.us/bgrsyh
>>>>>
>>>>> Art
>>>>> -------
>>>>> On Fri, 1 Jan 2010 22:46:44 -0500, Wensui Liu <liuwensui(a)GMAIL.COM>
wrote:
>>>>>
>>>>>> joe
>>>>>> varchar is character data type of indeterminate length. try this
>>>>>> proc sql;
>>>>>> create table test(TEXT varchar);
>>>>>> insert into test values('1234567890');
>>>>>> quit;
>>>>>>
>>>>>>
>>>>>> On Fri, Jan 1, 2010 at 10:40 PM, Joe Matise <snoopy369(a)gmail.com>
wrote:
>>>>>>> VARCHAR is a SQL data type. SAS has character variables, just not
called
>>>>>>> VARCHAR. If you're noting that SAS doesn't have variable length
>>>>> characters,
>>>>>>> look at COMPRESS dataset/system option; make your characters long
enough,
>>>>>>> and then COMPRESS will make the space that wasn't being used go
away.
>>>>> SAS
>>>>>>> doesn't natively do this, presumably for reasons of simplicity of
storage
>>>>>>> [knowing how big each row is ahead of time allows it to specify how
much
>>>>>>> storage space to use].
>>>>>>>
>>>>>>> -Joe
>>>>>>>
>>>>>>> On Fri, Jan 1, 2010 at 9:31 PM, Wensui Liu <liuwensui(a)gmail.com>
wrote:
>>>>>>>>
>>>>>>>> i couldn't find any evidence that sas/base supports varchar data
type.
>>>>>>>> a little surprise though.
>>>>>>>> any insight or experience?
>>>>>>>>
>>>>>>>> thank you so much and have a happy 2010!
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ==============================
>>>>>> WenSui Liu
>>>>>> Blog : statcompute.spaces.live.com
>>>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>>>>> ==============================
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ==============================
>>>> WenSui Liu
>>>> Blog : statcompute.spaces.live.com
>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>>> ==============================
>>>>
>>>
>>>
>>>
>>> --
>>> ==============================
>>> WenSui Liu
>>> Blog : statcompute.spaces.live.com
>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>> ==============================
>>
>>
>
>
>
>--
>==============================
>WenSui Liu
>Blog : statcompute.spaces.live.com
>Tough Times Never Last. But Tough People Do. - Robert Schuller
>==============================
From: Joe Matise on
I'm a bit confused [or perhaps only partially awake]. When did teradata
come into this?

-Joe

On Sat, Jan 2, 2010 at 11:21 AM, Arthur Tabachneck <art297(a)netscape.net>wrote:

> Wensui,
>
> If the documentation is correct then I don't think that the answer is
> "none." It states:
>
> "Where possible define CHAR columns in place of VARCHAR and LONG
> VARCHAR character Teradata columns. These data type changes can speed up
> processing. But, only when you read the data using SAS/ACCESS. Therefore,
> create anew table only if you intend to access the table primarily through
> SAS/ACCESS.
>
> Art
> -------
> On Sat, 2 Jan 2010 01:22:51 -0500, Wensui Liu <liuwensui(a)GMAIL.COM> wrote:
>
> >this is exactly what i thought.
> >thanks, jack!
> >
> >On Sat, Jan 2, 2010 at 1:18 AM, Jack Hamilton <jfh(a)alumni.stanford.org>
> wrote:
> >> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
> >>
> >>> in this case, then what's the difference between varchar and char?
> >>
> >> None. They are synonyms in data sets created using the base SAS engine.
> >>
> >>
> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473683.htm
> >>
> >>
> >>
> >>
> >> --
> >> Jack Hamilton
> >> jfh(a)alumni.stanford.org
> >> Caelum non animum mutant qui trans mare currunt.
> >>
> >> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
> >>
> >>> in this case, then what's the difference between varchar and char?
> >>>
> >>> On Sat, Jan 2, 2010 at 12:45 AM, Sigurd Hermansen <HERMANS1(a)westat.com
> >
> wrote:
> >>>> Wensui:
> >>>> Not to answer for Art, but try
> >>>> CREATE TABLE test(TEXT varchar 50);
> >>>>
> >>>> The length 50 could be set to a much larger value if required.
> >>>> S
> >>>>
> >>>> -----Original Message-----
> >>>> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
> Wensui Liu
> >>>> Sent: Friday, January 01, 2010 11:33 PM
> >>>> To: SAS-L(a)LISTSERV.UGA.EDU
> >>>> Subject: Re: does sas support varchar data type?
> >>>>
> >>>> as always, thank you so much, art!
> >>>> see the following code. is there a generic way to read the full string
> >>>> into table without specify the length?
> >>>>
> >>>> proc sql;
> >>>> CREATE TABLE test(TEXT varchar);
> >>>> insert into test values ('1234567890');
> >>>> quit;
> >>>>
> >>>> On Fri, Jan 1, 2010 at 11:20 PM, Arthur Tabachneck
> <art297(a)netscape.net> wrote:
> >>>>> Wensui,
> >>>>>
> >>>>> Take a look at:
> >>>>> http://books.google.ca/books?
> >>>>>
>
> id=uZYn6unDVtoC&pg=PT688&lpg=PT688&dq=sas+equivalent+varchar&source=bl&ots=r
> >>>>> 0a99KO47m&sig=6o_TIGSeiCe5-YdGy5-qnAcKqsw&hl=en&ei=lcg-
> >>>>>
>
> S6vdLszJlAfJu8yjBw&sa=X&oi=book_result&ct=result&resnum=2&ved=0CA4Q6AEwAQ#v=
> >>>>> onepage&q=sas%20equivalent%20varchar&f=false
> >>>>>
> >>>>> or, in short form: http://xrl.us/bgrsyh
> >>>>>
> >>>>> Art
> >>>>> -------
> >>>>> On Fri, 1 Jan 2010 22:46:44 -0500, Wensui Liu <liuwensui(a)GMAIL.COM>
> wrote:
> >>>>>
> >>>>>> joe
> >>>>>> varchar is character data type of indeterminate length. try this
> >>>>>> proc sql;
> >>>>>> create table test(TEXT varchar);
> >>>>>> insert into test values('1234567890');
> >>>>>> quit;
> >>>>>>
> >>>>>>
> >>>>>> On Fri, Jan 1, 2010 at 10:40 PM, Joe Matise <snoopy369(a)gmail.com>
> wrote:
> >>>>>>> VARCHAR is a SQL data type. SAS has character variables, just not
> called
> >>>>>>> VARCHAR. If you're noting that SAS doesn't have variable length
> >>>>> characters,
> >>>>>>> look at COMPRESS dataset/system option; make your characters long
> enough,
> >>>>>>> and then COMPRESS will make the space that wasn't being used go
> away.
> >>>>> SAS
> >>>>>>> doesn't natively do this, presumably for reasons of simplicity of
> storage
> >>>>>>> [knowing how big each row is ahead of time allows it to specify how
> much
> >>>>>>> storage space to use].
> >>>>>>>
> >>>>>>> -Joe
> >>>>>>>
> >>>>>>> On Fri, Jan 1, 2010 at 9:31 PM, Wensui Liu <liuwensui(a)gmail.com>
> wrote:
> >>>>>>>>
> >>>>>>>> i couldn't find any evidence that sas/base supports varchar data
> type.
> >>>>>>>> a little surprise though.
> >>>>>>>> any insight or experience?
> >>>>>>>>
> >>>>>>>> thank you so much and have a happy 2010!
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> ==============================
> >>>>>> WenSui Liu
> >>>>>> Blog : statcompute.spaces.live.com
> >>>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
> >>>>>> ==============================
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> ==============================
> >>>> WenSui Liu
> >>>> Blog : statcompute.spaces.live.com
> >>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
> >>>> ==============================
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> ==============================
> >>> WenSui Liu
> >>> Blog : statcompute.spaces.live.com
> >>> Tough Times Never Last. But Tough People Do. - Robert Schuller
> >>> ==============================
> >>
> >>
> >
> >
> >
> >--
> >==============================
> >WenSui Liu
> >Blog : statcompute.spaces.live.com
> >Tough Times Never Last. But Tough People Do. - Robert Schuller
> >==============================
>
From: Arthur Tabachneck on
Joe,

It came in when I first responded to Wensui. The 'varchar' reference I
quoted, and my original link, was from the documentation for the SAS/Access
product for Teradata.

Art
-------
On Sat, 2 Jan 2010 11:23:49 -0600, Joe Matise <snoopy369(a)GMAIL.COM> wrote:

>I'm a bit confused [or perhaps only partially awake]. When did teradata
>come into this?
>
>-Joe
>
>On Sat, Jan 2, 2010 at 11:21 AM, Arthur Tabachneck
<art297(a)netscape.net>wrote:
>
>> Wensui,
>>
>> If the documentation is correct then I don't think that the answer is
>> "none." It states:
>>
>> "Where possible define CHAR columns in place of VARCHAR and LONG
>> VARCHAR character Teradata columns. These data type changes can speed up
>> processing. But, only when you read the data using SAS/ACCESS. Therefore,
>> create anew table only if you intend to access the table primarily
through
>> SAS/ACCESS.
>>
>> Art
>> -------
>> On Sat, 2 Jan 2010 01:22:51 -0500, Wensui Liu <liuwensui(a)GMAIL.COM>
wrote:
>>
>> >this is exactly what i thought.
>> >thanks, jack!
>> >
>> >On Sat, Jan 2, 2010 at 1:18 AM, Jack Hamilton <jfh(a)alumni.stanford.org>
>> wrote:
>> >> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>> >>
>> >>> in this case, then what's the difference between varchar and char?
>> >>
>> >> None. They are synonyms in data sets created using the base SAS
engine.
>> >>
>> >>
>> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473683.htm
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Jack Hamilton
>> >> jfh(a)alumni.stanford.org
>> >> Caelum non animum mutant qui trans mare currunt.
>> >>
>> >> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>> >>
>> >>> in this case, then what's the difference between varchar and char?
>> >>>
>> >>> On Sat, Jan 2, 2010 at 12:45 AM, Sigurd Hermansen
<HERMANS1(a)westat.com
>> >
>> wrote:
>> >>>> Wensui:
>> >>>> Not to answer for Art, but try
>> >>>> CREATE TABLE test(TEXT varchar 50);
>> >>>>
>> >>>> The length 50 could be set to a much larger value if required.
>> >>>> S
>> >>>>
>> >>>> -----Original Message-----
>> >>>> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
>> Wensui Liu
>> >>>> Sent: Friday, January 01, 2010 11:33 PM
>> >>>> To: SAS-L(a)LISTSERV.UGA.EDU
>> >>>> Subject: Re: does sas support varchar data type?
>> >>>>
>> >>>> as always, thank you so much, art!
>> >>>> see the following code. is there a generic way to read the full
string
>> >>>> into table without specify the length?
>> >>>>
>> >>>> proc sql;
>> >>>> CREATE TABLE test(TEXT varchar);
>> >>>> insert into test values ('1234567890');
>> >>>> quit;
>> >>>>
>> >>>> On Fri, Jan 1, 2010 at 11:20 PM, Arthur Tabachneck
>> <art297(a)netscape.net> wrote:
>> >>>>> Wensui,
>> >>>>>
>> >>>>> Take a look at:
>> >>>>> http://books.google.ca/books?
>> >>>>>
>>
>>
id=uZYn6unDVtoC&pg=PT688&lpg=PT688&dq=sas+equivalent+varchar&source=bl&ots=r
>> >>>>> 0a99KO47m&sig=6o_TIGSeiCe5-YdGy5-qnAcKqsw&hl=en&ei=lcg-
>> >>>>>
>>
>>
S6vdLszJlAfJu8yjBw&sa=X&oi=book_result&ct=result&resnum=2&ved=0CA4Q6AEwAQ#v=
>> >>>>> onepage&q=sas%20equivalent%20varchar&f=false
>> >>>>>
>> >>>>> or, in short form: http://xrl.us/bgrsyh
>> >>>>>
>> >>>>> Art
>> >>>>> -------
>> >>>>> On Fri, 1 Jan 2010 22:46:44 -0500, Wensui Liu <liuwensui(a)GMAIL.COM>
>> wrote:
>> >>>>>
>> >>>>>> joe
>> >>>>>> varchar is character data type of indeterminate length. try this
>> >>>>>> proc sql;
>> >>>>>> create table test(TEXT varchar);
>> >>>>>> insert into test values('1234567890');
>> >>>>>> quit;
>> >>>>>>
>> >>>>>>
>> >>>>>> On Fri, Jan 1, 2010 at 10:40 PM, Joe Matise <snoopy369(a)gmail.com>
>> wrote:
>> >>>>>>> VARCHAR is a SQL data type. SAS has character variables, just
not
>> called
>> >>>>>>> VARCHAR. If you're noting that SAS doesn't have variable length
>> >>>>> characters,
>> >>>>>>> look at COMPRESS dataset/system option; make your characters long
>> enough,
>> >>>>>>> and then COMPRESS will make the space that wasn't being used go
>> away.
>> >>>>> SAS
>> >>>>>>> doesn't natively do this, presumably for reasons of simplicity of
>> storage
>> >>>>>>> [knowing how big each row is ahead of time allows it to specify
how
>> much
>> >>>>>>> storage space to use].
>> >>>>>>>
>> >>>>>>> -Joe
>> >>>>>>>
>> >>>>>>> On Fri, Jan 1, 2010 at 9:31 PM, Wensui Liu <liuwensui(a)gmail.com>
>> wrote:
>> >>>>>>>>
>> >>>>>>>> i couldn't find any evidence that sas/base supports varchar data
>> type.
>> >>>>>>>> a little surprise though.
>> >>>>>>>> any insight or experience?
>> >>>>>>>>
>> >>>>>>>> thank you so much and have a happy 2010!
>> >>>>>>>
>> >>>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> ==============================
>> >>>>>> WenSui Liu
>> >>>>>> Blog : statcompute.spaces.live.com
>> >>>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>> >>>>>> ==============================
>> >>>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> ==============================
>> >>>> WenSui Liu
>> >>>> Blog : statcompute.spaces.live.com
>> >>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>> >>>> ==============================
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> ==============================
>> >>> WenSui Liu
>> >>> Blog : statcompute.spaces.live.com
>> >>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>> >>> ==============================
>> >>
>> >>
>> >
>> >
>> >
>> >--
>> >==============================
>> >WenSui Liu
>> >Blog : statcompute.spaces.live.com
>> >Tough Times Never Last. But Tough People Do. - Robert Schuller
>> >==============================
>>
From: Wensui Liu on
thanks so much, art, although my original post was about sas/base
instead of sas/access.

On Sat, Jan 2, 2010 at 12:21 PM, Arthur Tabachneck <art297(a)netscape.net> wrote:
> Wensui,
>
> If the documentation is correct then I don't think that the answer is
> "none." It states:
>
> "Where possible define CHAR columns in place of VARCHAR and LONG
> VARCHAR character Teradata columns. These data type changes can speed up
> processing. But, only when you read the data using SAS/ACCESS. Therefore,
> create anew table only if you intend to access the table primarily through
> SAS/ACCESS.
>
> Art
> -------
> On Sat, 2 Jan 2010 01:22:51 -0500, Wensui Liu <liuwensui(a)GMAIL.COM> wrote:
>
>>this is exactly what i thought.
>>thanks, jack!
>>
>>On Sat, Jan 2, 2010 at 1:18 AM, Jack Hamilton <jfh(a)alumni.stanford.org>
> wrote:
>>> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>>>
>>>> in this case, then what's the difference between varchar and char?
>>>
>>> None. They are synonyms in data sets created using the base SAS engine.
>>>
>>> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473683.htm
>>>
>>>
>>>
>>>
>>> --
>>> Jack Hamilton
>>> jfh(a)alumni.stanford.org
>>> Caelum non animum mutant qui trans mare currunt.
>>>
>>> On Jan 1, 2010, at 10:01 pm, Wensui Liu wrote:
>>>
>>>> in this case, then what's the difference between varchar and char?
>>>>
>>>> On Sat, Jan 2, 2010 at 12:45 AM, Sigurd Hermansen <HERMANS1(a)westat.com>
> wrote:
>>>>> Wensui:
>>>>> Not to answer for Art, but try
>>>>> CREATE TABLE test(TEXT varchar 50);
>>>>>
>>>>> The length 50 could be set to a much larger value if required.
>>>>> S
>>>>>
>>>>> -----Original Message-----
>>>>> From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
> Wensui Liu
>>>>> Sent: Friday, January 01, 2010 11:33 PM
>>>>> To: SAS-L(a)LISTSERV.UGA.EDU
>>>>> Subject: Re: does sas support varchar data type?
>>>>>
>>>>> as always, thank you so much, art!
>>>>> see the following code. is there a generic way to read the full string
>>>>> into table without specify the length?
>>>>>
>>>>> proc sql;
>>>>> CREATE TABLE test(TEXT varchar);
>>>>> insert into test values ('1234567890');
>>>>> quit;
>>>>>
>>>>> On Fri, Jan 1, 2010 at 11:20 PM, Arthur Tabachneck
> <art297(a)netscape.net> wrote:
>>>>>> Wensui,
>>>>>>
>>>>>> Take a look at:
>>>>>> http://books.google.ca/books?
>>>>>>
> id=uZYn6unDVtoC&pg=PT688&lpg=PT688&dq=sas+equivalent+varchar&source=bl&ots=r
>>>>>> 0a99KO47m&sig=6o_TIGSeiCe5-YdGy5-qnAcKqsw&hl=en&ei=lcg-
>>>>>>
> S6vdLszJlAfJu8yjBw&sa=X&oi=book_result&ct=result&resnum=2&ved=0CA4Q6AEwAQ#v=
>>>>>> onepage&q=sas%20equivalent%20varchar&f=false
>>>>>>
>>>>>> or, in short form: http://xrl.us/bgrsyh
>>>>>>
>>>>>> Art
>>>>>> -------
>>>>>> On Fri, 1 Jan 2010 22:46:44 -0500, Wensui Liu <liuwensui(a)GMAIL.COM>
> wrote:
>>>>>>
>>>>>>> joe
>>>>>>> varchar is character data type of indeterminate length. try this
>>>>>>> proc sql;
>>>>>>> create table test(TEXT varchar);
>>>>>>> insert into test values('1234567890');
>>>>>>> quit;
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jan 1, 2010 at 10:40 PM, Joe Matise <snoopy369(a)gmail.com>
> wrote:
>>>>>>>> VARCHAR is a SQL data type. SAS has character variables, just not
> called
>>>>>>>> VARCHAR. If you're noting that SAS doesn't have variable length
>>>>>> characters,
>>>>>>>> look at COMPRESS dataset/system option; make your characters long
> enough,
>>>>>>>> and then COMPRESS will make the space that wasn't being used go
> away.
>>>>>> SAS
>>>>>>>> doesn't natively do this, presumably for reasons of simplicity of
> storage
>>>>>>>> [knowing how big each row is ahead of time allows it to specify how
> much
>>>>>>>> storage space to use].
>>>>>>>>
>>>>>>>> -Joe
>>>>>>>>
>>>>>>>> On Fri, Jan 1, 2010 at 9:31 PM, Wensui Liu <liuwensui(a)gmail.com>
> wrote:
>>>>>>>>>
>>>>>>>>> i couldn't find any evidence that sas/base supports varchar data
> type.
>>>>>>>>> a little surprise though.
>>>>>>>>> any insight or experience?
>>>>>>>>>
>>>>>>>>> thank you so much and have a happy 2010!
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ==============================
>>>>>>> WenSui Liu
>>>>>>> Blog : statcompute.spaces.live.com
>>>>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>>>>>> ==============================
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ==============================
>>>>> WenSui Liu
>>>>> Blog : statcompute.spaces.live.com
>>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>>>> ==============================
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ==============================
>>>> WenSui Liu
>>>> Blog : statcompute.spaces.live.com
>>>> Tough Times Never Last. But Tough People Do. - Robert Schuller
>>>> ==============================
>>>
>>>
>>
>>
>>
>>--
>>==============================
>>WenSui Liu
>>Blog : statcompute.spaces.live.com
>>Tough Times Never Last. But Tough People Do. - Robert Schuller
>>==============================
>



--
==============================
WenSui Liu
Blog : statcompute.spaces.live.com
Tough Times Never Last. But Tough People Do. - Robert Schuller
==============================