There had to be a better way...right?



  • If there could be a reason why this is not as foul as it looks, let me know.  Original post.

    ok here is my problem I am trying to show info into a datagridview via SQL querry....

    I am building a very large sql statement based on user seletions and
    the amount and name of the columns is decided by the user selection so
    I can't set anything static.
     
    example: date range of 1-1-01 to 1-5-01 for item 1

    SELECT ID, DESC, 1-1-01,1-2-01,1-3-01,1-4-01,1-5-01 FROM STUFF WHERE ITEM = 1




  • Just by looking at that query it looks like he doesn't understand how relational databases work.


  • Winner of the 2016 Presidential Election

    So, they have a different column for every day of the year(s)...?

    I think my brain just melted.



  •  

    I am still very new to the .net 2005, I have used vb6 for so many years it is getting dificult switching over to .net.

     I don't think VB is what's getting lost in translation here ...



  • ok here is my problem I am trying to show info into a datagridview via SQL querry....

    I am building a very large sql statement based on user seletions and
    the amount and name of the columns is decided by the user selection so
    I can't set anything static.
     
    example: date range of 1-1-01 to 1-5-01 for item 1

    SELECT ID, DESC, 1-1-01,1-2-01,1-3-01,1-4-01,1-5-01 FROM STUFF WHERE ITEM = 1

    Clearly the best solution is to randomly display each day, and the user can just hit enter to go to the next one.  It should be really fast.  I'll put up a video to demonstrate.



  • @boomzilla said:

    Clearly the best solution is to randomly display each day, and the user can just hit enter to go to the next one.  It should be really fast.  I'll put up a video to demonstrate.

    Justr make sure.  Its large.   SCROLLING text.  Scrolling scrolling scrolling.  Jam it.

     



  • @joe.edwards@imaginuity.com said:

    So, they have a different column for every day of the year(s)...?


    Yep, I think you've got it there.  The entire db has just ONE row.... but it's a very very very VERY long one!

    @joe.edwards@imaginuity.com said:

    I think my brain just melted.

     

    Ah.  You're one of the lucky ones.  Those of us who are left behind will come to envy you, in time.



  • I think this is an excellent solution.  Now they never need to iterate over all of the returned results. 



  • @DaveK said:

    Yep, I think you've got it there.  The entire db has just ONE row.... but it's a very very very VERY long one!
     

    Might have some scalability issues in about three years when it hits that hard limit of 1,100 or so columns.



  • @upsidedowncreature said:

    @boomzilla said:

    Clearly the best solution is to randomly display each day, and the user can just hit enter to go to the next one.  It should be really fast.  I'll put up a video to demonstrate.

    Justr make sure.  Its large.   SCROLLING text.  Scrolling scrolling scrolling.  Jam it.

     

    Better yet:

     

    1. Receive request from user for data
    2. Export it to a text file
    3. Video in the text with a camcorder
    4. Upload the video to google video
    5. Freeze-frame the video, exporting JPGs at 25% quality
    6. Print the JPGs, fax them to an overseas office
    7. Run the faxed JPGs in through OCR
    8. Convert each page into XML
    9. Embed the XML file into a word document
    10. Email the word document back to the original office
    11. Have an AJAX application that talks to a PHP script that's executed via a Perl script convert the word document to plain text
    12. Search the last line of the file using SSDS
    13. For each result, repeat the process from step (2), merging it into one big text file with SSDS
    14. Send the result in the form of a point 72 font scrolling marquee with blink tags to the user of the application.



  • Needs more wooden table.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.