USE THE AdventureWorks2012 sample database to answer the questions
Posted: Mon Jun 06, 2022 11:17 am
USE THE AdventureWorks2012 sample database to answer the questions
1. Create a user-defined function called dbo.fn_AddTwoNumbers that accepts two integer parameters. Return the value that is the sum of the two numbers. Test the function. (15 points) Results Messages (No column name) 13 2. Create a user-defined function called dbo. Trim that takes a VARCHAR(250) parameter. This function should trim off the spaces from both the beginning and the end of the string. Test the function. (15 points) Results Messages (No column name) 1 Test 3. Write a function called dbo.fn_FormatPhone that takes a string of ten numbers. The function will format the string into this phone number format: "(###) ###-####." Test the function. (15 points) Results Messages (No column name) (555) 555-1234 1
1. Create a user-defined function called dbo.fn_AddTwoNumbers that accepts two integer parameters. Return the value that is the sum of the two numbers. Test the function. (15 points) Results Messages (No column name) 13 2. Create a user-defined function called dbo. Trim that takes a VARCHAR(250) parameter. This function should trim off the spaces from both the beginning and the end of the string. Test the function. (15 points) Results Messages (No column name) 1 Test 3. Write a function called dbo.fn_FormatPhone that takes a string of ten numbers. The function will format the string into this phone number format: "(###) ###-####." Test the function. (15 points) Results Messages (No column name) (555) 555-1234 1