Forum Replies Created

Viewing 15 posts - 136 through 150 (of 199 total)

  • RE: Row Count of Insert stmt with sp

    Jonas,

    Looks like we where both typing at the same time.......

    Have fun

    Steve

    We need men who can dream of things that never were.

  • RE: Row Count of Insert stmt with sp

    Hi Jonas, 
     
    sp_executesql only takes sp_executesql [@stmt =] stmt
     
    You need to read a little more on the use of this sproc matey:-
     
    SET @sql =...

    Steve

    We need men who can dream of things that never were.

  • RE: Based on @error how to omit SQL err msg

    Jonas,

    You are actually getting 2 messages there, one generated by Sequel Server and your own printed immediately afterwards.

    Working in Query Analyser, I dont think there is any way of turning...

    Steve

    We need men who can dream of things that never were.

  • RE: Row Count of Insert stmt with sp

    Hi Jonas, David,

    I don't see why it isnt working either but one easy workaround would be to do some form of a count within the dynamic SQL and return both:-

    Execute sp_executesql...

    Steve

    We need men who can dream of things that never were.

  • RE: Conditional Date selection - Help needed

    Helen,

    There was definatley no intention to insult or offend. It was just Friday and wind down.....

    Frank, David - I think it must be me

    Have...

    Steve

    We need men who can dream of things that never were.

  • RE: Conditional Date selection - Help needed

    Nice one Frank,

    I will use that one on my kids.......

    Have a good weekend.

    Best Regards

    Steve

    We need men who can dream of things that never were.

  • RE: Binary Data conversion error in DTS.

    Hi,

    Looks like you have unicode data that you are passing into a binary field. Using an explicit CAST or CONVERT should cure the problem.

    Have fun.

    Steve

    We need men who can dream of things that never were.

  • RE: Conditional Date selection - Help needed

    Hi Gents,

    And its not even a Dynamic SQL question.......

    Steve

    We need men who can dream of things that never were.

  • RE: Conditional Date selection - Help needed

    Hi Helen,

    Does a straight WHERE clause not fulfill your requirements.

    SELECT PK, StartDate FROM DateTest

    WHERE StartDate > CAST('01/05/2004' as datetime)

    Have fun

    Steve

    We need men who can dream of things that never were.

  • RE: How to find relationship between view columns and table columns?

    Hi Rachel,

    Sorry its been a while since you posted....

    Came across this whilst looking for something completely different and just thought of your post.

    http://www.sqlservercentral.com/scripts/contributions/611.asp

    Hope it helps.

    Have fun

    Steve

    We need men who can dream of things that never were.

  • RE: Passing parameters in CONTAINS using wildcard

    Hi Again,

    Seeing i'd never used CONTAINS before, thought I would set up a table and have a play with it.

    I found it easier to build the string seperately, and just...

    Steve

    We need men who can dream of things that never were.

  • RE: Passing parameters in CONTAINS using wildcard

    Hi Harry,

    If what youv'e posted is exactly the same as your query, youv'e just missed a couple of quotes:-

    SELECT *

    FROM Customers

    WHERE CONTAINS(*, '"@CustVar + *"')

    GO

     

    Steve

    We need men who can dream of things that never were.

  • RE: Table Variables

    Yep,

    If sp_executesql would accept the table variable as a parameter, you would be out the tunnel.

    Unfortunately it only accepts parameters that are Unicode or can be explicitly converted to...

    Steve

    We need men who can dream of things that never were.

  • RE: Tran + While Loop Help (running last row twice?!)

    Hi,

    Lam is right, you need to set @CurrentRow to its initial value immediately prior to the WHILE loop and then set it's next value as the last thing you do...

    Steve

    We need men who can dream of things that never were.

  • RE: Passing parameters in CONTAINS using wildcard

    Hi Harry,

    Used very little .Net but if this was straight VB6 you seem to have got carried away with the double quotes.....

    Dim strSQL As String

    Dim strInput As String

    strInput = "Roger"

    strSQL...

    Steve

    We need men who can dream of things that never were.

Viewing 15 posts - 136 through 150 (of 199 total)