|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 9:31 AM
Points: 1,039,
Visits: 1,356
|
|
| Comments posted to this topic are about the item Sequences II
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, October 24, 2012 8:17 PM
Points: 1,558,
Visits: 247
|
|
Guess I need to learn more about the new features in 2012. Good question.
http://brittcluff.blogspot.com/
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Today @ 1:52 AM
Points: 9,372,
Visits: 6,469
|
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:15 AM
Points: 1,476,
Visits: 1,943
|
|
Now i cant test this. But is that answer really accurate. Reading the link... it doesnt sound so.
Since its an int the values defaults become MinValue : -2,147,483,648 MaxValue : 2,147,483,647
Startvalue will be MinValue (since its not given).
So add -1 to -2,147,483,648 and it should loop... but only if option is CYCLE and the default is NO CYCLE... so shouldnt it give an error instead?
/T
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 4:19 AM
Points: 1,946,
Visits: 573
|
|
tommyh (4/23/2012) Startvalue will be MinValue (since its not given). Check reference again. Start value is different whether sequence is ascending or descending.
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:15 AM
Points: 1,476,
Visits: 1,943
|
|
dawryn (4/24/2012)
tommyh (4/23/2012) Startvalue will be MinValue (since its not given).Check reference again. Start value is different whether sequence is ascending or descending.
You are so right.
/T
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: 2 days ago @ 3:48 AM
Points: 3,125,
Visits: 4,311
|
|
good question, thanks
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 7:48 AM
Points: 859,
Visits: 762
|
|
I fell into the same trap as tommyh... I should have looked it up.
-- Stephen Cook
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 5:21 AM
Points: 1,162,
Visits: 728
|
|
Stephen E. Cook (4/24/2012) I fell into the same trap as tommyh... I should have looked it up.
Me too... trapped, hook, line and sinker... doh!
_____________________________________________________________________ "The difficult tasks we do immediately, the impossible takes a little longer"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 3:06 AM
Points: 150,
Visits: 70
|
|
So, the key bit here is that SQL will *decide* whether the sequence is ascending or descending based on the INCREMENT BY argument. That's a bit misleading if your just starting out with sequences and SQL 2012 (like me) Good question !
|
|
|
|