Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Length of varbinary(max) filestream on SQL Server 2008

Is there some efficient way how to get length of data in "varbinary(max) filestream" column? I found only samples with conversion to varchar and then calling the "LEN" function.

like image 856
TcKs Avatar asked Apr 14 '09 15:04

TcKs


1 Answers

SELECT
      length = DATALENGTH(Name),
      Name 
FROM 
      Production.Product 
ORDER BY 
      Name

"Returns the number of bytes used to represent any expression."

T-SQL and quote taken from MSDN's DATALENGTH (Transact-SQL) library.

like image 147
Jan Remunda Avatar answered Nov 15 '22 10:11

Jan Remunda