Viewing 15 posts - 1 through 15 (of 17 total)
SELECT CASE WHEN MONTH(DueDate)=5 THEN DueDate END AS DT
FROM [AdventureWorks].[Purchasing].[PurchaseOrderDetail]
where DueDate is not null
June 5, 2012 at 10:44 pm
Thank you for the responses. I'll try not to use views. 🙂
June 5, 2012 at 6:20 pm
I'm sorry. It was a bad and confusing example. If field2 contains values 1-10 and some of them are null, I only want to display the values that aren't null...
June 3, 2012 at 11:35 pm
CREATE FUNCTION dbo.itvfCalc(@Val1 INT, @Val2 INT)
RETURNS TABLE As
RETURN SELECT @Val1 * @Val2 As Val3
--this returns 5 records
SELECT P.[ListPrice]*PH.StandardCost
FROM [AdventureWorks].[Production].[Product] P
INNER JOIN [AdventureWorks].[Production].[ProductCostHistory] PH ON P.ProductID = PH.ProductID
WHERE PH.[StandardCost]...
May 28, 2012 at 3:20 pm
I'm getting more records when I use a function. I just want the function to perform a calculation on certain fields. :crazy:
May 28, 2012 at 1:27 pm
I have about 1.5 million records in Table2. When should I use in-line table valued function as suggested by RBarryYoung vs CLR as suggested by Rock?
May 28, 2012 at 10:19 am
Viewing 15 posts - 1 through 15 (of 17 total)