Forum Replies Created

Viewing 15 posts - 166 through 180 (of 428 total)

  • RE: How to display months across like crosstab?

    ? I think I don't get it? But isn't this simply answered by no longer specifying the columns names as 'Jan', 'Feb', etc, but simply label the columns something like...

  • RE: How to JOIN tables with no keys between

    Think of your query this way:

    You specify "left outer join" instead of "inner join" to tell sql server to return all rows from TB_inOUt, even if there is no matching...

  • RE: How to pad a string with spaces when size of data is unknown

    Just for the sake of the discussion, because this is a useless alternative for the OP's question. You could make it execute the max(len()) only once like this:

    SELECT LEFT(t2.TEXTFIELD +...

  • RE: Search Issue

    ColdCoffee (3/1/2012)


    Hey R.P.R , the OP does not want the rows that have 12 values , instead the rows that contain the value 12 ; look at the expected output...

  • RE: Search Issue

    At first thought I was going to say to use the Delimited8K string splitter for this one and then count the number of results. However I think it is going...

  • RE: How to pad a string with spaces when size of data is unknown

    Jeff Moden (3/1/2012)


    It sounds like the OP has unknown length data and wants to size the output based soley on the max width of the unknown data.

    That's not what the...

  • RE: How to pad a string with spaces when size of data is unknown

    The answer has been given multiple times already, so why are you still trying to make this so complicated? Just use convert or cast to convert the string value to...

  • RE: Round Function

    adrian.facio (3/1/2012)


    Hi, i like to use this operation. But i must admit it migth be litle costly:

    select ROUND( 100 * (99.7971), 0) / 100

    But why would you do that? the...

  • RE: Round Function

    Isn't it much simpler to just specify the number of decimals in the convert operation? i.e. simply:

    select convert(numeric(10,2), 99.9959), convert(numeric(10,2),99.7971)

    which returns:

    --------------------------------------- ---------------------------------------

    100.00 ...

  • RE: CSV Parameter in proc

    I would definitly go for splitting the string into rows at the ','-characters using the DelimitedSplit8K procedure. i.e. I agree with "step 1". Be aware though of 2 things: the...

  • RE: Select XML node with namespaces

    Hi Brad,

    Welcome at SSC. As was pointed out, we can't do much for you without more information about your specific situation. Please provide (an example of) your specific document...

  • RE: Checking to see if a time is between two times

    Again: post some ddl with test data plus the expected output and we'll all be happy to help you. Or in other words: write a little script with a "create...

  • RE: locking in sql server

    I've used it in multiple scenarios. One is a sql server agent job that I need to be run once and only once at a time. If it is run...

  • RE: locking in sql server

    My guess would be they were asking for sp_getapplock (link).

  • RE: Label Partitioning Data based on matching attributes

    After a night of sleep I think I understand what you mean: You want all the rows for which at least one duplicate exists, and leave off any rows for...

Viewing 15 posts - 166 through 180 (of 428 total)