J
jeremyNYC
I've got this SP:
CREATE PROCEDURE
EWF_spCustom_AddProfiles_CompanyYear
@prmSchoolYear char(11)
AS
SELECT
ContactID
FROM
dbo.EWF_tblCustom_CompanyProfile
WHERE
SchoolYear = @prmSchoolYear
I'd like to be able to reference that in the where clause of another
SP. Is that possible?
I'd like to end up with something like this:
CREATE PROCEDURE
MyNewProc
@prmSchoolYear2 char(11)
AS
SELECT
ContactID, SomeOtherFields
FROM
tblContact
WHERE
ContactID IN (exec EWF_spCustom_AddProfiles_CompanyYear
@prmSchoolYear2)
How would I make that happen?
If this isn't possible, what else might I try?
Thanks much for any pointers.
Jeremy
CREATE PROCEDURE
EWF_spCustom_AddProfiles_CompanyYear
@prmSchoolYear char(11)
AS
SELECT
ContactID
FROM
dbo.EWF_tblCustom_CompanyProfile
WHERE
SchoolYear = @prmSchoolYear
I'd like to be able to reference that in the where clause of another
SP. Is that possible?
I'd like to end up with something like this:
CREATE PROCEDURE
MyNewProc
@prmSchoolYear2 char(11)
AS
SELECT
ContactID, SomeOtherFields
FROM
tblContact
WHERE
ContactID IN (exec EWF_spCustom_AddProfiles_CompanyYear
@prmSchoolYear2)
How would I make that happen?
If this isn't possible, what else might I try?
Thanks much for any pointers.
Jeremy