Date: Tue, 7 May 2002 07:20:49 EDT
Reply-To: OlivHiller@AOL.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: OlivHiller@AOL.COM
Subject: Index usage - Where with upcase
Content-Type: multipart/alternative;
Hi,
Does anyone know why it is not possible to use an index with an
"Where"-expression, if I use the function upcase? For example:
----------------------------------
Options Msglevel=I; *Show usage of indexes;
Data Temp (Index=(Name)); *Create dataset and Index;
Input Name $ Letter $ @@;
Datalines;
Smith R Johnes X Porter L
Smith U Alan U Smith N
Run;
*Show part of dataset - Index used;
Proc Print Data=Temp (Idxwhere=Yes);
Where Name="Smith";
Run;
*Show part of dataset - Index not used;
Proc Print Data=Temp (Idxwhere=Yes);
Where Upcase(Name)="SMITH";
Run;
------------------------------------
The "Log"-window shows that the first "Proc Print" uses the index and the
second "Proc Print" does not.
Greetings Oliver
[text/html]
|