Heres an extract of a stored procedure creating a column.
Path = FileLen([CacheServers].[CachePath]+
(left([DOCUMENT]. [PHYSICAL_DOC_GUID],6))+''''+[DOCUMENT]
.[PHYSICAL_DOC_GUID]+[DOCUMENT].[FileType])
Reult:
\\comp-ap- 70c\Imxxs$\data\docs\70393C\70393CE0EC6D
11D8BB64000D568A4637.tif
The above is a file path of an image stored on the SAN server. The code
above works perfectly fine in MS Access but not in SQL server 2K
It should return the size in bytes of the file.
Books online state the VBA function fileLen() works in SQL Analyser,
however, when I execute the stored procedure I receive an error message
"FileLen is not a recognised function name".
I cant find a thing on the Microsoft Tech communities the specifically
relates to calling VBA functions in SQL.
Any ideas?
Learning SQL and AccessIs there something wrong with the LEN function? Or DATALENGTH?
MC
"sebastian stephenson" <sebastianstephenson@.discussions.microsoft.com> wrote
in message news:E9F88AB0-05A3-4BE6-9EB0-6314A7685359@.microsoft.com...
> Heres an extract of a stored procedure creating a column.
> Path = FileLen([CacheServers].[CachePath]+
> (left([DOCUMENT]. [PHYSICAL_DOC_GUID],6))+''''+[DOCUMENT]
.[PHYSICAL_DOC_GUID]+[DOCUMENT].[FileType])
> Reult:
> \\comp-ap- 70c\Imxxs$\data\docs\70393C\70393CE0EC6D
11D8BB64000D568A4637.tif
> The above is a file path of an image stored on the SAN server. The code
> above works perfectly fine in MS Access but not in SQL server 2K
> It should return the size in bytes of the file.
> Books online state the VBA function fileLen() works in SQL Analyser,
> however, when I execute the stored procedure I receive an error message
> "FileLen is not a recognised function name".
> I cant find a thing on the Microsoft Tech communities the specifically
> relates to calling VBA functions in SQL.
> Any ideas?
> --
> Learning SQL and Access|||> Books online state the VBA function fileLen() works in SQL Analyser,
> however, when I execute the stored procedure I receive an error message
Where does it say that?
If you really need to check for file sizes from T-SQL you should look at the
sp_OA* system procedures. I'd suggest using an appropriate client applicatio
n
to supply the values to the server.
ML
http://milambda.blogspot.com/|||I obviously didnt understand you correctly. Is SQL Server 2005 an option?
You could use CLR for something like this.
MC
"MC" <marko_culo#@.#yahoo#.#com#> wrote in message
news:u%23FgSFLVGHA.524@.TK2MSFTNGP10.phx.gbl...
> Is there something wrong with the LEN function? Or DATALENGTH?
>
> MC
>
> "sebastian stephenson" <sebastianstephenson@.discussions.microsoft.com>
> wrote in message
> news:E9F88AB0-05A3-4BE6-9EB0-6314A7685359@.microsoft.com...
>
Wednesday, March 21, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment