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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass aparameter to SQL expression?

Status
Not open for further replies.

pgtek

Programmer
Sep 28, 2001
1,180
CA
hi

Can i pass a parameter to an SQL expression

here is what i have
(Select E.bandlabel
FROM ECL_Ranges E where E.testsectionabbr='S' AND
E.eclabbr = 'A' and E.FP_Key = 2)


i want to replace the
E.FP_Key = {?paramter}

is this possible?

if so how to do it

cheers


pgtek
 
You could just wrap the SQL inside a stored procedure and pass the parameter to that?

e.g.

create proceedure spnamehere
@parameter as nvarchar(50)
as

Select E.bandlabel
FROM ECL_Ranges E where E.testsectionabbr='S' AND
E.eclabbr = 'A' and E.FP_Key = @parameter


 
Yes, Crystal 9 and 10 support this using the add command and parameters.

Otherwise create a View and use CR parameters, or use a Stored Procedure (database dependent).

If you want better technical support, try posting your environment.

-k

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top