« first day (1773 days earlier)      last day (3393 days later) » 

07:23
Arg. I think I had used this syntax years ago without realising that it was doing nothing:
20
A: How do I create a DESC index in MySQL?

a_horse_with_no_nameThat's one of those MySQL "features" where it silently ignores your request to do something because it's simply not implemented: From http://dev.mysql.com/doc/refman/5.5/en/create-index.html "An index_col_name specification can end with ASC or DESC. These keywords are permitted for future exten...

07:35
@JamesLupolt Not that I'm using MySQL or otherwise interested in its capabilities, but that's a surprising fact to learn nevertheless. Doesn't seem like a hard feature to implement, but I might be underestimating its complexity.
@JamesLupolt heh ;)
@AndriyM MongoDB allows you to declare index sort order, so my guess is you're right that it isn't that hard to implement. : )
@JamesLupolt In all fairness, MySQL also allows you to declare that :)
it would useful, mainly for composite indexes. That's (perhaps) why it hasn't been done
SQL Server doesn't allow you to declare NULLS LAST or NULL FIRST in the index definition. Postgres has them (and I think Oracle, not sure).,
It's only Postgres according to figure A.1 near the bottom of this page:
That's how I got onto this topic this morning. I was reading that, got to the figure, and realised that my DESC indexes I created circa 2006 were a prank played upon me by MySQL...
Oracle lets you specify NULLs FIRST/LAST in a query apparently, but not in the index.
07:52
Of those mentioned, only Oracle and PostgreSQL support NULLS FIRST/LAST, and they also happen to be the only two products that sort nulls last by default. Curious.
You'd think they did that to allow the behaviour compatible with other products, but NULLS FIRST/LAST is also part of the standard, if I'm not much mistaken.
08:14
0
Q: What is the meaning of this operator: *=

Michael RichardsonI have a very old Access application that uses SQL Pass-Through Queries. This application has been nursed along through multiple server upgrades, and we recently moved up to SQL 2012. I now get a syntax error. The last two lines of the code are where the problem is. I believe it is some kind ...

Was *=* really an operator (equivalent to FULL JOIN)?
Anyone with a 2008R2 or earlier version available that can test?
@ypercube Incorrect syntax near '*', it says. Apparently, the answer is, "No".
@AndriyM thnx. SQLfiddle doesn't allow me to check
Although it says 2008, apparently it runs in newer compatibility mode.
08:35
I think I've heard it mentioned that it actually runs on 2014 but the DB's compatibility level is set to 100.
Here you go: sqlfiddle.com/#!3/9eecb7db59d16c80417c72d1/3631 – SUM OVER ORDER BY in 2008
But of course SELECT @@VERSION is a much simpler and more straightforward test: sqlfiddle.com/#!3/9eecb7db59d16c80417c72d1/3639 Silly me.
Yeah but why the level shows as 100 but the queries seem to run in 120?
I think it has always worked like that. For instance, you can use OVER clause in a DB with CL 80.
I mean, some syntax is indeed limited to higher versions, but other features seem to work regardless of the compatibility mode.
08:50
ok. that doesn't explain why *= doesn't work in SQLfiddle, with 2008
Because the product itself has stopped supporting it, I think.
Or you could explain it like this. That syntax only works with CL 80. SQL Server 2012+ doesn't support CL 80, so you just can't have it any more.
Ah.
I thought it was working up to 100.
Thnx @AndriyM
Looks like it was deprcated since the 2005 version, so needed compatibility level 80 to run in 2005, 2008 and 2008R2
09:23
Morning
out of curiosity, what was the highest planned/observed uptime of any bigger system you met so far (only ones that had databases in there)?
@dezso Answer was deleted due to peer pressure...
@dezso Define "bigger system"?
@dezso And define "uptime"...
a bigger system, say, is not less than 100 concurrent users at any given time (except downtimes :), with subsecond (expected) answers for any given request
uptime is when there is a chance of getting answers to requests :)
52
Q: Parse JSON in TSQL

R0b0tn1kIs it possible to parse JSON in TSQL? I dont mean to create a JSON string, i mean to parse a json string passed in as a parameter.

fun stuff - compare Phil Factor's and Ric Vander Ark's answer, the votes and comments
in my view, both are more or less link-only answers, one with a distinct literary value
@Colin'tHart and uptime in percentage (like 99.99% - less than an hour of DT allowed in a year)
@dezso yeah
But sites that require registration are frustrating
09:39
@ypercube they are
What could be a good reason for a site like SSC to require registration just to be able to read content?
Just curious, anyone know if they required registration before the Redgate acquisition?
09:59
@JamesLupolt When were they acquired by Redgate?
10:22
@MarkSinkinson 2006
 
2 hours later…
12:32
@ypercube, sorry to start commenting again, but I could use the query, I made my researches and deleted those hypotetical indexes. But when I query SELECT QUOTENAME(OBJECT_NAME([object_id])) AS [TABLE],* FROM sys.indexes WHERE is_hypothetical=1 I can still see Hypotetical indexes. notice the first column has tables with _dta_. Are those hypotetical indexes views or something? — Rafael Piccinelli 40 mins ago
@TomV I suppose these comments/questions are for you ;)
 
1 hour later…
13:34
@ypercube Yes, I was pinged because they were attached to my answer
but thanks anyway
Morning @ all
@ypercube He has real indexes dta too I guess. A bit of a mess :)
@AaronBertrand I got to plug one of you blog articles on a StackOverflow, article which I have read more than once in the past but never put 2 and 2 together until just yesterday that it was part of your "Bad habits to kick" series :)
(I'm also open to anyone who has more ideas on how to improve this answer to that post, I haven't done much performance tuning on MySQL so I'm sure one of you all would know some things I don't)
 
3 hours later…
16:14
What's up folks
@Zane shhhhhh. We're hunting wabbits.
Jets play again tonight? I know they've got a hell of a road stretch coming up.
@Zane yah, in Dallas.
shouuld be interesting.
I think Dallas is going to come down to earth. I don't think they are that great.
@Zane hopefully we get a win tonight. Is Minnesota playing?
16:20
Yeah. We play Carolina.
Theoretically we should stomp them into the dirt.
@Zane I think that is pretty much a given at this point. Although you just never know I guess!
Yeah there's a reason they still play the games.
@Zane :-)
Just saying with the production we are getting out of Miko and Vanek right now.
We should be able to beat a team at the bottom of the East.
1
Q: Planned release date for the next version of SQL Server

mg1075Has Microsoft published a roadmap for the next version, identifying a planned release date? If not, how long do you think before the next version becomes production ready?

Anyone against, editing this question into a "generic" question based on Aaron's answer? I think it would be useful based on the info he provided and could be used as duplicate for any future questions on "when is ___ version going to be released".
16:28
@Zane based on how soundly Minnesota spanked Winnipeg, I'd say I agree.
@ShawnMelton I was thinking of doing that earlier. Sounds like a good idea. And looks like it's already been done.
Ah, didn't see original version
Eeegads the NHL has a hideous website.
@AaronBertrand are you around?
17:02
@Zane about to go get lunch, what's up?
@TomV Someone took the DTA advice for real ;)
17:21
^^Ummm didn't that Defense just allow a billion points to the Saints a few weeks back?
Yeah, and JPP clearly has the best decision making process, too.
I just saw that and though it was funny.
You guys aren't exactly the 85 bears.
@ShawnMelton that;'s exactly what I tried to do (the question was originally about 2016 specifically)
can't take credit for that. it was a pats fan responding to the NFL Meme's trolling of new england
 
1 hour later…
19:03
So I hope I just made de-spaghetti a thing
Ugh. Why not WHERE 1=1, then you can simply add new clauses always using AND. This would de-spaghetti your code greatly... — Aaron Bertrand 25 secs ago
I'd also be open to un-spaghetti
19:30
why? Why, oh why, would you be using SQL Server 7.
@MaxVernon because it's legacy
@swasheck undoubtedly it'll fall over nastily if they put it on something "modern" like SQL Server 2005.
that's quite the legacy
One of our dear CR mods just posted a SSIS question on DBA, in case anyone is interested... dba.stackexchange.com/questions/120907/…
Does commit the full Commit Transaction? I'm kind of taking a stab in the dark here as I was 12 when 7.0 came out.... — Zane 6 secs ago
19:38
@MaxVernon 2005? That sounds pretty risky to use something that hasn't been out in the wild for at least 15 years... What if there is some undiscovered bug? I can't believe you'd recommend something that has only been in production for ~10 years ;)
@Zane That was my first guess too.
@Erik lol
@MaxVernon Oh I never asked before. Do you have any experience with CNC mills?
@Erik not exactly, although I was trained in industrial automation a while back. A friend of mine sells big CNC lathes, etc.
@MaxVernon gotcha so that is the connection. very cool.
does anyone one know when the SQL Server 2016 release date is?
19:43
@Erik I've built several systems to integrate PLCs with PCs, which is always fun. I build some software that controls a carpet cutting machine from the PC. You do things like enter the length of carpet in a nice simple form on the PC, and it proceeds to tell the PLC to advance the carpet through the machine to the precise length desired, then tells it to cut the carpet. Etc. etc.
@swasheck you're trolling @AaronBertrand right?
moi?
@swasheck lol
Folks, please stop asking for the date SQL Server 2016 will be released. The answer is still “When it’s ready.” Nobody is holding out on you
@swasheck I think we should have a pool on when it comes out.
@MaxVernon That sounds like it would be a fun project.
19:48
@Erik yah, it was interesting. It's amazing what you can do with a PLC if you really try.
I bet
Are people desperately awaiting it's arrival or what? It's not Fallout.
It's out when it's out.
@Zane everyone wants the json ... i guess. i dunno.
@Erik Yeah from everything I can find he needs to put tran or transaction after.
@Zane it works on SQL Server 8.0 as-is.
19:54
@Phrancis exact step of the error would help a lot, I posted a comment for extra logging
@MaxVernon But 7 8(ate) 9, so it is clearly temperamental.
@MaxVernon Maybe it's just upset that he isn't doing anything
@Zane that was my initial reaction. Also, I don't think you can possibly change "BEGIN" to something else as the OP seems to think is possible.
@Phrancis my guess is that if he sees that log file he will figure it out himself though
@TomV oooh good idea! I have logging enabled on the "parent" SSIS package that's running overnight, but all I'm seeing for these specific packages is "Succeeded" at 4:25AM - I'll add that, redeploy, re-run, and update with more details! — Mat's Mug 1 min ago
@TomV Nice! You might very well be right on that
20:10
@Phrancis I mean, if he reviews vba and vb6 he isn't scared of anything :D
@AaronBertrand done, but strange that your second suggestion only has 5 votes while the rest has 30+
I feel 2 is more important than 1
@AaronBertrand while you are here, I had a test setup (inherited, yay) where builtin\administrators was sysadmin, and I was local admin on the machine but couldn't login into 2016 latest CTP, is that a known issue or something documented?
in an azure vm if that matters
@TomV It was created half an hour ago, the others have existed for ages
@TomV sure, new versions of SQL Server don't add builtins or installer as local admins unless you explicitly do so during setup. Who knows what the installer did when they added it to your vm?
15
A: No SA password. No SQL Server Management Studio. No OS authentication

Aaron BertrandWell, you can start by installing Management Studio. (How else do you plan to perform maintenance tasks once you have access to the instance?) I recommend the most recent version of SSMS Express (SQL Server 2012 SP2) which is fully functional, manages 2005 instances just fine, and is completely f...

well the vm is something you can do now with dynamics ax, you click "i want a new AX" in some web interface and they spin up a machine (beta for AX too)
20:23
@AaronBertrand done
builtin admins was in the sysadmin role, yet I didn't have access as an admin
@TomV Yeah I don'y know how roles and permissions work in an Azure VM, sorry. There might be some block on inheritance, don't know. Use the method I highlighted above, and add your explicit domain account instead of relying on builtin\admins
@AaronBertrand that's what I did and afterwards it worked
but I found it odd
If you want to know why you have to do that, I can only shrug. Contact Azure support.
(I'm not brushing you off, I just don't have an answer for you, but they will. Maybe.)
@AaronBertrand I don't really care enough as it's all still beta and that will be their reply I guess
20:29
That might be a Windows problem, though, not a SQL Server one. Would be curious to see if it works the same with a 2004 instance.
as a low-level partner we get to go through the first line support so it's not worth anybody's time I guess, nevermind. We'll see what it does when everything goes RTM
20:56
@Phrancis
Did you log to a text file or something? Are they overwriting one another? If done right you should be able to get detailed info of every step on the child package. Meet me at the heap if you want to chat — Tom V 3 mins ago
I didn't see how I could launch a private chat, sorry
@AaronBertrand done
21:11
@TomV No worries
21:35
@Erik thanks for the fix
typing in couch-positiion isn't great :)
21:52
@TomV anytime! I moved the comment here and deleted it on the post
I'm always confused when someone rejects what seems like an obviously superior plan.
@Erik since a crappy answer is already accepted and could work for the OP I'm not inclined to put much effort in it
Yeah I get that.
I put a similar comment on another person's answer earlier that got flagged and put in the low quality post queue. I figured if I didn't say something with you then it wouldn't be fair.
Using the DATE datatype is clearly the superior approach
I agree some code sample would've been better, but without sample data and such it would be guesswork
true
also feel free to delete your comment to me. I've removed my corresponding comment
I think all of it can be deleted, but my guess is as good as yours
I mean the entire question
22:00
lol but then you lose the 10 points I gave you via the up-vote!!! that would be tragic!
@Erik won't somebody please think of the children!
meh, I'm sure someone else will want to follow in the OP's footsteps. It'd be nice to have something to dup the follow-ups with....
I don't really care for the unicorn points, even though I wouldn't mind reaching 3K and have some additional mod tools
@Erik if the dups follow the accepted answer I"m not sure I want that
being the naive and foolish person I am I think there is still a chance the OP will see the light due to my last comment...
@TomV lol that is a very valid point, but then how can we look like heroes when we fix the Feb 30th problem with the appropriate data type? ;)
@TomV I agree that is my new target and reasoning. I've been too lazy to write good answers recently so it will take a while for me to get there....
22:06
@TomV lol that too for sure, but string dates in SQL Server was what I was talking about. MySQL should really just fix that ridiculous bug IMO
Put your hand up if you like programmatically generated queries.
@MaxVernon I've met developers that think they're the bees-knees. I'm not a fan though
I assume you're talking about ginning up SQL in an ORM, through T4 templates, or the like
@Erik actually in this particular instance I'm talking about queries that are generated by Business Objects. Makes me want to put a bullet in my head.
@MaxVernon aaah BO, reminds me (unfortunately)
SELECT C113 AS C114, C119 AS C120 FROM (SELECT C112 AS C113, C115 + C116 AS C119 FROM "database"."schema"."table" C12, "database"."schema"."somethertable" C13 WHERE C12.C120 = C13.C121)
22:11
no make it stop, i almost forgot about that
@MaxVernon lol that is disgusting beyond belief!
oh, and if only it were actually that simple.
Thank you for warning me. I will never accept a job where I have to deal with that!
@MaxVernon Seriously, it's bedtime around here, I'll quit before you post (and remind me) more of that crap
@MaxVernon and @TomV you are better men than me to deal with that nonsense
22:13
There has to be almost nothing better than nested selects 3 or 4 levels deep with column names that mean nothing to any sane individual.
and then they ask "why is it so slow - must be something wrong with the server"
oh there is
@TomV genius!
Please read this excellent article by Aaron Bertrand talking about why what you are doing hurts us DBAs. — Max Vernon 3 mins ago
@MaxVernon dynamics AX FTW
"the server is slow, we had a query using 300+ parameters and sometimes it's slow'
yea but which parameters were sniffed and what created the plan?
@TomV just goes to show how incredible SQL Server actually is that it can even run that at all.
@MaxVernon run yes, slowly
anyway, off to bed
BO nightmares lining up
22:56
Dunno if anyone is interested, but I just posted a SQL Server script/question on Code Review: codereview.stackexchange.com/questions/110613/…
apparently SQL Server 2007 cannot "lunch" on Windows 10. Tasty.
0
Q: Sql works on windows 10

dana kassirDoes the sql server 2007 work on windows 10? I've been trying to install it but i faced 2 problems 1st it cannot lunch on windows 10 and second my licence has ended

23:20
Yummy!! LOL

« first day (1773 days earlier)      last day (3393 days later) »