SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


CUTting data


CUTting data

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)

Group: Administrators
Points: 444933 Visits: 20576
Comments posted to this topic are about the item CUTting data

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47347 Visits: 7882
That is a really strange way to cut data.
Interesting question, thanks Steve.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Sean Lange
Sean Lange
SSC Guru
SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)

Group: General Forum Members
Points: 199494 Visits: 19029
Stewart "Arturius" Campbell - Wednesday, May 16, 2018 12:05 AM
That is a really strange way to cut data.
Interesting question, thanks Steve.


Strange is a lot gentler than I was coming up with. I have read and reread that link and it makes no sense to me what is going on there. The output to me make absolutely no sense I don't get the meaning of Steve's comment..."pad the spaces a bit to ensure all values fall into the buckets it has created.".

Can somebody explain in a way that makes sense?

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Revenant
Revenant
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29117 Visits: 5225
Sean Lange - Wednesday, May 16, 2018 7:18 AM
Stewart "Arturius" Campbell - Wednesday, May 16, 2018 12:05 AM
That is a really strange way to cut data.
Interesting question, thanks Steve.


Strange is a lot gentler than I was coming up with. I have read and reread that link and it makes no sense to me what is going on there. The output to me make absolutely no sense I don't get the meaning of Steve's comment..."pad the spaces a bit to ensure all values fall into the buckets it has created.".

Can somebody explain in a way that makes sense?

I guess only Steve can meaningfully explain what he meant by that.
Sean Lange
Sean Lange
SSC Guru
SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)SSC Guru (199K reputation)

Group: General Forum Members
Points: 199494 Visits: 19029
Revenant - Wednesday, May 16, 2018 2:26 PM
Sean Lange - Wednesday, May 16, 2018 7:18 AM
Stewart "Arturius" Campbell - Wednesday, May 16, 2018 12:05 AM
That is a really strange way to cut data.
Interesting question, thanks Steve.


Strange is a lot gentler than I was coming up with. I have read and reread that link and it makes no sense to me what is going on there. The output to me make absolutely no sense I don't get the meaning of Steve's comment..."pad the spaces a bit to ensure all values fall into the buckets it has created.".

Can somebody explain in a way that makes sense?

I guess only Steve can meaningfully explain what he meant by that.


Honestly it isn't just his explanation that has left me scratching my head. The link from the answer doesn't clear it up for me either. I don't get it.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Revenant
Revenant
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29117 Visits: 5225
Sean Lange - Wednesday, May 16, 2018 2:36 PM
Revenant - Wednesday, May 16, 2018 2:26 PM
Sean Lange - Wednesday, May 16, 2018 7:18 AM
Stewart "Arturius" Campbell - Wednesday, May 16, 2018 12:05 AM
That is a really strange way to cut data.
Interesting question, thanks Steve.


Strange is a lot gentler than I was coming up with. I have read and reread that link and it makes no sense to me what is going on there. The output to me make absolutely no sense I don't get the meaning of Steve's comment..."pad the spaces a bit to ensure all values fall into the buckets it has created.".

Can somebody explain in a way that makes sense?

I guess only Steve can meaningfully explain what he meant by that.


Honestly it isn't just his explanation that has left me scratching my head. The link from the answer doesn't clear it up for me either. I don't get it.

Apparently this is a tricky one. 14 hours after posting and we have only 170 attempts with only 22 percent correct.
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (300K reputation)SSC Guru (300K reputation)SSC Guru (300K reputation)SSC Guru (300K reputation)SSC Guru (300K reputation)SSC Guru (300K reputation)SSC Guru (300K reputation)SSC Guru (300K reputation)

Group: General Forum Members
Points: 300232 Visits: 41480
Well, I guess I better start learning R. I just took a logical guess and was wrong. The correct answer makes no sense to me at this time.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47347 Visits: 7882
Lynn Pettis - Wednesday, May 16, 2018 3:30 PM
Well, I guess I better start learning R. I just took a logical guess and was wrong. The correct answer makes no sense to me at this time.


And here i thought i was losing my marbles. i'm glad i'm not the only one totally confused by the linked page.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
morlindk
morlindk
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1556 Visits: 465
Ah, well - R is even nerdier than you think!
Steve Jones
Steve Jones
SSC Guru
SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)SSC Guru (444K reputation)

Group: Administrators
Points: 444933 Visits: 20576
Sorry, pad the space in each interval to get values inside of the spaces. I don't quite understand the exact math used here myself, and I've struggled to determine the algorithm.

I was hoping one of you R people would give me a better explanation. I would have assumed 0-5, 5.000001-10, etc.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search