Forum Replies Created

Viewing 15 posts - 4,351 through 4,365 (of 5,504 total)

  • RE: Time gap query

    Yes, it's possible.

    You need to do a self join on the table on id=id-1 (or based on row_number(), if there are gaps in the id values).

    For a more detailed answer...

  • RE: sp_send_dbmail problems

    You have to define the recipients outside of the @query parameter.

    I'd use that query to build a temp table and assign the related value to @recipients.

    @query then would be something...

  • RE: Really complicated select statement

    I'm not sure if I'm heading in the right direction...

    If you want to see all order numbers with different values then you could use something like the following (untested, since...

  • RE: is there a way to limit the amount of rows a user can query?

    You could create a role for that user (and any other user you'd like to add).

    Create views or stored procedures or functions for those user and lock down all tables.

    Within...

  • RE: hourly average

    BaldingLoopMan (2/3/2010)


    trying to wrap my mind around what u guys did.

    ...

    You might want to have a look at Lynns blog to find some helpful date routines.

  • RE: Stored Procedure Help..

    Yes, I'd wrap it into a procedure with proper transaction and error handling (TRY ... CATCH).

    But the major question remains and needs to be considered: How can it be guaranteed...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (2/3/2010)


    Congrats Jack!! :w00t:

    I feel slighted, only 1 person even acknowledge when I hit 10,000. 🙁

    Rumor says there are advantages and disadvantages to climb up to the gods... 😉

    Don't...

  • RE: Are the posted questions getting worse?

    lmu92 (2/3/2010)


    I guess the reason why Steve voted for Golf clap is that Jack didn't get to the "SQL Olympian gods" yet. So he can go from Golf clap...

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (2/3/2010)


    ...

    No. Golf clap. Expression used for how one claps semi-quietly on the golf course. I believe there is a line from CaddyShack about it.

    I guess the...

  • RE: Stored Procedure Help..

    A few things up front:

    #1: You did a good job the way you provided table defs and sample data!! 🙂 Made it easy to work on. And I'm sure you...

  • RE: Are the posted questions getting worse?

    Totally Off-topic:

    Did you notice? Jack is "SSCrazy Eights" now.

    Congrats from across the ocean!

  • RE: Stored Procedure Help..

    I'm not sure why the values of your column [parentId] are identical to the values of the ID column... Looks redundant, which is obviously not the purpose.

    Please provide more details...

  • RE: SQL Script

    Sounds like an issue that fits into the "running total" category.

    You might want to have a look at this link[/url] .

  • RE: CTE in select Statement

    Something like

    With CTE as

    (

    Select a2.* from a1

    inner join a2

    on a1.col=a2.col

    ),

    CTE2 as

    (

    Select a4.* from a3

    inner join a4

    on a3.col=a4.col),

    CTE3 as

    (

    Select a5.* from CTE1

    inner join a5

    on CTE1.col=a5.col

    )

    Select cte3.* from cte

    inner join...

  • RE: Datetime format

    Could you possibly post some of the date values as stored in the table?

    Maybe you're struggling with issues related to the way the values are stored:

    Example:

    If data would be stored...

Viewing 15 posts - 4,351 through 4,365 (of 5,504 total)