Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Problem with sp_executesql

    Thank you everyone for your help, especially Sean.

    The underlying problem was casting a varchar(max) into a decimal. If I change this to cast to a float the problem goes away.

    Many...

  • RE: Problem with sp_executesql

    Sean you are quite correct. I've a web application that users can pick fields from dropdowns & operators etc and enter selection criteria. This data is then used to dynamically...

  • RE: Problem with sp_executesql

    The CROSS APPLY seems to return the results in triplicate. I can't use DISTINCT as i've other columns in my select.

    The NOLOCK hint is for speed, the query is over...

  • RE: Problem with sp_executesql

    I included the definition of the function in my original post. The purpose of it is to take a delimeted string and return it as a table you are then...

  • RE: Problem with sp_executesql

    I've tried this

    set @sql = 'SELECT [id]

    FROM [dbo].[test] WITH (NOLOCK) WHERE id IN (select Item from dbo.FN_DELIMITED_STRING_TO_TABLE(''1000,2000,3000'','',''))

    ORDER BY id'

    as you suggested. The query when...

Viewing 5 posts - 1 through 5 (of 5 total)