Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized SQL View
Message
 
 
To
29/04/2009 08:07:51
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Application:
Desktop
Miscellaneous
Thread ID:
01396883
Message ID:
01397234
Views:
70
You're welcome.

>OK i will see it
>Many Thanks for your reply
>
>>See CREATE FUNCTION in BOL
>>
>>>How to do that?
>>>
>>>>Make it into table-valued UDF.
>>>>
>>>>>
>>>>>I have a view that calculates the Stock Balance upto current date. It is working for me.
>>>>>
>>>>>
>>>>>SELECT     tmp.mcat_code, tmp.mat_code, Mat.mcat_desc, Mat.mat_desc, SUM(tmp.qty) AS qty
>>>>>FROM         (SELECT     mcat_code, mat_code, SUM(qty) AS qty
>>>>>                       FROM          mat_ob
>>>>>                       GROUP BY mcat_code, mat_code
>>>>>                       UNION
>>>>>                       SELECT     mcat_code, mat_code, SUM(qty) AS qty
>>>>>                       FROM         Purchase
>>>>>                       GROUP BY mcat_code, mat_code
>>>>>                       UNION
>>>>>                       SELECT     mcat_code, mat_code, SUM((con_qty + wst_qty) * - 1) AS qty
>>>>>                       FROM         Production
>>>>>                       GROUP BY mcat_code, mat_code ) AS tmp INNER JOIN
>>>>>                      Mat ON Mat.mcat_code + Mat.mat_code = tmp.mcat_code + tmp.mat_code
>>>>>GROUP BY tmp.mcat_code, tmp.mat_code, Mat.mcat_desc, Mat.mat_desc
>>>>>ORDER BY tmp.mcat_code, Mat.mat_desc
>>>>>
>>>>>
>>>>>What i do if I want stock balance for certain date. Parameterized view? how to create it?
>>>>>
>>>>>Zahid
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform