« first day (1353 days earlier)   

12:28 AM
I think he's saying something like "Computers can't process sets efficiently because the algorithms available today mean they have to iterate over the items in a set." Which isn't generally true, but maybe he just isn't explaining himself well...
@James Could be (not explaining himself well.)
I was not commenting with "WTF" or "bullshit", because it might be that.
Otherwise, it's full of nonsense in my opinion. RDBMSes ... use lists, they iterate and they uses rows of fields instead of tuples of attributes."
yeah sounds like he thinks RDBMSs work like spreadsheets
Maybe his only experience with "RDBMS" was Access.
12:45 AM
I think I'm going to tell someone they aren't 'operating the real sets' tomorrow and see how they react.
Unreal Sets sounds like a cool name for DBMS.
4 hours later…
4:56 AM
@PaulWhite Nah, just wondering. Got a schema change coming up that's dropping a few columns and wasn't sure whether to expect a table scan or not. :)
4 hours later…
8:34 AM
@James For bonus points use gnuplot.
1 hour later…
9:50 AM
@James They answered:
@ypercube Imagine the box with white and black balls. Those who can deal with sets simply say: let there be white! But we are pick balls one by one and separate them as a shepherd separates the sheep from the goats. Because we can operate lists, arrays, trees but not sets. When we deal with the set we say: okay, let's represent this set as the (randomized) list! And then we do all that we can - we iterate list elements one by one. We achieve the same result and think that have the same ability. Isn't that a pride? :) — Kondybas 12 mins ago
I wish I could -5 for the bible reference.
2 hours later…
12:18 PM
terrible question
Q: Single User SQL Server 2008

Saulo DavidMy SQL Server 2008 is going into Single User Mode, and also I've been researching and I think that has a backup performed by a virtual machine, you must have something to do and how and reverse it?

Q: Can administrators seed DBA with more tags?

vfclistsI asked this question Does Postgres have a function for converting text into ASCII escaped or HTML escaped text? and was looking to add tags such as conversion, escape, translate, html, ascii and found that they were not available. Should the admins add some of these tags or related ones? They s...

@AndriyM wow that answer is ugly
Why on earth would you want to write an UPDATE statement this way? — bluefeet ♦ 6 secs ago
1:08 PM
What's the point of using Runnable Snippets on SQL code?
Q: how to select mapped rows from a table in mysql

Ambrish MayankI have the table | ID |item_code| item_name | | 1 | 12345 | abc | | 2 | 12345 | xyz | | 3 | 11221 | abc | | 4 | 19261 | www | | 5 | 12345 | abc | | 6 | 62898 | abc | | 7 | 92648 | xxx |...

Is it because of "Copy snippet to answer" perhaps?
@AndriyM ugh.. user incorrectly used the wrong button
Ah, there's a button for that... Didn't know, all right.
They had <!-- language: lang-html --> which triggered the snippet tool
It was probably <!-- begin snippet ... that triggered it.
1:22 PM
@Kermit I actually think I have an answer for them
@AndriyM runnable code snippets won't work for SQL
@bluefeet Well, they kind of work (they don't crash or produce an error), just not the way I'd expect.
@bluefeet destroy
Q: want to fetch data from two table

user2763731i have one category table and other is product table. category id is the forigen key in product table. i want to get category name along with its count that how many time each category id exist in product table. table= category columns: categoryid,category name table = products column: produ...

@AaronBertrand - I hope you don't mind, I just added a tiny bit to your answer:
A: Removing secondary data files. DBCC SHRINKFILE: Page could not be moved because it is a work table page

Aaron BertrandRestarting the server should be enough - those worktables should clear out. But I'd probably start it up in single user mode (-m) to prevent other processes from creating worktables before you successfully remove those files. Then redefine the files required for tempdb; perhaps deleting unnecess...

I added a bit more too, thanks
1:42 PM
@AaronBertrand I'm stealing your split function here -- stackoverflow.com/a/19935646/426671
@bluefeet no problemo
@AaronBertrand funny, I was going to add the TF1117 and 1118 bits but didn't want to go down that rabbit hole. Good advice, though!
@bluefeet ya. Me too.
Today I just found a homebrew insurance policy admin system based on MySQL.
@AaronBertrand it's replacing a WHILE
1:50 PM
@bluefeet - are you working on dba.stackexchange.com/questions/76962/… ?
A: UPDATE a table with 25 columns via SELECT?

billinkcUsing object explorer in SSMS, find the table in question and expand the node so you see the Columns, Keys, Constraints, Triggers, Indexes, and Statistics Drag the Columns folder into the query window pane. This results in a column-space delimited list of the columns in a single line. We're goi...

@MaxVernon no, I didn't like that one :)
@billinkc sweeeeeet. You da man!
@bluefeet yes, that is much better than a while :-)
I use the regex to split columns out to single rows as a quick and dirty formatter if I don't have sql prompt installed
1:51 PM
@bluefeet that's exactly what I thought when I looked at it. Can you say many layers of indirection? And it's not even 9am here.
@MaxVernon it would be better if they posted some data or something. I'm not going to try and figure out what they want from the code
@AaronBertrand yes my query is splitting 400k+ rows in 1:30 instead of 4 minutes
@bluefeet that's definitely "winning"!
@billinkc I use vim for this sort of thing quite a lot.
@Kermit I'm not ignoring your request, I just don't feel like closing that. It went to the queue and it is answerable. Albeit, poorly asked
@bluefeet that's fair :)
1:54 PM
@ConcernedOfTunbridgeWells You probably use vim + some TDS driver to write and execute your queries too :P
@Kermit just didn't want you to think I was ignoring you
@billinkc No. Normally just cut and paste the stuff between vim and SSMS. Vim has a good regexp engine and also a good macro facility.
@bluefeet i appreciate it
You can get vim plugins to execute queries but that sort of stuff tends to be Oracle or MySQL specific.
I was just being ornery. TextPad is my goto editor any more
1:57 PM
@billinkc :wq! ftfy
Nope, just bail out whenever I get in there
@billinkc Quiche eater.
That does sound lovely
My imaginary component makes me complex. Therefore I'm allowed to eat quiche.
Just make sure you start in column 7
2:00 PM
@billinkc Hey. Don't knock FORTRAN. My first paid programming gig was in FORTRAN.
there's gotta be a duplicate of this somewhere
Q: SQL - Get the last entries without 'order by'

user3887184Good evening stackoverflow community, I have a problem with a sql-query for my database. I want to get the last n-entries of a specific Table. Usually I would perform the following query: 'Select Top 1000 (*) FROM Table ORDER BY Column DESC', but the problem is, that the table contains a lot of ...

I wrote 6 lines of code and a makefile. The program in question was a finite element model written by a Belgian civil engineer and commented in French. However, I did successfully port the application to run on MS FORTRAN. To this day I still know nothing about FORTRAN.
@ConcernedOfTunbridgeWells Did I remember correctly that code starts in 7? My constant doing friends and neighbors fortran instead of my chemistry lead me to finally understand my true calling wasn't engineering but computer science
@billinkc I can't remember either.
Then we'll both agree 7 is the answer and never speak of this again
2:03 PM
@billinkc Speak of what?
Tea. Or beer
You mean a bit like those other three Star Wars films that never got made?
4, 5, 6? I heard they'll make the clone wars at some point. That'll be pretty awesome
BTW, I have actually seen the Star Wars Holiday Special.
@billinkc Looking forward to it.
Or those other two Matrix films they were going to make.
"What do you get a wookie for Christmas" made it onto one of my Holiday mix tapes one year
I still contend that it should have put me over the top but truth be told, my friend has way better music taste than I do
2:07 PM
'Life day' made 7yo me cringe
Sung by Carrie Fisher in her pastry wig no less.
Does anyone else find even this confusing, without reading the article?
Sorry, not trying to bring up bad blood. Was cleaning out the tabs in one of my Chrome windows that's been open for weeks.
So, published 2011-05-02, got updated 2012-12-28 but has big bold Update 2011-05-12. Sounds legit
Yet he gets all uppity giving people shit for being too stupid to understand when the updates were made and why the code in the article is not the updated version and doesn't match the code that's in the download.
I'm confused before I even get into the body copy.
^^^ and it's not because I'm stupid
@billinkc It went through the editing phase from 5th to 28th of December. ;)
And he obviously never read Aaron's articles about dates and confusing formats.
It's funny how people continue to assume that their audience is all in the US
@ypercube different years though - long editing cycle.
2:21 PM
How do people like this ever actually work with computers?
> i want to create a MySQL database but i do not know the table names and their structures?
Q: table structure in MySql for a revision mobile application

malebogoi am doing a mobile application project that will allow students to access question form the database and answer them and given answers at the end. the application will cover maths, chemistry, biology and physics. i want to create a MySQL database but i do not know the table names and their struc...

They must be asking for names of the tables and structures. y u no provide
@billinkc that would be fun.
I'm thinking tables named "A", "B", "C", and fields named "A", "B", "C" might be fun.
@AaronBertrand You're so mean closing this :)
Q: Is it possible to learn (and make a career out of) SQL without official training?

dunkelmeI'm really interested in learning SQL (SQL server or Oracle) as I already have a bit of experience with the databases at work (mostly select statements). I don't have a technical background since I was a humanities graduate in college. I'm already starting to read about SQL and maybe take a SQL s...

Or perhaps how Remedy does it; "C00000001", "C000000001"
Try debugging that
CREATE TABLE T00000001(C00000001 int, C0000000l int) etc I pity the poor bastard who updates the l and not the 1 column
2:28 PM
@billinkc exactly!
The government consulting company I worked for, their time entry system used essentially guid length billing codes. You couldn't copy and paste a code from there so I'd get PMs sending me charge codes but since they're typing it out, I'd get to play "is that a zero or an oh. One or L" They tried sending screen shots but the helpful webpage used sanserif fonts
@billinkc genius. They should have used Comic-Sans.
I had left entering time on a mainframe app and said there's no way I can ever run into a time entry system worse than this. Fate's such a funny mistress
Some people need to get their priorities straight.
Also option one is less typing. Always a plus. — Jake 2 hours ago
Like f&%$ it is.
@AaronBertrand so a quick question for you ... what is an appropriate use case for BETWEEN?
2:39 PM
@swasheck for ints and things it's ok. Just never makes sense for dates.
(It works for the explicit DATE data type, but I hate the inconsistency of using things only when they don't break.)
Even for date it's cumbersome to use BETWEEN. Get me all the data for February of <some year>. Which is easier to calculate, BETWEEN 2/1 and 2/28_OR_29, or >= 2/1 and < 3/1?
i have a BUG in MSSSQLSERVER. BeTwEeN is NOT getting my time on the last day
ok. makes sense, thanks. i went through and refactored many of my demo scripts so as to not use metadata functions. i just didnt want to incorrectly use BETWEEN :)
@AaronBertrand right. so the date use case is the one with which i'm familiar (from past experience). i just didnt know if there was (in your opinion) ever an appropriate use case for BETWEEN or if you'd just advocate the expansion (>= =<) as a general rule
@AaronBertrand That's why they added that END_OF_MONTH function !?!
(or some variant of the expansion that meets your actual requirements)
@ypercube EOMONTH() is also useless. It's great again only for DATE data type. For datetime, it gives you 2/28 or 2/29 at midnight. How does this help? You still need another 23:59 of data.
2:44 PM
Rounding error. Like anything happens on the last day of the month
@AaronBertrand F*!k, I didn't know that.
@ypercube I thought you were just taking the p*ss out of him with that comment
Ranks pretty high for me on "biggest waste of SQL Server development team time"
@billinkc No, I'd never even consider using that function.
even if they'd considered the time component, there's no guarantee that they'd return it at the resolution you require ... i mean what if you need 2014-02-28 11:59:59.999999 and they only gave you 2014-02-28 11:59:59.997
2:48 PM
@billinkc There's always something worse. Nothing like working in B.I. to see the ugly, flabby underbelly of poorly designed legacy applications.
And given that applications are, on average, poorly designed ...
is sqlblog.com unbearably slow for anyone else?
I may have to start migrating my content. He's just never going to move to wordpress and it is becoming intolerable.
I'm imagining Churchill describing legacy applications as the weak underbelly of an organization. This pleases me
everything is unbearably slow for me today --- i just assumed that it's a security feature our CyberSec team implemented
@AaronBertrand Yes.
2:50 PM
@AaronBertrand crawls after the header loads
how's the referendum voting going over there, @ConcernedOfTunbridgeWells?
@swasheck One of the major bookies is betting against it, so I'd say the vote will probably land on 'No.' If it does go ahead it will be a 3-ring circus.
Some people just like to watch the world burn
3:03 PM
@swasheck My PHB is Scottish and is somewhat annoyed that only Scottish people living in Scotland are allowed to vote.
Seems like they're justified in their grievances though
@billinkc There are some fairly poor and grotty areas in Scotland. They say that the difference between Glasgow and Edinburgh is that when you hear a gun go off in Edinburgh you know it's 1PM.
Take a search around Youtube for Frankie Boyle clips. He's a comedian from Scotland.
I figured they'd want the Welsh to leave first
@billinkc I'm pretty sure half the Welsh would want to do that as well.
I can only assume that a successful vote for succession will restart tensions in NI
3:08 PM
@billinkc Probably. Someone's started talking about Cornish independence as well.
as long as the Isle of Man remains, all will be well
TBH, I think it's about time Wessex and Sussex got their independence back from those Normans.
It's only a matter of time before the Picts throw off the chains of their oppressors
@billinkc Well, the Romans did leave around 400AD, so I really don't know what the Picts have got to whinge about.
Wall of Hadrian ruined the natural beauty of the land
3:12 PM
@billinkc I always thought running the M6 through it defeated the purpose of having a wall in the first place.
@swasheck Details?
i have none. sorry.
@swasheck Could you please explain in more detail?
3:19 PM
@swasheck Jolly good.
Mighty loquacious today
oohntsa oohntsa
Hey I skipped the 5 and the 5s, so this is definitely going to be a big change for me.
@AaronBertrand it does look prettier
3:29 PM
Someone needs to build a concatenated word dictionary. Sure, it won't be accurate but we won't be left with things like CapasityMaxand CapasityDiff
@ryanjadams @stevewake @confio I can't wait to hear what I will day tonight. What's the topic?
that's our main presenter at UG tonight
3:43 PM
@swasheck Yup. Nothing but quality at DSSUG
what a clown show
And I'm the warmup act.
who's in charge over there?
Some jerk
these questions are terrible
Q: TSQL Duplicate rows based on columns

Jonathani'm trying to achieve the following with tsql What i have in my table looks like this A B C 3 what i want to have is A B C 1 A B C 1 A B C 1 to split it based on the quantity column 4.. Not sure what function to use. Any help would be appreciated thanks.

3:48 PM
@Kermit and look who answered
it's a dup, I'm looking for a question to use
and closed
I feel an an aneurysm coming on gist.github.com/anonymous/946339532950dd08b6a1
A cursor, because cursors
oh and @AaronBertrand your split function got my code down from 9 minutes to process 650k+ rows to 3:30 :)
@billinkc Or just a spell checker that can recognize Camel or Pascal Case.
@bluefeet So it looks like it's been asked at least twice, so I've gotta ask. Why would you want to? I can't think of anything.
@MichaelJSwart I wouldn't want to do that, but people ask strange stuff
@bluefeet I know! Unusual questions can often be put down to people struggling with a new technology. But since more than one person asked the question, it means they're living in the same Bizarro world. I wonder what problems lead to these Bizarro solutions where you might want to duplicate rows this way.
4:09 PM
@bluefeet I sent your question to our DAX guy to see what he can do with it.
@Zane cool, thanks
Oh my, it's a @MichaelJSwart!
Programmer queries. Yikes.
AND DATEDIFF(d,@startDate,COALESCE(f.AcqDate,f.CloseDate)) >= (-1)* @m_DaysOfData
Oh yucky
@startdate = GETDATE() @m_DaysOfData = 120
4:17 PM
That is just so terribly unreadable.
It took me a bit to turn it into a simplly >=
Dammit I didn't catch my spelling error.
Ctrl-F5, search in files for TextPad. Not noticing my window focus was on Visual Studio = Oh God, where did that package just run
4:30 PM
Oh god, that cursor that does nothing? It actually does something. They didn't know how to assign to a variable from the query results so they spun a cursor to do nothing, that query only returns a single row and the make use of the FETCH NEXT to populate the variables.
Oh bravo. That's going into my hate bank
Query tuning has got to be my favorite part of this job.
Dude I don't even
Q: Creating html database documentation by using system tables. Is there a way to bring in stored procs if non-system stored procs have the _sp prefix?

Wayne FitzJoined a start up that had virtually no database documentation and was not happy with the extremely verbose SSMS auto documentation creation utilities, such as SQL Doc, so I decided to create my own that outputs text that can generate an html file and to have more control of what is included. Thi...

@billinkc Hahahaha!
@AaronBertrand I clicked Edit because I was going to format and I have since clicked cancel, closed the window and am headed to the janitors closet for some bleach
I think the question is "how do I fix this code so that procedures named sp_* are included?"
I think the answer is
Maybe leave out the filter and p.name not like 'sp_%'? — Aaron Bertrand ♦ 2 mins ago
4:43 PM
@AaronBertrand Believe it or not SQL Server was having a rough time figuring out what that meant as well.
Query down from 1 and 1/2 hours to 2 minutes and 15 seconds! Yeah buddy!
I wish I could Upvote Shawn for that edit. You sir are a saint. — Zane 11 secs ago
Wish I would have found this prior to making my own interoffice blog post about this.
A: Is this condition Sargable?

Aaron BertrandUsing AdventureWorks, if we look at these two equivalent queries: SELECT OrderDate FROM Sales.SalesOrderHeader WHERE DATEDIFF(month,OrderDate,GETDATE()) BETWEEN 1 AND 7; SELECT OrderDate FROM Sales.SalesOrderHeader WHERE OrderDate >= DATEADD(MONTH, -7, GETDATE()) AND OrderDate <= DATEADD(MONT...

@swasheck there is no phrase in this world that I hate more than Social justice.
@Aaron Bertrand Good point. I am an idiot and tired. — Wayne Fitz 47 secs ago
@Zane why?
@swasheck Because it's a loaded statement.
4:52 PM
tell me more
like does he have a car
It's like calling yourself a progressive. The language implies that your ideas are more forward thinking and enlightened than the other side of the argument.
It's a method for politicians to use loaded language to dupe rubes into signing up for the Red Team or the Blue team instead of actually discussing the issues at hand.
That sounds like a really great project. Could you share what you have coded so far and what your particular sticking points are? — billinkc 8 secs ago
What a turd of a question.
@Zane keen insight, friend. it's like getting a degree in "general studies."
5:00 PM
@swasheck My starcraft name used to be General Studies or General Admission. My 15 year old self thought he was sooo clever.
OR... Generate XML instead using FOR XML and then cleverly re-edit it into HTML. — RBarryYoung 5 mins ago
hahahahahaha. i didnt mean to make you think i disagreed with you on that, i just wanted to know your thoughts. people hear "social justice" and most seem to think, "hey - that's a good thing because i want justice for the social"
without actually thinking through the logical conclusion(s).
@swasheck Yes it's quite annoying.
My age group will sign any fucking petition handed to them if it has the phrase Social Justice or Climate Change on it.
you're the james dean of your milieu
Or if you use the phrase be "part of the solution".
^^^ that's the @billinkc batsignal ... wait for it
5:05 PM
That's how you got into debt, wasn't it? "Here's a loan petition for Social Change for Climate Justice. Just sign here"
@billinkc "be the change. be part of the solution."
@billinkc I got into debt because CT scans and MRI's are very expensive. When you're 19 and your doctor thinks you have Cancer you don't really think "How am I going to pay for this?".
But that's not funny
Mine's funny
And this makes me cringe
Are you a #SQLServer guru like @billinkc? If so, checkout SQL server radio ft. @guy_glantser & @MatanYungman: http://ow.ly/BnPXe @sqlsat
@billinkc I think it's pretty funny.
@billinkc Have you been telling people "flattery will get you everywhere" again?
Makes me wince just to see it. I am not The Guru. It's not even in my twitter handle. I know some stuff. I know lots of people way smarter than me. And, I know the bingle. That's about it.
5:20 PM
How did this get an upvote?
A: Counting distincts in SQL

Marc BSELECT source, SUM(quoted = 1) AS quotes, SUM(solds = 1) AS solds FROM yourtable GROUP BY Source

@AaronBertrand ... and he's from canada.
@AaronBertrand how did you come across that answer?
@bluefeet he has a nose for crap
@bluefeet someone up-voted mine.
(Often if I don't remember a question I'll click through - often gives me blog fodder.)
@AaronBertrand it's valid in MySQL only.
But I don't see any edit in the Q (tags removed or what).
5:25 PM
@ypercube holy fricking wow. wtf.
I'm sure the answerer may have just assumed MySQL without even reading the tags, or maybe thought that it actually was valid syntax in SQL Server.
@swasheck Unless it was edited in the 5-min window. The answer is 2 mins after the question posted.
He also answered at 15:13, two minutes after the question was posted, so it's possible it was edited in grace period
oh. i see your point
Still, my comment was there 6 minutes later. It's been a year and a half and (a) I'm still the only person who down-voted (b) it hasn't been corrected and (c) someone up-voted. Though maybe (c) happened in the grace period too.
5:27 PM
yeah ... ~2700 MySQL answers so that's probably correct
Sorry @swasheck "sass" is giving lip, not sure about the rest of that sentence, never heard of a hoopy frood
it's not. apparently it's a hitchhiker's guide quote, apparently.
ah. been ages
thnx @swasheck. Sass, Hoopy, and Frood
5:39 PM
@swasheck That's on my reading list.
I've go about 30 pages of Slaughterhouse 5 left. Then Gatsby then the Hitchhiker's guide books. It's a part of my plan to read one book a week for an entire year.
tags is mean "@". i already delete it but it same error.. — user3695958 32 secs ago
@AaronBertrand i think i speak for most when i say, "WAT!?!?!"
Clearly a language barrier I have no interest in breaking
5:59 PM
@swasheck Good grief those people are bonkers.
Not it wasn't a serious issue but it's weird how much of a hard on they had for that story yet any of the controversy with Iraq. Nothing... Typical Red Team cheerleading.
I saw some clip of some lady they have on the weekend on that channel. Judge something or another. That lady scared the shit out of me.
6:37 PM
Q: My SQL is in Single User mode automatically

Saulo DavidMy sql server 2008 is going into Single User mode alone every Monday when he performs a backup just that there's nothing wrong with my back but still it comes in unique User

6:48 PM
Lazy security question - would someone with the default backup admin role in sql server be able to set the instance to single user mode?
@Zane Wait wait....you haven't read Hitchhiker's?
@billinkc Pretty sure no, would have to validate
That's what I was thinking but since I give not a single F on any day about security, I thought I'd doublecheck
There was a horrific account from ... I want to MN last year. Person had a big log tumbling around and decided to use their leg to kick it down further into the bin... This was one of those industrial grade ones and there was nothing left
The gruesomeness of that sequence of events is burned deeply into my brain for "things I don't want to see ever"
that is absolutely awful
makes me cringe to even think about it
@MikeFal You've already scolded me for this before.
@Zane Consider yourself scolded a second time
@MikeFal It's high on the list. I'm actually going to pick it up from half price this weekend.
7:35 PM
Sound like those Time Life book commercials. Did aliens really breed with Jesus to have pyramid babies? READ THE BOOK
Here's a much better script IMHO. For one it doesn't use INFORMATION_SCHEMA views, which are terrible. It also doesn't have GO illegally placed inside T-SQL (GO is not a T-SQL keyword) and it doesn't have bad, incorrectly-copied single quotes ( vs. '). — Aaron Bertrand ♦ 1 min ago
or listen to the tapes! That would be a good choice for your next road trip.
Basically, VtC -> Don't get your code from Pinal Dave
Ha, again I can't edit my comments.
@AaronBertrand Hahaha!
It really drives me crazy that his website is titled sql authority.
7:38 PM
@AaronBertrand Can I post that as a comment there?
It also drives me crazy that he uses that shitty picture of himself as a thumbnail!
@Zane We were actually talking about this at lunch. HHGTG is one of the few books I think everyone should read.
I know it shouldn't bug me but it really does.
I need to update my favico it seems
Huh, I use my cartoon image that is my avatar on SE as my favico
7:42 PM
@MikeFal It's my roommate's favorite book. Mine is Enders game although Slaughterhouse Five is taking a pretty good run at that title.
@ypercube sure!
I changed my comment to an answer.

« first day (1353 days earlier)