« first day (1022 days earlier)      last day (4144 days later) » 

12:26
Can someone tell me how this answer got a bounty of 50 from Community? It wasn't accepted, and heck, it doesn't even answer the question.
4
A: Can I delete database duplicates based on multiple columns?

cadsjoTry this one. I created a table tblA with three columns. CREATE TABLE tblA ( id int IDENTITY(1, 1), colA int, colB int, colC int ) And added some duplicate values. INSERT INTO tblA VALUES (1, 2, 3) INSERT INTO tblA VALUES (1, 2, 3) INSERT INTO tblA VALUES (4, 5, 6) INSERT INTO tblA VALUES (...

JNK
JNK
@AaronBertrand I'm thinking it maybe had more votes in Dec 2012 when it was awarded
@AaronBertrand I believe it was because your answer was posted before the bounty started
@AaronBertrand someone was giving their rep before retiring?
(their account being deleted afterwards)
13:13
@AaronBertrand Someone called leora started a 100 rep bounty on Nov 25 2012 and didn't select a winner so it was auto awarded (pre existing answers aren't eligible)
I Have posted an answer about joins. Hope it helps in understanding about joins. — Luv 6 hours ago
The amount of second hand rep that code project image generates!
197 upvotes here as well.
197
A: What's the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN

Pranay RanaReading this original article on The Code Project will help you a lot: Visual Representation of SQL Joins. Also check this post: SQL SERVER – Better Performance – LEFT JOIN or NOT IN?. Find original one at: Difference between JOIN and OUTER JOIN in MySQL.

@MartinSmith I would cast 200 downvotes if I had.
@MartinSmith Note: the question is a dupe.
@ypercube Well that and Jeff's similar article codinghorror.com/blog/2007/10/… always seem to be guaranteed crowd pleasers!
Yeah, answers (or questions or blogs) with pictures always get more applause than without.
Even if they are wrong.
@ypercube True. I can't get too holier than though as I milked that fact a bit here.
280
A: What is the significance of 1/1/1753 in SQL Server?

Martin SmithThe decision to use 1/1/1753 as the minimum date value for a datetime in SQL Server goes back to its Sybase origins. The significance of the date itself though can be attributed to this man. Philip Stanhope, 4th Earl of Chesterfield. Who steered the Calendar (New Style) Act 1750 through the B...

Without the random wikipedia picture I suspect it probably wouldn't have been so highly voted.
@ypercube Voted to close.
13:30
@MartinSmith Yes, nice example. My best answer at SO has 88 votes, I suspect at least half othem are due to the pictures (at answer and at question) that draw attention.
My highest voted answer is probably among my simplest:
279
A: Update a table using JOIN in SQL Server?

Aaron BertrandYou don't quite have SQL Server's proprietary UPDATE FROM syntax down. Also not sure why you needed to join on the CommonField and also filter on it afterward. Try this: UPDATE t1 SET t1.CalculatedColumn = t2.[Calculated Column] FROM dbo.Table1 AS t1 INNER JOIN dbo.Table2 AS t2 ON t1.Co...

@MartinSmith interesting, I wonder why they thought it needed more attention four months later? They don't move too quickly. They accepted my answer in March of this year.
@AaronBertrand My highest voted answer has 1/10th of those votes, but it's still ridiculously simple
21
A: How to edit data in result grid in SQL Server Management Studio

LamakYou can do something similar to what you want. Right click on a table and select "edit top 200 rows" (if you are on SQL Server 2008) or "open table" in SQL Server 2005. Once you get there, there is a button on the top that says "SQL"; when you click on it, it lets you write an SQL statement and y...

@AaronBertrand Top Google hit for "SQL server update table with join". So it has a lot of views. My highest voted SO answer is similarly simple but on a heavily searched phrase apparently (How to check if column exists in SQL Server table)
My highest voted comes from the top google hit for "sql server delete with join".
13:49
@bluefeet And that's only 5 months old as well. Looks like it will be one of those questions that accumulates a steady stream of views and upvotes.
@MartinSmith It has been getting that lately
@bluefeet Somewhat shocked your highest voted answer is devoid of any PIVOT actually!
@MartinSmith Unfortunately pivots don't get that much love.
sigh
Also
0
Q: DECLARE statement make variables to be global?

gotqnWhy DECLARE statement is making declared variables to be global? For example: SET NOCOUNT ON GO DECLARE @LoopCounter TINYINT = 3 WHILE @LoopCounter <> 0 BEGIN DECLARE @TempDataSource TABLE ([ID] TINYINT) SELECT [ID] FROM @TempDataSource INSERT IN...

14:05
I guess people like 3 table scans
4
A: Select values from multiple columns into single column

LS_devSELECT value FROM ( SELECT ID, 1 AS col, I1 AS [value] FROM t UNION ALL SELECT ID, 2, I2 FROM t UNION ALL SELECT ID, 3, I3 FROM t ) AS t WHERE value IS NOT NULL ORDER BY ID, col;

@AaronBertrand Doesn't seem a bug to me. Your sigh seems to indicate it isn't one to you either.
@AaronBertrand that's....wrong
was gonna say stupid, but, well....it is stupid too
@AndriyM The sigh is just that I can't believe how many people have such flawed ideas about how date/time works. Instead of reading the documentation they file a bug.
I suspect SE might be to blame, although I don't know if that particular person is using the network.
It is easy to get used to a good thing, and people may be getting used to asking instead of searching/reading
especially when there are efficient and easy to use services like the SE network
@bluefeet I don't. Voted and commented.
14:13
@AaronBertrand thanks!
@ypercube bluefeet's answer doesn't eliminate duplicates either
@AaronBertrand Yes, removed my comment. The OP does not mention what should be done in case of duplicates and his sample has none.
@MartinSmith nice tidy and concise example of the scope of declare:
The DECLARE isn't really executed at all as you seem to expect. Try SELECT * FROM tempdb.sys.columns WHERE name = 'gotqn';DECLARE @T TABLE(gotqn INT). You see the table variable is actually created already before the DECLARE is even encountered. — Martin Smith 52 secs ago
14:30
@AaronBertrand almost took a job at CH2MHILL ... glad i didnt
plus there are approximately 87 "workarounds" for poor Pankaj's problem
14:46
sucks to be him
No it does not, the table consists of two columns name and phone number for 'USERS'. — andi 22 secs ago
@bluefeet you mean relational tables aren't FIFO buffers? — swasheck 27 secs ago
gbn
gbn
@ypercube can be ;)
Pipelined tables can be fun in Oracle
Could %%physloc%% be used for that?
@gbn @Phil @AndriyM my point is ... if this guy has a design of "name" and "phone number" for his users table, what're the odds that he knows of other such voodoo?
14:54
@AndriyM Is there a %psycloc% ?
@swasheck They probably don't, and I wouldn't dare suggest that to them
@AndriyM i'm half tempted to work up a solution for him just to watch him shoot himself in the foot
If it is a heap and no other DML has been run against the table, it's possible that you could inspect the newest pages with DBCC PAGE to identify the most recent additions. But I don't know how much I would rely on that (or how likely it would be that it's a heap).
@ypercube I misread that at first and was confused by the question :)
In fact I'm not even going to suggest anything like that in a comment never mind an answer
15:00
@AaronBertrand I am impressed that after my training last week, I actually sorta understand what you said here.
notice my hesitation in saying that I actually understand it though :)
@bluefeet DBCC IND + DBCC PAGE = powerful dark arts
JNK
JNK
All that DBCC stuff is Paul Randal jibbajabba
Heh
"Big data is like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it..."
7
@swasheck yes it is. It is still restricted at work but I know what these things are now
JNK
JNK
@Phil ...but in the end size doesn't matter as much as you think it does.
15:02
@JNK big is relative. but still ... you can't make butter with a toothpick
JNK
JNK
@swasheck You can for very small values of butter
Also if you gave me a toothpick and a power drill I think I could make butter with it
Robin Williams back in the cocaine days
JNK
JNK
lol
I'm listening now
the best birth control is "hahahahahahahahaha"
I've only just noticed that the reply icon/button is hidden on removed messages, while the other two (flag and star) remain but are inactive. Curious discrimination.
15:11
@swasheck What have I walked in on?
@billinkc are you here?
15:26
i'm having a hard time understanding martin's comment here
You seriously recommend adding an identity column just in case they make this same mistake again in the future? — Martin Smith 19 mins ago
@swasheck It's because the answer for the problem is basically "if you make this same mistake again, then you should add an identity column to correct it", instead of "to avoid this mistake in the future......"
@Lamak ah. thanks
@swasheck well, that's how I read it anyway. I'm just assuming that's what @MartinSmith meant
I'm too lazy to type of my column names
0
Q: SELECT * query, excluding columns

San Jay FalconI have done allot of reading about this and it seems that isn't possible. The thing is, since the amount of columns is dynamic i cant explicitly mention them. I put in aliases but the 'id' column keeps on appearing. The CREATE doesnt work since there is 3 'id' columns in there, obiously. (This ...

maybe I'm missing it but I don't see any question there
15:43
0
A: SELECT * query, excluding columns

ZaneFirst you are doing a SELECT * Then adding columns as well. * is everything therefore you are getting mulitples of the same column. Those 3 ID's that you gave distinct names are being SELECTed again by the * in your query. Remove the * and type in the columns you need and you'll be fine. CREATE ...

I think that's his problem
Or what he's trying to get at anyway.
@Zane but it sounds like he doesn't want to type of the columns cause they are lazy
Well tough titties. Maybe he shouldn't have so many ID columns in his * statement.
lol
@Zane you rang?
Can you search SSIS by ID
ummm maybe? Whatcha doing?
Or what are you trying to do?
15:51
@billinkc searching SSIS by ID. I hope I was helpful
2
LeMuc, you take helpful to a whole new level
Trying to find the piece that's erroring out.
@Lamak Le' big mak you are funny!
VtC Zane "Unclear what you're asking"
@billinkc I've been reading too many SO questions it seems
15:58
The outpute column blah (2050) is truncating
However this isn't my package and I can't find where that is.
So I want to search for ID 2050 if that's possible]
So 2050 is the lineage ID
@blue yup Lazy
Lets just say, they arnt dynamic for now, there are just alot of them and when i say alot, i mean A-LOT! — San Jay Falcon 5 mins ago
@billinkc Mhmmm
You know what package failed, yeah?
I checked the sproc and there shouldn't be any truncation I think his problem is the fact that his columsn have 'Column Names' like that
Yeah.
Fuck meeting bbl.
16:12
@Zane yup as I suspected
A fuck meeting? How do I get one of those?
i think you have to move to austria
Maybe, not sure how liberal they are there. Sounds like something you'd find in Rio.
Or Vegas.
17:00
Probably my first flaggable comment :D
This might provide some consolationbillinkc 4 mins ago
@billinkc flagged!!
@MikeFal Just land a job in the over sexed world of home mortgages
Did anyone have the misfortune of watching my home team attempt to play football last night?
is that what that was?
Jared Allen did have the best sack I've ever seen in my life but other than that it was abismal.
@billinkc getting back to that issue. Getting this error "There was an error with output column "Document Name" (2696) on output "OLE DB Source Output" (2540). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.". "
However there is no truncation the column is hard coded as 19 characters.
17:19
@Zane sooooooooooooooooooooooooooooooooooooooooooo .... codepage?
ahhh this is my day
@bluefeet I hear you there. My truck is about to die I didn't sleep at all last night and I'm to gimpy to go get coffee.
17:43
"OS X Mavericks will be free"
YES
The hardware is barely more expensive ($2999) than the current models ($2799 I think). Which are barely better than the model I paid $2799 for in 2008.
And look closer at what you're getting. Two $650 video cards alone make up almost half the price.
@AaronBertrand sorry, didn't mean to offend. i was just joking. i'd say the same thing about some grand new thing by Lenovo or somesuch
For @Kin:
@swasheck I'm not offended, just making sure the truth is here too. :-)
@AaronBertrand the truth is out there
17:53
@AaronBertrand Are you going to get the new Mac Pro?
@bluefeet yes, I'm overdue for a new computer, and have been very patient.
I could probably keep using mine for quite some time, it's older than anyone else's computer in the entire office.
I have an early 2008 mac pro right now and I want to get the new one...so tempted. I love the new design of it
TBH i'd love to have a new MBP. i've always been impressed with how solid the design has been (physically and aesthetically) and they really do allow you the hardware to virtualize without many hiccups
is it just me or is this a bad answer?
-1
A: EF 6 System.Data.Objects.ObjectContext Error

RogerFYI, there's a Microsoft Connect item for this issue. Vote it up to help it get resolved quickly.

@bluefeet well if I get mine first I'll certainly tell you anything and everything about it. :-)
18:00
@AaronBertrand I'm sure you will get it first. My extra dollars are going to a home project right now.
@bluefeet I'm getting work to buy me one. :-)
Actually already okay'd it, to some degree - I may not get budget for the highest end model (in which case I'll subsidize)
@AaronBertrand oh that is nice
They look brilliant. I've been waiting for a while :)
some of these answers are interesting
0
Q: Concatinating in mssql 2008 and 2012

J. DavidsonI have this concating function that works fine in ms sql 2012 declare @reportN nvarchar(255) set @reportName= concat( year(getdate()), '-',33); select @reportN Which gives result 2013-33 I have ms sql 2008 which doesnt support 'concat' functions so when i try to do it fol...

iPad Air. Interesting
18:08
@AaronBertrand What sort of advantage will you have with two 650 dollar video cards?
@Zane me? None. Video editors, photographers, etc.? Tons.
Yeah I just meant you in general.
4k Monitors :D
@Zane I never said I need those or that they are necessary, but yeah if I upgrade my displays, they aren't going to hurt. :-)
I was more mentioning them because they are a fundamental part of the price, and you can't say "just give me one of those."
The mac pro has at least in my life always seem to be designed with the graphic designer in mind.
18:10
@Zane I think just about any intensive workload.
@Zane I'm the least artistic person in the known universe and I owned one
BSD operating system, lots of grunt. Eats VMs for breakfast. Oh, and you can run WoW :P
I think it's long been a myth that Apple computers are for graphic designers and artsies. That may have been true in the 90s but not since I've ever owned one.
@Phil I'm not saying that you shouldn't. It just seems based on their hardware specs that their target audience is graphic/video geeks.
I got a lot of stick for using a Powerbook/Macbook Pro for work many years ago. Now people are realizing that OS X is far from a toy pretty Operating System
That sort of hardware is going to handle anyones needs. Just seems designed for that core group of mac pro users still.
18:13
@Zane i think @AaronBertrand noted that it's any intensive workload. plus with all the stuff people are doing these days, you can offload processing to the GPU
@swasheck Yeah I was just wondering if he was a video geek. Since I know he's not a game guy.
@Zane I'm a big monitor geek. My current Mac Pro drives two 30" cinema displays. Hoping Apple puts out Retina Thunderbolt displays soon.
@Zane even still ... there are utilities out there that can offload workloads to the GPU ... and like @Phil mentioned ... BSD is a wicked OS underneath the UI
@AaronBertrand Well there you go on moniter per card :)
(didnt want "facade" to be taken the wrong way)
18:19
@AaronBertrand You going to boost the RAM?
@Zane yes I will fill it with 64. I've had 32 for 5+ years.
@AaronBertrand I'm trying to figure out how much to put into the SQL box I'm getting.
@AaronBertrand Yikes!
@Zane very simple: as much as they'll let you.
(Or as much as you can afford.)
The later is more of a concern.
All the new features in the world, and the fastest SSDs or PCIe flash storage you can get, memory is still king.
Kin
Kin
18:31
@AaronBertrand Thanks !
Any word on the Mini's new display has for resolution @AaronBertrand?
@Zane the new mini's resolution is 2048x1536 or whatever is identical to the large iPad resolution.
Yep, 2048x1536
Not bad for pulling that from memory :-)
Yikes!
My nexus 7 pulling 1900 by 1200 on an HD screen already seemed impossibly tight.
18:45
That size of device doesn't appeal to me. If it can't fit in my pocket, may as well make it big enough to be useful. The mini is that in-between size that just doesn't make any sense.
@AaronBertrand I'm in the opposite boat the Large Ipad has no appeal as it's too big. Or in my case the Nexus 10
@Zane too big for what? Taking pictures at the Eiffel Tower? Sure.
@AaronBertrand To feel comofortable in my hands when I'm using it.
@Zane at home, hotel room, or plane it's perfect for a lot of things. Like a laptop, not something to carry around in your hand while walking etc.
@Zane using it to do what?
No device is ever going to be the perfect size for everyone. shrug
@AaronBertrand browse reddit, read blogs, watch movies on a plane, play worms on a plane, or read digital books
18:52
For the things where you're reading / watching, is there any reason to hold it in your hands? Prop it up and put your hands somewhere else.
@AaronBertrand Definately that's why they've got the little ones or the 10 inchers.
@Zane the 10-inch is fine for my hands. The 8-inch is too big for my pocket. Holy crap this message is going to get starred for the wrong reasons.
11
@AaronBertrand lol.
19:10
Ugh this guy is calling the same sproc 3 times simultaneously. It's 3 queries in 1 sproc and it just changes which sproc part of the sproc it's using based on which parameter it's told to use.
Essentially you pass query 1 2 or 3
/Sigh
 
1 hour later…
20:24
Funny, the different quality of answers
0
Q: SQLSERVER TRACK DDL CREATE USER

Kristin Kasmarcak GeorgiI am trying to track user creation. I have looked at the DDL triggers in many posts but those seem only to track objects, not users. Is there a way for me to track/record when a user is created or deleted in SqlServer?

@AaronBertrand Oh, that's the user that was commenting for a bounty to be awarded (to him) the other day.
And he got it in the end:
0
A: How to Grant Permission to IMPERSONATE any other user?

Amirreza KeshavarzYou can use Dynamic sql . the code below fetches all users related to a specific role and then grant permission impersonate on a user. You should create a user on application login to relate it with database , then grant permission to impersonate on all members of specific role. This is the code:...

Many of his answers are 1-2 lines. That's probably the longest.
Hrmm....SE/SO seems to be choking right now
@MikeFal totally
I finally answer some lazy turds question and he doesn't even give me credit.
@MikeFal You aren't the only one that's for sure.
20:46
evidently healthcare.gov is NoSQL
and 500 million lines of code. WTF
@swasheck Oh that'll end well.
@MikeFal those who are able to get in are experiencing the joys of "eventually consistent"
not to mention the lack of that pesky "referential integrity" thing that makes RDBMS' so slow
that's ok ... i dont mind if my child is listed as my spouse ... i mean ... at least they got the family correct. that's all i can ask of you, right Mongo?
@AaronBertrand Really???
20:52
@swasheck Can't watch that at work:(
I know a healthcare exchange is pretty complicated but that seems absolutely nuts. That much code is bound to be littered with bugs and security exploits.
Your tax dollars at work
@AaronBertrand It's a government program so they are probably paid by the line.
My dad used to work for a company that tried to tie bonuses to whoever wrote the most lines of code.
until
he
started
writing
emails
like
this
21:00
Or more likely saddled with: you must pull from this tickertype machine to extract a person's eligibility for program A. This completely other system uses little endian notation and only accepts CICS requests and on and on. I think I heard it's something like 15 different entities that have to be interrogated per request
Everyone of those entities is likely protecting their kingdom from encroachment from the interloupers so yeah, I don't envy any of the contractors that signed up for that project
21:14
0
Q: How to use ExcelDocTypeUtils PL/SQL API

ChinmayCan anyone please suggest how to use ExcelDocTypeUtils PL/SQL API in a script. I have below code but it's showing ExcelDocTypeUtils.T_CONDITION is not declared. This is first time I am trying to use this to extract excel report. DECLARE v_condition_rec ExcelDocTypeUtils.T_CONDITION := NULL; BE...

Kill as too localised please (see my comment for justification)
21:57
back up NUL device ... what's the point? i just read that it could be to get your best possible backup rate? is that correct?
 
2 hours later…
23:39
@swasheck I used BACKUP LOG TO DISK = 'NUL' before for a client who had a broken log backup job, a transaction log about to fill a disk, insufficient space to hold log backups, and didn't want to change the recovery model because it would break db mirroring.
Followed by a database backup and a log backup to a normal file, of course.
@swasheck And testing with NUL is sometimes done to estimate maximum theoretical backup I/O throughput for a given system, as you said. I'm not sure if that's an ideal way to test or not.
@James yeah ... i'm just trying to figure out its use case
@swasheck Oh, OK. Yeah, the only two uses I can think of are the ones I listed
How was PASS, btw?
23:54
@James smashing.
if i'm honest ... i hit a bit of a lull near the end because i was exhausted (i've documented my personality here in the last week, or so) ... and it was almost like a depression/regret sort of thing. i wish i'd done things differently ... or i wish i'd invested less time in this and more time in that
@James i've only ever heard of it as a dump the log like they're ballasts sort of measure ... never actually used it, though
at any rate ... once i got through that nonsense (with PASS Summit) i realized how fortunate i was to have had such an excellent time
@swasheck Glad to hear it. I might have budget to go next year. Or at least someone on my new team probably will.
@James are you still looking to get out?

« first day (1022 days earlier)      last day (4144 days later) »