Forum Replies Created

Viewing 15 posts - 2,281 through 2,295 (of 3,957 total)

  • RE: Turning raw data into a grid layout

    Lynn Pettis (1/2/2013)


    dwain.c (1/2/2013)


    Tava (1/2/2013)


    To answer the question about why is DateID int and not datetime its an old table and data already in there. I assume its for an...

  • RE: Count Records in Table and....

    bicky1980 (1/2/2013)


    Hi All

    I am just after a bit of clarification. I am writing a procedure which inserts data from one table (Source) into another (Destination) using certain criteria. ...

  • RE: Phone numbers in a Help Desk application

    CELKO (1/2/2013)


    ACCESS is a disaster and you need to get rid of it. I saw its premiere at a COMDEX; it did not work then and it does not work...

  • RE: Turning raw data into a grid layout

    Tava (1/2/2013)


    To answer the question about why is DateID int and not datetime its an old table and data already in there. I assume its for an indexing/performance benefit and...

  • RE: Len did not display right size

    Sean Lange (1/2/2013)


    adonetok (1/2/2013)


    I use len(rtrim(ltrim(NDC))) but got the same problem

    Then you must have some non-display characters in your data. Try outputting select * to text instead of the grid....

  • RE: convert month name to month number

    Very forgiving indeed.

    SELECT MONTH('April' + ' 1900')

  • RE: Turning raw data into a grid layout

    You might try this:

    SELECT CompanyName, Type

    ,Sunday=MAX(CASE WHEN weekday = 1 THEN Val END)

    ,Monday=MAX(CASE WHEN weekday = 2 THEN Val END)

    ...

  • RE: data for Min/Max rows

    Won't something like this work also?

    CREATE TABLE #Customer

    (CustID VARCHAR(10)

    ,OrderDate DATETIME)

    INSERT INTO #Customer

    SELECT 'A', '2012-01-31' UNION ALL SELECT 'A', '2012-03-31' UNION ALL SELECT...

  • RE: Taking a vertical list and transposing it to horizontal and then grouping

    vinu512 (12/31/2012)


    Satish's Query is partially correct but it doesn't break the records on th basis of Column1. You would nee to do a Correlated Subquery for that as follows:

    --Creating...

  • RE: TSQL and percentile (not percentilerank :)

    Was your solution something like this?

    ;WITH Scores (Score, Percentile) AS (

    SELECT Score, NTILE(10) OVER(ORDER BY Score)

    FROM sys.all_columns

    CROSS APPLY...

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    Nice update to this article Jeff!

    I especially liked your mysteriously labelled black line (????). Nice trick with the 0 based Tally table too - will need to remember that...

  • RE: Splitting Strings Based on Patterns

    Paul,

    You have aptly demonstrated why you are an MVP and I am but a plebe. 🙂

    My mistake, using the same string replicated for the test. I knew I shouldn't...

  • RE: Time - Adding minutes and seconds

    Jeff Moden (12/29/2012)


    dwain.c (12/25/2012)


    Jeff Moden (12/25/2012)


    Merry Christmas Dwain.

    Let me see. Christmas morning where you are and here you are posting on the SSC forum.

    You must want that 32,000th post...

  • RE: Number weeks of work

    You're welcome.

    BTW. You do see what I was trying to do with @CountOfEmp right?

    In case you have more than 5 employees in the table, the right argument of the...

  • RE: Number weeks of work

    cms9651 (12/26/2012)


    dwain.c (12/26/2012)


    I'm not quite sure why but try the full code at the bottom of this post without change.

    I tried your full code, I have the same error:

    [Err]...

Viewing 15 posts - 2,281 through 2,295 (of 3,957 total)