Hi,
It should look like this:
CREATE FUNCTION cyl_receipt_details_func (@cylinder_no_get INT)
RETURNS TABLE
AS
RETURN
SELECT cylinder_no,
supplier_name,
gas_type,
receipt_date,
dc_no,
dc_date,
receipt_qty,
uom,
flag,
tran_stat,
receipt_tran_date,
receipt_modified_date
FROM tbl_cyl_gas_main
WHERE cylinder_no = @cylinder_no_get;
Because it is a table-valued function, you have to use it like this:
SELECT * FROM cyl_receipt_details_func(@cylinder_no_get);