How can I In the same script write a statement that demonstrates a call to this function as part of a "Select". Include ItemID, ItemPrice, DiscountAmount along with the function in this statement. The function is fnDiscountPrice
Loading
How can I In the same script write a statement that demonstrates a call to this function as part of a "Select". Include ItemID, ItemPrice, DiscountAmount along with the function in this statement. The function is fnDiscountPrice
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Nov 11, 2022, 5:44 AM
you can even pass parameter as
Amit MohantyPosted Nov 11, 2022, 4:11 AM
Try this
Select ItemID, ItemPrice, DiscountAmount, dbo.fnDiscountPrice() as DiscountPrice From yourtablename.