Forum Replies Created

Viewing 6 posts - 16 through 21 (of 21 total)

  • RE: can i do this without using a loop?

    wow, that works, i just have to decipher it now!

    you're a genius, if you were a guitar player you'd be jimi hendrix...

    the datasets are usually going to be really small...

  • RE: can i do this without using a loop?

    ColdCoffee (4/6/2012)


    Whats the logic to find the distance betwen A and C ? is it ( A to B ) + (A to C) or is it value of distance...

  • RE: can i do this without using a loop?

    yes sir, here would be the result table:

    CREATE TABLE [dbo].[distancetest2](

    [FromStop] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

    [ToStop] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

    [dist] [numeric](3, 1) NULL

    ) ON [PRIMARY]

    INSERT INTO DISTANCETEST2 (FromStop, ToStop, dist)

    select 'A','B', '3.5'...

  • RE: can i do this without using a loop?

    Thanks for the advice mr. lutzm. my logic fails me on this one...

    ok here's a table and sample data:

    CREATE TABLE [dbo].[distancetest1](

    [StopName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

    [dist] [numeric](3, 1) NULL

    ) ON [PRIMARY]

    INSERT...

  • RE: Help with this Where Clause! (challenge)

    thanks for that, i looked around your site, could only find an article called 'Dynamic SQL and SQL injection' and that didn't seem to apply to my case... 🙁

  • RE: Help with this Where Clause! (challenge)

    i know how to do the 'All' option, i do it like this:

    where line = case when @line = 'All' then line else @line end

    i just don't know how to...

Viewing 6 posts - 16 through 21 (of 21 total)