August 1, 2006 at 10:07 pm
Hi,
Can we write a function,which returns two values...?
Is it possible...?
If yes,please give me a example...
Thanks,
Rao Aregaddan.
August 1, 2006 at 10:38 pm
Scalar? No.
Table-valued? Sure...
CREATE FUNCTION SalesByStore (@storeid varchar(30))
RETURNS TABLE
AS
RETURN (SELECT title, qty
FROM sales s, titles t
WHERE s.stor_id = @storeid and
t.title_id = s.title_id)
GO
select * from SalesByStore(3)
August 1, 2006 at 11:17 pm
Thanks For your solution...:-)
Rao Aregaddan.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy