Hi Folks

  • Hi,

    Need small help..

    table a (1,3,6,4,9,2,8)

    required output

    8

    9

    6

    4

    3

    2

    1

    venal

  • subbareddyap (2/8/2016)


    Hi,

    Need small help..

    table a (1,3,6,4,9,2,8)

    required output

    8

    9

    6

    4

    3

    2

    1

    venal

    Does table 'a' have one row, or seven?

    Why does 8 come before 9 ... what is the ordering logic?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • type Cntrl+t in results pane.

    select '8'+char(13)+char(10)+'9'+char(13)+char(10)+'6'+char(13)+char(10)

    +'4'+char(13)+char(10)+'3'+char(13)+char(10)+'2'+char(13)+char(10)+'1'

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • Does this strike anyone else as a homework/interview question?

  • JustMarie (2/9/2016)


    Does this strike anyone else as a homework/interview question?

    Strikes me as an example of very bizarre ordering. Still waiting to hear what the logic is.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Thank you

  • What was the point of this?

    The response marked as a solution does not reference your table at all.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin (2/9/2016)


    What was the point of this?

    The response marked as a solution does not reference your table at all.

    I thought that response was brilliant when I saw that it "worked" for the OP. I'm sure the teacher/interviewer will be stunned with his answer. 😀

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Reminds me of this...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply