17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3: Accessing <strong>FILESTREAM</strong> Data from Client ApplicationsPathName() is a new intrinsic function available on the <strong>FILESTREAM</strong>-enabled column<strong>of</strong> a <strong>SQL</strong> <strong>Server</strong> 2008 database. Note that, unlike other T-<strong>SQL</strong> functions, PathName()is case sensitive. It returns the logical path to the physical file associated with a<strong>FILESTREAM</strong> data value. <strong>The</strong> example in Listing 3-3 retrieves the PathName() <strong>of</strong> theItemImage column from the Items table. <strong>The</strong> PathName() value returned by each<strong>FILESTREAM</strong> cell will be unique, pointing to the specific disk file associated with the datain the given <strong>FILESTREAM</strong> cell.SELECTItemNumber,ItemImage.PathName() AS LogicalPathFROM Items/*Item# LogicalPath------ --------------------------------------------------MS1001 \\JACOB-LAPTOP\<strong>SQL</strong>2008R2NOV\v1\

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!