Forum Replies Created

Viewing 15 posts - 451 through 465 (of 683 total)

  • RE: Removing blank spaces in records.

    Those examples will remove all spaces (obviously) - which might well be what you want (it's not clear to me).

    The example below will remove duplicate spaces - just in case that was...

    Ryan Randall

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

  • RE: get partial text data from a text field

    Note that if it genuinely is a column of type 'text' (as opposed to varchar), the left function will error. In that case, you can use cast instead.

    Ryan Randall

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

  • RE: Words in a string

    Hi Ramesh,

    No worries.

    '¬' is just a somewhat unusual keyboard character (it's on the key under 'Esc' on my keyboard). You can run this to select it...

    select char(172)

    I should've...

    Ryan Randall

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

  • RE: Validating a numeric within SUM on a VarChar field

    That's good to know, David. Thanks for the info.

    Ryan Randall

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

  • RE: Combine Query Into String

    See:

    http://weblogs.sqlteam.com/mladenp/archive/2005/08/01/7421.aspx (no 5)

    or

    http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx

    For your example...

    --data

    declare @ColorChart table (Colors varchar(10))

    insert @ColorChart

              select 'red'

    union all select 'green'

    union all select 'blue'

    union all select 'purple'

    union all select 'green'

    Ryan Randall

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

  • RE: Validating a numeric within SUM on a VarChar field

    Hi all,

    FYI - The 'IsReallyNumeric' function in this link does what the (useless) 'IsNumeric' function should!

    http://aspfaq.com/show.asp?id=2390

    Ryan Randall

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

  • RE: Words in a string

    Hi all,

    Yet another way!

    It deals with all the different types of test data I can think of...

    --data

    declare @t table...

    Ryan Randall

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

  • RE: COALESCE Vertically??

    Thanks lakusha. I'll have to wait till we get SQL 2005 to be able to work through this, but it makes interesting reading in the meantime! 

    Ryan Randall

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

  • RE: COALESCE Vertically??

    Of course I'm interested!

    Not that I have access to sql 2005 yet, but still, I am interested

    Did the example I gave illustrate your...

    Ryan Randall

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

  • RE: COALESCE Vertically??

    I don't know how you guys can work through these things without examples. I find it impossible .

    RGR - I don't get what you're...

    Ryan Randall

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

  • RE: Case, loop or cursor

    Yep - I agree with all of that

    Ryan Randall

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

  • RE: Case, loop or cursor

    I can't think why you think it looks like a big mess!

    For a start there's nothing in the proc which tells anyone...

    Ryan Randall

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

  • RE: eliminating dupes & getting more columns with aggregate

    end-user - did you have an answer to Vladan's question? You need to decide which 1 of those 3 rows you want.

    If you can tell us, then it's easy for...

    Ryan Randall

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

  • RE: Is a multi column primary key the best way to do this

    +1 for John's suggestion.

    Note that the clustered index isn't a guarantee that the data will be sorted, so you should still use an 'order by'. It should be much quicker...

    Ryan Randall

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

  • RE: query

    Hi all,

    I suspect (i.e. know ) this is overkill  - and particularly since you seem to have an answer you're happy with - but here...

    Ryan Randall

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

Viewing 15 posts - 451 through 465 (of 683 total)