Forum Replies Created

Viewing 15 posts - 91 through 105 (of 198 total)

  • RE: error while executing sp_executesql

    Sorry Stefano,

    we appear to have been typing at the same time.

    This will never work matey:-

    Execute sp_executesql N'exec spGetAuthorsList @author_id, @FindExact' , N'@author_id varchar(10), @FindExact bit' ,  @author_id =...

  • RE: error while executing sp_executesql

    Hi,

    Provided you are not trying to return a value to the executing sproc you need to do this:-

    Execute sp_executesql N'spGetAuthorsList ''' + @author_id + ''', ' + CAST(@FindExact as varchar(6))

    Or...

  • RE: Where clause using parameters

    Forgot to mention - if you are doing Dynamic SQL within a stored procedure, when you EXEC the sql string, it generates a new SPID of its own. The sql...

  • RE: Where clause using parameters

    Hi All,

    Dynamic SQL has vulnerabilities - mainly based around web front ends. Just search for SQL Injection in Dynamic SQL. The risk is negligable if you are working on an...

  • RE: GoTo ????????

    Sorry gents,

    Posted - then had a week off and have just got back in the swing....

    I'm in complete agreement of using GoTo in error...

  • RE: sum of distinct records

    Simplified a touch:-

    select COUNT(DISTINCT(Name)) FROM

    Have fun

  • RE: select & string concatenation

    Nothing in ours either matey.....

    Have fun

  • RE: How to trap errors from nested stored procedures??

    Hi Ian,

    You are getting the error message because of these lines -

    set @b-2 = '123a'

    set @C = @a/@b

    You cant set the integer value...

  • RE: Tough Query

    Hi David,

    Works a treat, no problems - change the 5 to a 7 and it picks the ones running into weekends.

    Have fun

     

  • RE: Search for partial credit card number

    Hi Guys,

    Just a thought as I haven't got too much time to test it - how much difference to performance (If any) would this give:-

    SELECT CardNumber FROM CreditCardDetails

    WHERE RIGHT(CardNumber, 4)...

  • RE: Search for partial credit card number

    Steve,

    Just checking - There is an index on the card number field isn't there?

    Have fun

  • RE: Datatype question. Need to exceed varchar(8000) in stored proc.

    Hi Jason,

    Cant you just declare @Ntext1(4000), @NText2(4000), @NText3(4000), @NText4(4000). Portion up your message / e-mail and then SELECT @NText1 + @NText2 + @NText3 + @NText4.

    Have fun

  • RE: Tough Query

    Hi Noel,

    I know what you mean - the job spec isn't very clear.  Every time I read it I come up with a slightly different set of requirements. I'm sure there is...

  • RE: Tough Query

    Hi Noel,

    New someone would do it.....

    But - does it accomplish the original request?

    Correct me if i'm wrong...

  • RE: Tough Query

    Hi Eric,

    Had a quick play with this, I dont think it's something you are going to accomplish with 'straight' sql but I will happily await a couple of the Guru's...

Viewing 15 posts - 91 through 105 (of 198 total)