Exporting to Excel or SQL

I need to export the drawing name and revision to a spreadsheet or SQL table.  My file names are the same as the drawing names and the revision is a property in the drawing file but I a variable listed in the column view that is updated when the files are checked in.  Does anyone have a query (.crp file) that can do this?

SolidworksSolidworks Pdm enterprise Pdm