Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

Sequences II Expand / Collapse
Author
Message
Posted Tuesday, April 24, 2012 5:29 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:07 AM
Points: 1,765, Visits: 2,139
Excellent question. On a new feature, minimum code to make your point, clear cut answer, and several issues demonstrated at once. Bravo! (and Thanks!)

I think if you give it some thought, this feature behaves as you would design it. The defaults seem the way I would hope they would - for a pleasant change.


Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1288807
Posted Tuesday, April 24, 2012 5:30 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:47 PM
Points: 5,571, Visits: 24,784
I am some what confused and perplexed for when I run
(in Denalli CTP3)

SELECT name, start_value FROM sys.sequences;

the return values are:
name start_value
SSC_ROCKS 2147483647

and that start value is a POSITIVE VALUE.


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #1288809
Posted Tuesday, April 24, 2012 5:35 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:07 AM
Points: 1,765, Visits: 2,139
bitbucket-25253 (4/24/2012)
I am some what confused and perplexed for when I run
(in Denalli CTP3)

SELECT name, start_value FROM sys.sequences;

the return values are:
name start_value
SSC_ROCKS 2147483647

and that start value is a POSITIVE VALUE.


MAX for INT is 214748647, which it uses as start value because INCREMENT BY -1 indicates the sequence should be DESCENDING.


Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1288813
Posted Tuesday, April 24, 2012 5:35 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:38 AM
Points: 1,713, Visits: 6,249
Thomas Abraham (4/24/2012)
this feature behaves as you would design it.


Which is the reason I guessed wrong
Post #1288814
Posted Tuesday, April 24, 2012 5:36 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:49 PM
Points: 13,283, Visits: 10,156
sqlmunkee (4/24/2012)
So, the key bit here is that SQL will *decide* whether the sequence is ascending or descending based on the INCREMENT BY argument.


That only seems logical to me.
If the INCREMENT BY is negative, the sequence will automatically be a descending one, as you will always "take a step back".




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1288815
Posted Tuesday, April 24, 2012 5:38 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:07 AM
Points: 1,765, Visits: 2,139
Toreador (4/24/2012)
Thomas Abraham (4/24/2012)
this feature behaves as you would design it.


Which is the reason I guessed wrong


Ah yes, a SQL Server veteran. Burned by experience, conditioned to expect the unexpected.


Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1288816
Posted Tuesday, April 24, 2012 5:45 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, January 31, 2014 9:00 PM
Points: 130, Visits: 87
damn it! MISTAKE with the cycle/no cycle argument not related with the start value!

I didn't know that the start value for the sequence is the maximum for a ascending sequence. Let's learning.
Post #1288819
Posted Tuesday, April 24, 2012 5:46 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, January 31, 2014 9:00 PM
Points: 130, Visits: 87
damn it! MISTAKE with the cycle/no cycle argument not related with the start value!

I didn't know that the start value for the sequence is the maximum for a ascending sequence. Let's learning.
Post #1288820
Posted Tuesday, April 24, 2012 5:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:47 PM
Points: 5,571, Visits: 24,784
OK no longer confused or perplexed -

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #1288826
Posted Tuesday, April 24, 2012 6:08 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:07 AM
Points: 1,765, Visits: 2,139
Removed as issue is moot now that Ron is back in our space-time continuum.

Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1288834
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse