dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Export-DbaBinaryFile - Description for Example #4 doesn't match code

Open paschott opened this issue 3 years ago • 1 comments

We see this in the Get-Help:

-------------------------- EXAMPLE 4 --------------------------

 PS C:\> Export-DbaBinaryFile -SqlInstance sqlcs -Database employees -Table photos -Query "SELECT [FileName],
[Data] FROM [employees].[dbo].[photos] WHERE FirstName = 'Potato' and LastName = 'Qualitee'" -FilePath
C:\temp\PotatoQualitee.jpg

Exports all binary files from the photos table in the employees database on sqlcs to C:\temp\exports. Uses the
fname and data columns for the filename and binary data.

I would expect something more like: Export the Data from the photos table in the employees database on the sqlcs server for FirstName "Potato" and LastName "Qualitee". Export to a file named "C:\temp\PotatoQualitee.jpg"

I'm guessing a little bit at what this should do. Not sure if there's some way to use a column or computed value from the Query to pass over as a filename parameter.

paschott avatar Sep 08 '22 20:09 paschott

Thank you! Fixing this today with some help generated by GitHub Copilot :O

potatoqualitee avatar Sep 09 '22 08:09 potatoqualitee

Can we close this as fixed?

andreasjordan avatar Jun 10 '23 15:06 andreasjordan

Will close this now, but can reopen if needed.

andreasjordan avatar Jun 21 '23 05:06 andreasjordan