Forum Replies Created

Viewing 15 posts - 556 through 570 (of 683 total)

  • RE: Data form different rows

    Who are you responding to there, Tareg? It seems like it's Amit - in which case I agree. But rsharma's post seems to do what you need, no?...

    Ryan Randall

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

  • RE: Literal Calculations Stored in Table

    Hi Stephen,

    No, that's not really possible - well, not unless you're striving for a performance nightmare

    In my opinion you don't have the best...

    Ryan Randall

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

  • RE: Flat file with integer column right-align, It''''s possible?

    Oh.

    Can't you even create a view which uses STR, and export that?

    Ryan Randall

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

  • RE: Swap column values

    Just for fun...

    --data

    declare @t table (name varchar(10), age int)

    insert @t

              select 'John', 26

    union all select 'Jame', 32

    union all...

    Ryan Randall

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

  • RE: select date

    I agree with you there Gila.

    Since 'a between b and c' is interpreted as 'b <= a and a <= c' (I believe - and...

    Ryan Randall

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

  • RE: Inserting ID field from separate table

    And here's a slightly "crazier" option...

    --data

    create table #table1

    (id int ,

    myvalue varchar(20)

    )

    Ryan Randall

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

  • RE: Inserting ID field from separate table

    Hi Daryl. Interesting problem - thanks for posting it

    Off the top of my head, here's one possibility...

    --data

    create table #table1

    (id...

    Ryan Randall

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

  • RE: Flat file with integer column right-align, It''''s possible?

    I guess you can simply "pad out" those columns. Something like this...

    SELECT id, STR(id, 12) AS IdRightAligned FROM SYSOBJECTS

    Ryan Randall

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

  • RE: splilitng data in column

    There are a few techniques. Here's my preferred method...

    --data

    declare @t table (jobcardn_fk varchar(10), Technician_code varchar(100))

    insert @t

              select 'jc01', 'TC01'

    union all...

    Ryan Randall

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

  • RE: String Parsing UDF

    All 3 methods use a tally/numbers/value table and old value setting trick, but that's definitely the neatest yet! Well done, Jeff...

    Ryan Randall

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

  • RE: ReWrite SQL statement to simplify

    Bill - Why do you keep asking the same question in different threads?

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=267409

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=267685

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=267396

    There might even be more.

    Ryan Randall

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

  • RE: More than cross-tab

    As I said, I think the formatting of your question made the request difficult to understand.  I'd like to understand why what I gave...

    Ryan Randall

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

  • RE: Assign A default value to a SP Parameter incase its passed no value

    From EXECUTE in BOL:

    G. Use EXECUTE with DEFAULT

    This example creates a stored procedure with default values for the first and third parameters. When...

    Ryan Randall

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

  • RE: More than cross-tab

    It looks like the formatting of your question made the request difficult to understand.

    This does the trick (I think), but I've used an id column as a helper, so maybe...

    Ryan Randall

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

  • RE: String Parsing UDF

    LOL - I thought about doing it exactly that way, but ended up going the other way to keep things clear. I guess they're really the same way, but definitely...

    Ryan Randall

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

  • Viewing 15 posts - 556 through 570 (of 683 total)