Log in  ::  Register  ::  Not logged in

 Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Sequences III Rate Topic Display Mode Topic Options
Author
 Message
 Posted Monday, April 30, 2012 8:29 PM
 SSCommitted Group: General Forum Members Last Login: Yesterday @ 12:31 PM Points: 1,859, Visits: 2,654
 Comments posted to this topic are about the item Sequences III
Post #1292905
 Posted Monday, April 30, 2012 8:30 PM
 SSCertifiable Group: General Forum Members Last Login: Sunday, January 4, 2015 7:55 AM Points: 5,333, Visits: 25,280
 Nice question - finally beginning to understand what a "Sequence", is and how it works ..........THANKS If everything seems to be going well, you have obviously overlooked something. RonPlease help us, help you -before posting a question please read Before posting a performance problem please read
Post #1292908
 Posted Monday, April 30, 2012 10:51 PM
 SSCertifiable Group: General Forum Members Last Login: Yesterday @ 12:50 PM Points: 5,434, Visits: 4,613
 Thanks for a really easy one!(I wish I came up with it...)
Post #1292933
 Posted Tuesday, May 1, 2012 1:50 AM
 SSC Eights! Group: General Forum Members Last Login: Tuesday, April 15, 2014 8:03 AM Points: 825, Visits: 319
 I think this question indicates that using default values with a new item like CREATE SEQUENCE isn't a great idea. I, for one, will be defining everything (AS, START WITH, INCREMENT BY, MINVALUE, MAXVALUE, CYCLE, CACHE) if I get round to using sequences in SQLServer. I know it might look wordy and take up a few more lines but for the sake of clarity, and potential help in solving problems, I would think it worth it.
Post #1292967
 Posted Tuesday, May 1, 2012 3:09 AM
 SSCrazy Eights Group: General Forum Members Last Login: 2 days ago @ 4:00 PM Points: 9,824, Visits: 11,895
 Nice question. Easy if one recognises the decimal representation of 2**31. Tom
Post #1292994
 Posted Tuesday, May 1, 2012 5:37 AM
 SSCrazy Group: General Forum Members Last Login: Tuesday, May 31, 2016 4:13 PM Points: 2,107, Visits: 2,254
 Argh! Blew right past the CYCLE/NO CYCLE option explanation in BOL, looking for behavior when min value exceeded. SHould have had that first cup of green tea.Thanks for the question! I've really enjoyed these questions on CREATE SEQUENCE. I look forward to using it when my company moves to 2012 ........ in 2021! Please don't go. The drones need you. They look up to you.Connect to me on LinkedIn
Post #1293043
 Posted Tuesday, May 1, 2012 5:38 AM
 Ten Centuries Group: General Forum Members Last Login: Friday, December 2, 2016 8:14 AM Points: 1,191, Visits: 1,374
 I like these sequence questions, despite the fact I keep getting them wrong
Post #1293044
 Posted Tuesday, May 1, 2012 5:49 AM
 SSCrazy Group: General Forum Members Last Login: Wednesday, November 30, 2016 2:06 AM Points: 2,251, Visits: 8,029
 Does anyone have any suggestions for possible uses for sequences? Once upon a time I'd have used them for populating primary keys instead of using identities (ie the way I used to in Oracle). But now that we have the Output clause to easily read back the generated values there doesn't seem much advantage in using a sequence instead.
Post #1293051
 Posted Tuesday, May 1, 2012 5:56 AM
 SSC Eights! Group: General Forum Members Last Login: Tuesday, April 15, 2014 8:03 AM Points: 825, Visits: 319
 Toreador (5/1/2012)Does anyone have any suggestions for possible uses for sequences? Once upon a time I'd have used them for populating primary keys instead of using identities (ie the way I used to in Oracle). But now that we have the Output clause to easily read back the generated values there doesn't seem much advantage in using a sequence instead.Our software has to run on Oracle and SQLServer. At the moment, the modules that use sequences are Oracle only but if we port those modules to SQLServer we would use sequence there, too, so as to keep the code as similar as possible.
Post #1293056
 Posted Tuesday, May 1, 2012 7:59 AM
 Hall of Fame Group: General Forum Members Last Login: Sunday, November 6, 2016 8:50 AM Points: 3,820, Visits: 1,337
 Thanks for another SEQUENCEs question, I think I now understand how they work.I agree with Marlon that defaults should not be used in sequences, as it is harder to debug when there is a problem."El" Jerry "El" Jerry."A watt of Ottawa" - Gerardo GalvanTo better understand your help request, please follow these best practices.
Post #1293168

 Permissions

 Copyright © 2002-2016 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.