Forum Replies Created

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

  • RE: I need a better way to do this

    It now executes ok but is returning the wrong row(s).

  • RE: I need a better way to do this

    Thank you.

    Trying the last example I get these:

    Msg 207, Level 16, State 1, Line 4

    Invalid column name 'LocationID'.

    Msg 207, Level 16, State 1, Line 4

    Invalid column name 'LocationID'.

    Msg 207, Level...

  • RE: I need a better way to do this

    I wanted to let everyone who helped me know what I ended up doing.

    1st I get all the location ID's on a specific route (usually about 20 rows).

    SELECT tblLocation.ID

    FROM...

  • RE: I need a better way to do this

    This does work after all. I was using the wrong test route.

    I feel extra dumb now, but I did learn a lot here.

    Thank you.

    SELECT tblLocation.ID

    FROM tblLocation

    WHERE tblLocation.Route IS NOT...

  • RE: I need a better way to do this

    This gives an idea of what I need:

    SELECT tblLocation.ID

    FROM tblLocation

    WHERE tblLocation.Route IS NOT NULL

    AND tblLocation.Route <> '0-0'

    AND tbllocation.Inactive = '0'

    AND tblLocation.Route LIKE '1010-%'

    AND tblLocation.ID NOT IN

    (SELECT...

  • RE: I need a better way to do this

    Grant Fritchey (8/11/2010)


    I won't enter the debate about stored procedures or not.

    Thank you.

    You have some problems in your SQL code. First, why are you using DISTINCT for all the...

  • RE: I need a better way to do this

    What I have so far was not meant to be the final product. I know the loops are poor.

    I do what most of you do, I get it working any...

  • RE: I need a better way to do this

    Eugene Elutin (8/11/2010)


    Sorry mate, no one said that your solution need 1000+ stored procedures and 400+ views and 350+ temporary tables. Actuallty, no one here in position to advise about...

  • RE: I need a better way to do this

    Eugene Elutin (8/11/2010)


    dennisv (8/11/2010)


    ...

    I don't write SQL enough to get good at it...

    ...

    No offence, but do you seriously believe that writing "enough" in C# makes you good in it? 😉

    Hornestly,...

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