CREATE FUNCTION dbo.GetCustomers
(
@ZIPCode VARCHAR(255)
)
RETURNS TABLE
AS BEGIN
SELECT * dbo.GetCustomers
WHERE dbo.GetCustomers.ZIPCODE = ZIPCode
RETURN
END
Im not familar with the syntax. Please help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It would have been worth guessing that the parameter
@ZIPCodewould go into the query as@ZIPCodeYour first attempt
WHERE dbo.Customers.ZIPCODE = ZIPCodeis the same asWHERE dbo.Customers.ZIPCODE = dbo.CustomersZIPCode. That is, return all rows