EXEC spBalanceRange @BalanceMin = 200, @BalanceMax = 100 What does the exec abov
ID: 3835293 • Letter: E
Question
EXEC spBalanceRange @BalanceMin = 200, @BalanceMax = 100
What does the exec above produce in terms of results.
If the maximum was coded to be $100, then nothing would be returned because there is no error-checking in the stored procedure, and you can't have a minimum of 200 and maximum of 100, thus no companies would fill that criteria
If I were to recode this statement with a @BalanceMax of 100, I would get an error because it is not possible to have a value between a min of 200 and max of 100.
It would return nothing, because the minimum and maximum amounts do produce a valid cross-section to return matching data.
In terms of results, this Exec returns Vendors with a balance between 200 and 100 dollars.
There are no Vendors with a 'Balance' between 100 and 200 dollars.
If the maximum was coded to be $100, then nothing would be returned because there is no error-checking in the stored procedure, and you can't have a minimum of 200 and maximum of 100, thus no companies would fill that criteria
If I were to recode this statement with a @BalanceMax of 100, I would get an error because it is not possible to have a value between a min of 200 and max of 100.
It would return nothing, because the minimum and maximum amounts do produce a valid cross-section to return matching data.
In terms of results, this Exec returns Vendors with a balance between 200 and 100 dollars.
There are no Vendors with a 'Balance' between 100 and 200 dollars.
Explanation / Answer
As the code of spBalanceRange is not provided below is the best of my understanding :
as the minimum balance is 200 which is greater than maximum balance ie 100 , there should be an error because there is no possibility of getting value in the range between min 200 and max 100.
so the option 2 is correct it :
If I were to recode this statement with a @BalanceMax of 100, I would get an error because it is not possible to have a value between a min of 200 and max of 100.
If I were to recode this statement with a @BalanceMax of 100, I would get an error because it is not possible to have a value between a min of 200 and max of 100.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.