? about how to return value from sp

  • Thread starter Thread starter EManning
  • Start date Start date
E

EManning

Using A2K adp and SQL2000.

I have an sp that returns a doctor's name along with their specialty. For
example:

John Doe (Radiology)

What I need to do is abbreviate the specialty. Radiology would be 'Rad',
Anesthesiology would be A, and so on. Since the list of specialties is so
long and there are other sp's that I'd like to format the doctor name the
same way, I'd like to pass the specialty to another sp to get the
abbreviation. Since I'm using an adp, I don't think I can create my own
function. Is there a way to do this thru another sp?

My sp to format the doctor name is like so currently:

SELECT tblDemographics.LastName + ', ' + tblDemographics.FirstName +

case

when tblDemographics.ResidencyTrack = 'Anesthesiology' then ' (Rad)'

when tblDemographics.ResidencyTrack = 'Radiology' then ' (A)'

-- and so on --

else ' ' + '(' + tblDemographics.ResidencyTrack + ')'

end as ResidentName
 
EManning said:
Using A2K adp and SQL2000.

I have an sp that returns a doctor's name along with their specialty. For
example:

John Doe (Radiology)

What I need to do is abbreviate the specialty. Radiology would be 'Rad',
Anesthesiology would be A, and so on. Since the list of specialties is so
long and there are other sp's that I'd like to format the doctor name the
same way, I'd like to pass the specialty to another sp to get the
abbreviation. Since I'm using an adp, I don't think I can create my own
function. Is there a way to do this thru another sp?

My sp to format the doctor name is like so currently:

SELECT tblDemographics.LastName + ', ' + tblDemographics.FirstName +

case

when tblDemographics.ResidencyTrack = 'Anesthesiology' then ' (Rad)'

when tblDemographics.ResidencyTrack = 'Radiology' then ' (A)'

-- and so on --

else ' ' + '(' + tblDemographics.ResidencyTrack + ')'

end as ResidentName
 
Back
Top