Skip to content

Commit

Permalink
Invoke-DbaQuery, fixed example for TVP (#9247)
Browse files Browse the repository at this point in the history
  • Loading branch information
niphlod authored Feb 21, 2024
1 parent e13f779 commit be3976d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/Invoke-DbaQuery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ function Invoke-DbaQuery {
>> somedate = '2021-07-15T02:03:00'
>> }
>> $inparamAsDataTable = ConvertTo-DbaDataTable -InputObject $inparam
PS C:\> New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype'
PS C:\> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsDataTable
PS C:\> $inparamAsSQLParameter = New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype'
PS C:\> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsSQLParameter
Creates an TVP input parameter and uses it to invoke a stored procedure.
Expand Down

0 comments on commit be3976d

Please sign in to comment.