Forum Replies Created

Viewing 15 posts - 61 through 75 (of 199 total)

  • RE: Counting a consecutive condition

    Hi David,

    That looks shorter and prettier.....

    Have fun

    Steve

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

  • RE: Counting a consecutive condition

    Hi JR,

    Did a bit of work on this a while ago and have a working example - not the prettiest code in the world but hopefully it will help. Should be enough comments...

    Steve

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

  • RE: If Exists and @@Error

    Hi Ron,

    If you are anticipating 0, 1 or many results from your query and you are trying to trap 0 (which is what I am interpreting here) @@ERROR is not...

    Steve

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

  • RE: If Exists and @@Error

    Ron, why would you need to trap @@error with your statement?

    Why not just handle success or failure with a flag e.g.

    Declare a_flag

    If Exists (Select * from mytable)

        Begin

        <True...

    Steve

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

  • RE: Hello i found somethings when i was playing with the execution plan

    As I said, no intention of insulting or irritating anyone - it just made me laugh (but I have got a strange sense of humour.....). It gave me a good start to a...

    Steve

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

  • RE: Hello i found somethings when i was playing with the execution plan

    Quote Hector 

    every day one learnt a new thigs thanks my friend

    one question are you a girl?

    Steve

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

  • RE: Problem with variables in dynamic SQL statement.

    Nothing wrong with this at times. I guess you're in very good company here with this habit. - Too many home truths here for my liking.....

    Steve

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

  • RE: Suggestions on instead of inserts

    If the trigger is only firing once, the problem should really lie in the code / cursor used to perform the Insert / Update / Delete.

    Any chance of posting the code...

    Steve

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

  • RE: Suggestions on instead of inserts

    Hi,

    I think a little more information is required. Could you give us an idea of what you are trying to accomplish exactly and why you are using your current approach.

    Steve

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

  • RE: Problem with variables in dynamic SQL statement.

    And a little further addition.....

    Make sure you CAST / CONVERT to a format and length that is going to fit in with your query. e.g:

    SET @SQLString = 'SELECT * FROM...

    Steve

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

  • RE: Dynamic Query

    Orlando,

    Syntax should sit something like this:-

    DECLARE @Query nvarchar(4000),

     @Total int,

     @PrimaryKey int,

     @TableName varchar(255)

    SET @primarykey-2 = 1

    SET @TableName = 'ATableName'

     

    SET @Query = N'SET @Total = (SELECT COUNT('+ CAST(@PrimaryKey as NVarchar(4)) + N') FROM...

    Steve

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

  • RE: dijkstra shortest path or similar routing algorithm

    Hi Stephen,

    Just out of interest - what are you trying to solve with this?

    Can you give us some examples of data etc?

    Have fun

    Steve

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

  • RE: How to move a file from one database to another

    BOL = Books OnLine - it's the help files for MS Sql Server and can be found in:

    Start->Programs->MS Sql Server->Books OnLine

    Have fun

    Steve

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

  • RE: Query across linked servers slowed down to a stop

    Got it - that was a bit of a pig.....

    When you create a new linked server using EM, under 'Provider Name' you get to set 'Provider Options'.

    All make note,...

    Steve

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

  • RE: Moving data from Excel to Sql Server

    Hi Louise,

    It will be as easy as you make it.......

    If its as simple a crossover as you make it sound, a DTS package would be a simple way forward. 1...

    Steve

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

Viewing 15 posts - 61 through 75 (of 199 total)