Forum Replies Created

Viewing 15 posts - 6,256 through 6,270 (of 10,144 total)

  • RE: Finding the right JOIN type

    Different sample data. I replaced the old data set with the new, and you appended the new.

  • RE: Finding the right JOIN type

    Anatoly Ukhvanov (6/14/2012)


    Nevertheless, I still don't understand, what are you trying to do?

    I agree with you that in this example it looks strange: why they didn't call 'group_codeN' columns as...

  • RE: Finding the right JOIN type

    Table zzxpgtyr has two columns which appear to have unique values,

    group_type and pkey. Using both of these columns to join the table to the two other tables does...

  • RE: Finding the right JOIN type

    Anatoly Ukhvanov (6/14/2012)


    I didn't even understand what is it for? What does this code do?

    For example, the first method returns this:

    What is it? reliableitservice wrote (Post #1314145) he/she wants this...

  • RE: Eliminating Duplicate Rows

    prakashp 84206 (6/14/2012)


    Hi All,

    No any comments, What happen? I am waiting for answer. I was on leave for a week. Pls give me some solution.

    You are likely to find your...

  • RE: Query help!!

    Hadrian (6/14/2012)


    12 rows are returned after 5 hours run.

    Are the results correct or not?

  • RE: Finding the right JOIN type

    -- one method -------------------------------------------------------------

    SELECT

    [STYLE]= s.style,

    Attributes.*

    FROM #zzxstylr s

    OUTER APPLY (

    SELECT

    [LBL]= MAX(CASE WHEN [type_name] = 'LBL' THEN g.Group_name ELSE NULL END),

    [PRINT] = MAX(CASE WHEN [type_name] = 'PRINT' THEN...

  • RE: Random default string for a column using CASE and NEWID

    SELECT

    CAST(NEWID() AS CHAR(36)),

    CASE CAST( ASCII (SUBSTRING( CAST( NEWID() AS VARCHAR(64)), 1, 1)) AS INT) % 2

    WHEN 0 THEN 'OPTION 1' ELSE 'OPTION 2' END,

    CASE ABS(CHECKSUM(NEWID()) % 2)

    WHEN 0...

  • RE: Query help!!

    Hadrian (6/14/2012)


    Hi,

    It's a query developped by another and it told me that it returns something.

    It returns 6 or 12 rows, I forget which - but are the results...

  • RE: Date Only from Date and Time

    jeffem (6/13/2012)


    Though the answers have already been shared, it can be useful to have the options for CONVERT() available at your disposal. This link[/url] can be a useful primer...

    Only if...

  • RE: Date Only from Date and Time

    Lynn Pettis (6/13/2012)


    ChrisM@Work (6/13/2012)


    AndrewSQLDBA (6/13/2012)


    HI Everyone

    I have something simple that I am getting stumped on.

    I have a complete date with time (2012-06-12 10:43:37), and I need only the date...

  • RE: Date Only from Date and Time

    AndrewSQLDBA (6/13/2012)


    HI Everyone

    I have something simple that I am getting stumped on.

    I have a complete date with time (2012-06-12 10:43:37), and I need only the date portion. I have...

  • RE: Need hale parsing the following string example

    oradbguru (6/13/2012)


    Okay, if someone can at least show me how to parse the string ...

    No problem...

    SELECT

    *

    FROM ( -- sample data

    SELECT '2 Year 6 Months 20 Days' UNION ALL

    SELECT...

  • RE: Query help!!

    Grant Fritchey (6/13/2012)


    Yeah, we'd at least need the execution plan to understand what's going on. Nothing jumped out as horribly egregious. The GROUP BY will put more load on tempdb...

  • RE: Extract related values recursively

    dwain.c (6/13/2012)


    sridhar_kola (6/13/2012)


    Hi ,

    Thanks , it does give the right results .

    However, just to understand the code , what does the n%2 in the Where condition signify ?

    thanks

    I...

Viewing 15 posts - 6,256 through 6,270 (of 10,144 total)