Forum Replies Created

Viewing 15 posts - 541 through 555 (of 683 total)

  • RE: insert new rows from another row

    When other solutions are loopy, you can always count on numbers

    (sorry )

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: insert new rows from another row

    And here's the kind of logic you can use in your trigger/sp/whatever...

    --data

    declare @t table (Name varchar(10), DateFrom datetime, DateTo...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: select query, grouping issue

    Did I hear my name?

    It looks to me (though I could be wrong) like that link isn't quite what you're looking for because...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to Obtain Subtotal Like Output?

    Hi Neetu,

    You can use 'with rollup'...

    --data

    declare @t table (Yr int, Branch int, TRec int)

    insert @t

              select 2004, 1, 1000

    union...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: select date

    For the pedants, you could use

    MyDateCol >= '2006-03-26' and MyDateCol < '2006-03-27'  (note <, not <=)

    You calling me a pedant?

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Literal Calculations Stored in Table

    It is possible - just not a good idea.

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to de-dup values in a specific column?

    Hoa,

    How's this...?

    --data

    declare @t table (Col1 int, Col2 varchar(100))

    insert @t

              select 917, '2294,2294,2294,2294'

    union all select 918, '2294,2294,2294'

    union all select 920,...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: More than cross-tab

    Yuri?

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to de-dup values in a specific column?

    There's what we needed! Col2 can have different values in its list, and you've shown what you'd want to do with them. Now, on with the solution...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Table linking problems

    Is there some reason why you can't just use cast? See example below...

    --data

    declare @t table ([Account number] char(10))

    insert @t

              select '00004'

    union all select '0010'

    union all select...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: How to de-dup values in a specific column?

    I know this isn't what you're asking for, but here's a solution which works for your example. Now, can you give us an example which breaks this solution? That will make...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Inserting ID field from separate table

    No worries Daryl. Always fun to play with intellectual questions

    I was particularly proud of the confusing nature of one of the statements in...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Literal Calculations Stored in Table

    Steve - wouldn't you want to sort out that non-normalised data structure before you spent ages writing a stored procedure based on it?  (As I mentioned above...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: select date

    Hear, hear!

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Literal Calculations Stored in Table

    That doesn't answer the question he was asking, Amit.

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

Viewing 15 posts - 541 through 555 (of 683 total)