« first day (1976 days earlier)      last day (2898 days later) » 

12:08 AM
@AndriyM lol you're right, their IDs will change every day, good spot.
 
@wBob Similar but not too much, IMHO. I agree that the basic idea is the same, but the implementation is different enough to warrant a separate answer (again, IMHO), specifically the IDENTITY vs SEQUENCE bit.
Only the resetting part would need to be covered.
 
@AndriyM Sure, I started to write the reset code, but it didn't look great. The sequence is quite a nice way of doing it, although I've heard they can be unreliable : )
 
@wBob Yes, the resetting part is actually what makes me doubt that using an identity column is a good idea at all, to be honest :)
 
@AndriyM Indeed! I was just doing it that way for the demo, so a bit rough and ready, then I saw your comment about the resetting which reminded me.
@AndriyM OP could combine the two approaches and maybe get a half-decent answer : )
 
By the way, there's another mistake in that answer. The sequence's start value is outside the minvalue..maxvalue range.
Since I never worked with sequences before, I wasn't sure if that would cause a compilation error, but I've since checked with the manual and now verified that it indeed won't compile.
But that's probably more in the nitpicking area. The OP has accepted the solution, so I guess the compilation error wasn't a problem for them to fix.
 
12:30 AM
@AndriyM Yes that's true. OP rules!
 
 
1 hour later…
1:51 AM
@AndriyM Yes. That needed fixing. I also added a date column. Seems a reasonable enough change since the author wrote "something like..." and that's likely to be more generally useful.
 
 
7 hours later…
9:05 AM
Morning all
 
good UTC morning
 
9:37 AM
morning
 
Happy $LocalTime
 
10:11 AM
Happy Microsoft Release time...so it could still be 1st June right now
 
Oh yes 2016 RTM'd
 
@PaulWhite Yup, watching Twitter yesterday was fun
 
Yeah always goes nuts.
16
A: Sequence - NO CACHE vs CACHE 1

Mikael ErikssonIt is hard to give a definitive answer on this question until you actually find a difference. I have found none but that does not mean there is no difference only that I have not seen one in the tests I have made. The easy test is for performance. Either getting the next value in a loop or using...

That's a nice answer.
 
10:33 AM
@PaulWhite Agreed
 
 
3 hours later…
1:11 PM
@PaulWhite not often you see a question from @marc_s and yes, the answer is pretty great!
 
1:26 PM
also, when you say "a ton of data" (a metric tonne?) how much exactly are we talking about? ie. number of rows, and average row size? Use the edit button to put these details into your question, please! — Max Vernon 1 min ago
 
1:41 PM
also, there is nothing better than working with an RDBMS that is 15 years old.
 
2:17 PM
oh no:
You're not actually going to make an ATM, correct? This is just for practice? — Max Vernon 17 secs ago
if he is going to make an ATM, I'd really like to know what bank it's for, just so I can make sure I never use that bank.
 
 
1 hour later…
4:32 PM
@MaxVernon If I'm being lazy I sometimes use this dodgey ATM in a corner shop that makes the 56k dial up modem sound during the transaction.
Probably runs on Win 95
 
@JamesAnderson sounds like fun!
 
4:53 PM
thanks, @AndriyM for this edit - I have struggled with formatting code in bullet points for quite a while!
and presumably that was your upvote. Cheers for that!
 
 
2 hours later…
6:59 PM
Somebody wants this reopened
0
Q: Sql developer how to copy to another tablespace

Kshitiz SharmaWhen copying database using SQL Developer it complaints that the source tablespace does not exist on destination database. How can I copy schema and data from Database A tablespace t1 into Database B tablespace t2? Note: I do not wish to use impdp.

 
 
1 hour later…
8:10 PM
Hi, @NeilMayhew Thanks! Humm... but the question has the tags linux ubuntu-10.04 Paul Vargas Aug 14 '15 at 17:29
Hey, @PaulWhite How are you?
 
8:52 PM
@TomV The author.
@PaulVargas Good thanks!
 
9:29 PM
I'm Interested to see what you come up with on Geoff's interesting 2014 CE question, @PaulWhite
 
@MaxVernon Hadn't seen it yet. Added a temporary comment. I'll look later when I'm free.
 
 
1 hour later…
10:38 PM
Added an answer.
 

« first day (1976 days earlier)      last day (2898 days later) »