GPEN · Question #224
Which of the following syntaxes is the correct syntax for the master.dbo.sp_makewebtask procedure?
The correct answer is B. sp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'. The sp_makewebtask procedure requires the @outputfile parameter to specify the HTML file destination and the @query parameter for the SQL query, with @outputfile listed first.
Question
Which of the following syntaxes is the correct syntax for the master.dbo.sp_makewebtask procedure?
Options
- Asp_makewebtask [@inputfile =] 'inputfile', [@query =] 'query'
- Bsp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'
- Csp_makewebtask [@query =] 'query', [@inputfile =] 'inputfile'
- Dsp_makewebtask [@query =] 'query', [@outputfile =] 'outputfile'
How the community answered
(18 responses)- A6% (1)
- B72% (13)
- C6% (1)
- D17% (3)
Why each option
The sp_makewebtask procedure requires the @outputfile parameter to specify the HTML file destination and the @query parameter for the SQL query, with @outputfile listed first.
There is no @inputfile parameter in sp_makewebtask; the procedure generates output from a query and writes it to a file rather than reading from an input file.
The correct syntax for master.dbo.sp_makewebtask is sp_makewebtask [@outputfile =] 'outputfile', [@query =] 'query'. The @outputfile parameter designates the path where the generated HTML results will be written, and @query supplies the T-SQL statement to execute - these two are the required parameters and must appear in this order.
This option reverses the required parameter order and incorrectly uses @inputfile, which is not a valid parameter for sp_makewebtask.
Although this option uses the correct @outputfile and @query parameters, the order is reversed - @outputfile must come before @query in the procedure signature.
Concept tested: SQL Server sp_makewebtask procedure parameter syntax
Source: https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-makewebtask-transact-sql
Topics
Community Discussion
No community discussion yet for this question.