Forum Replies Created

Viewing 15 posts - 1,936 through 1,950 (of 3,543 total)

  • RE: html results for compute values

    I am surprised that you get any result since there is an error in your query

    COMPUTE clause #1, aggregate expression #3 is not in the select list

    caused by avg(cast(((cast(sum(actkeystrokes)...

  • RE: fileLen VBA function in stored procedure

    I get an error with the quotes around the \

    other than that it works OK for me

    try changing to this

    dbo.udf_GetFileSize([CacheServers].[CachePath] + LEFT([DOCUMENT].[PHYSICAL_DOC_GUID],6) + '\' + [DOCUMENT].[PHYSICAL_DOC_GUID] + [DOCUMENT].[FileType])

    p.s.

    dbo.udf_GetFileSize is a...

  • RE: fileLen VBA function in stored procedure

    CREATE FUNCTION udf_GetFileSize (@filename varchar(255))

    RETURNS int

    AS

    BEGIN

    DECLARE @fso int

    DECLARE @res int

    DECLARE @file int

    DECLARE @size int

    EXECUTE @res = sp_OACreate 'Scripting.FileSystemObject', @fso OUT

    IF @res...

  • RE: insert into identity column

    quoteI'm not Vladen and not always

    My humble apologies Gila

  • RE: insert into identity column

    OK did not engage brain properly

    it is Friday afternoon after all

    Thanks for the reality check...

  • RE: fileLen VBA function in stored procedure

    1. Use sp_OAxxxxx OLE interfaces to utilise FileSyatemObject

    2. Create a extended stored procedure to get details

    p.s. there is an undocumented procedure xp_getfiledetails but may not be in future editions beyond...

  • quoteOtherwise the insert could fail, the delete succeed and the transaction be committed.

    True Gila, however if the...

  • RE: insert into identity column

    I'm with Vladan on this one

    But if you really must do this

    put query in a...

  • RE: Generate Dates not in table

    Yes and needs to contain sufficient numbers for the range required

    e.g. 0 to 30 for max days on 1 month

    or 0 to 44639 for max minutes in a month

    etc.

  • RE: Generate Dates not in table

    or

    DECLARE @start datetime, @end datetime, @minutes int

    SET @start = '20060301'

    SET @end = '20060331'

    SET @minutes = select DATEDIFF(minute,@start,@end+1)

    SELECT [ProblemType], COUNT(*)

    FROM (SELECT DISTINCT COALESCE(t.[ProblemType],'No Problem') AS [ProblemType], D.[Date]...

  • RE: Generate Dates not in table

    quoteSo, how can I list ALL dates within a month...

    DECLARE @start datetime, @end datetime, @days int

    SET...

  • RE: More than cross-tab

    Am I missing something obvious here

    SELECT source, cnt

    FROM @table

    GROUP BY source, cnt

    ORDER BY SUBSTRING(source,8,1) ,source, cnt

  • RE: Extracting text from a longer string

    If not then

    SUBSTRING([ReportPath],CHARINDEX('/',[ReportPath])+1,CHARINDEX('/',[ReportPath],CHARINDEX('/',[ReportPath])+1)-CHARINDEX('/',[ReportPath])-1)

  • RE: Extracting text from a longer string

    SUBSTRING([ReportPath],2,CHARINDEX('/',[ReportPath],2)-2)

    Is the first '/' always in column 1 ?

  • RE: String Parsing UDF

    Just as an exercise thought I'd try this as an exercise

    CREATE FUNCTION dbo.udf_Test (@value varchar(100))

    RETURNS varchar(100)

    AS

    BEGIN

      DECLARE @result varchar(100)

      SET @result = ''

      SELECT...

Viewing 15 posts - 1,936 through 1,950 (of 3,543 total)