Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display initials in view...bad performance. Help needed 1

Status
Not open for further replies.

bridgeconsultant

IS-IT--Management
Oct 17, 2003
13
GB
Hello,

We're getting bad performance when attempting to only display user initials on a report (using a view). Any ideas on a better way of getting user initials?

V2R5

SQL (FYI: if it was a null in the source, we put a '!' in the warehouse):

SELECT (CASE WHEN T9.ContactFirstName <> '!'
THEN SUBSTR(T9.ContactFirstName,1,1) ELSE '' END)||
(CASE WHEN T9.ContactMiddleName <> '!'
THEN SUBSTR(T9.ContactMiddleName,1,1) ELSE '' END)||
(CASE WHEN T9.ContactLastName <> '!'
THEN SUBSTR(T9.ContactLastName,1,1) ELSE '' END) UserInitials,


Help is greatly appreciated.
 
You are hitting a look up table with this correct? or are you hitting a fact table to retrieve the names?

If you are hitting the fact table for the names, then show the whole SQL and the indexes to the fact table.
 
Please disregard. I found a typo in the from clause (where it joins) in the developer's code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top