« first day (778 days earlier)      last day (4388 days later) » 
00:00 - 21:0021:00 - 23:00

00:01
@AaronBertrand how old are your tots? under 5?
@jcolebrand I have one girl, 5 months old
Grrrr, why did I think you had a multiple of tots?
later fellas, ladies.
Actually, we may be all gents here after all, atm.
see ya cole
00:23
Is really joining more than 8 (!?) tables not recommended in Postgres?
0
A: Is a query with over 50 joins slow?

Frank FarmerI've run into the practical default limit in postgresql, and it is 8 joins. Anything over 8 joins in postgres, and you're playing with fire. More specifically, join_collapse_limit defaults to 8. The planner refuses to reorder joins if the query excedes join_collapse_limit joins. I suspect pla...

There are similar heuristics in SQL Server
01:17
What's faster, A or B? Go test it!
You tell us! Which one is faster in your tests? — Aaron Bertrand 16 secs ago
01:32
fun question
2
Q: Saving a SQL query and retrieving data from last query result

rlitoI'm designing a database and a Java application to the following: 1. Allow user to query the database via an API. 2. Allow a user to save a query and identify the query via a 'query-id'. User can then pass-in 'query-id' on next call to API, which will execute the query associated with id but it w...

01:44
I wish there were more fun pivot questions like this
0
A: SQL how to loop/pivot between start and end date to display monthly cost

bluefeetYou can use the PIVOT function to get the result. The way I would recommend doing this would be to write a hard-coded version of this first, then convert it to dynamic sql. Note: I determined the cost per month by dividing the Actual Cost by the number of days per between the projectstart/pro...

Stupid question time - what's the recommended way to shift SQL server data/log files between drives? detach/re-attach, or backup/restore?
02:25
@SimonRigharts neither. ALTER DATABASE MODIFY FILE, SET OFFLINE, move file, SET ONLINE.
I really should do a blog post on that. Detach is "easiest" but most prone to disaster. Backup is easy but can take much time and can interfere with log chain.
Off to El Gaucho
03:07
man ... screw management
03:19
but runas is kinda klugey, right?
i mean, he shouldnt be logging in to the server as Administrator
@AaronBertrand Thanks for that. Got data on tempdb drives in my test environment at the moment, can't take it offline until COB
@swasheck Yeah it is kind of kludgy but it has the advantage of being generally applicable to things like start-up commands and the like. For example you could add it to the RUN keys in the registry if you wanted to.
I approach Windows administration like I do Linux administration.... :-P
I don't know if powershell might offer better solutions though since I don't have much experience with that.
i dont know why logging in as the postgres user and creating the service through pg_ctl register -N ...... isn't an option for this guy
yeah, that would probably be better.
@swasheck you shoudl add that as an answer
03:34
@ChrisTravers i'll let you add it. i tried dropping a subtle hint in my comment :)
done
I haven't tried running pg_ctl without the -U and -P flags so leaving those in.
03:53
@ChrisTravers i'd +1 again if i could
@billinkc hopefully all is well with you cnn.com/2013/02/19/us/missouri-gas-explosion/index.html
 
1 hour later…
05:18
@SimonRigharts Are you talking about moving tempdb files, or files for another database? Aaron's suggestion was aimed at user dbs.
05:32
@PaulWhite Oh sorry - I have data files for user dbs on a drive that's supposed to be for tempdb only
so I'm just moving the user databases data files
@SimonRigharts I see, ok thanks.
and I just realised I brought the database servers back up after patching and told the web guys that it was back up without actually moving said database files. I am so clever
06:21
@SimonRigharts Give yourself a raise :)
@PaulWhite What I need is a holiday. Or a beer.
It's possible to combine both.
@PaulWhite True. Problem is I don't have any leave left after my month off (which I only got back from a week and a half ago)
 
1 hour later…
07:30
@ypercube Isn't the involvement of the genetic optimizer can make things slow with many joins?
08:02
Any opinions on this?
I feel that with a properly tuned DB it would be easier to store only historical aggregates and query the current day from the base table (be it anything :) — dezso 11 mins ago
08:14
@dezso I'll reverse the question: isn't the involvement of the genetic optimizer enabled so things (e.g. finding a decent plan) are not too slow with many joins?
@ypercube well yes :) However, compared to simple joins it still can be really slow
@dezso This would be a good search area for a blog post I think.
09:06
@dezso in complete agreement
@ChrisTravers but now this is more or less the same you told the OP, I think
this way I won't post an other answer
I'm considering ruining yours :)
09:30
@dezso I suspect that part of his concern is not understanding select '2012-03-01'::date + generate_series(0, '2012-04-01'::date - '2012-03-01');
thinking a generate_series(date, date) would be a useful function
you mean generate_series('2013-01-01'::date, '2013-02-01', '1 day'::interval)::date
heh
I was missing the third arg
@dezso Depends on requirements, but storing aggregated historical data with the leading edge coming from transactional data (directly or through a low-latency feed) is the normal way to do low-latency reporting systems.
given that integer math is supported not sure why we need a third arg though
@ConcernedOfTunbridgeWells agreed, there are a number of unknown factors in the original problem, that's why I started with 'I feel' :)
09:38
@dezso Opening balances and journal entries are used to do this in accounts, for example.
@ConcernedOfTunbridgeWells Ick.... I'd never do it that way.
too many failure cases
I think for opening balances and journal entries it's far cleaner to do closing balances and roll forward to live transactions from there.
(keep in mind that larger companies usually close a lot of things monthly so your high volume accounts will involve no more than 1 month of live data to move)
(I mean to aggregate)
@ChrisTravers Depends on how the system does opening balances. Oracle Financials calculates an opening balance for the next month on closing IIRC. However, from the docs a lot of the closing is initiated manually, so this process may vary with the site.
F/X rates in OF were fun.
@ConcernedOfTunbridgeWells You may be calling an "opening balance" what I am calling a "closing balance" for example, but still that's a roll forward point, right? You aren't storing live summary info regarding checking account balances or the like, right?
No. The record is generated on closing. The balances table does have some fields that OF updates with the journals, though. I have no idea how reliable they are for 'current' balances. We didn't use them - the current balance was calculated from the opening position + journal entries at the appropriate rate for the account (P/L accounts at a spot rate, BS accounts at an average monthly rate. certain capital accounts at odd synthetic rates).
Ok, sounds like we are on the same page then. Maybe I was just misunderstanding :-)
09:45
The closing process is still initiated manually, though. Accountants still feel they have to control that process themselves - I guess it comes from trial balances.
@ChrisTravers Could just be terminology.
There is an adjustment between the CB and OB on balance sheet accounts due to F/X changes, though. CB and OB in settlement currency are the same.
@ConcernedOfTunbridgeWells There are a couple reasons for manually doing closing. It provides an opportunity for review, and for everyone to sign off on financial info.
It also allows for control as to when a given accounting period is closed and no more transactions are allowed in that period.
@ConcernedOfTunbridgeWells and I also think that there is a certain limit (in row number for example) from which upwards precalculated aggregates are the clear winner
It may depend on how big the overhead is in inserts, too
But in that Q we still don't know any of these
10:02
@ChrisTravers I was more being facetious about the accounting profession's insistence on manual processes for things that can be calculated by a stored procedure.
'We couldn't possibly automate that. It's far too complicated.'
COTW: 'So, tell me how you calculate earned premium then'
I have plenty of customers who are accountants and in fact I automate tons of things with stored procs ;-)
Beaney: 'Oh, we use the 365ths rule.'
The key thing is making sure they get an opportunity to see, review, and approve before it hits the books.
(Which is a purely algorithmic calculation)
@ConcernedOfTunbridgeWells Here's what I tell them: "Treat the computer as a bookkeeper in need of supervision. Let me automate things in a way that you can supervise."
10:06
@ChrisTravers I know. It's a source of endless amusement when I do accounts related stuff. The accounts people here are used to being able to blind the business with science and run their own little empires. They pretty much assume that IT people are too dumb to understand accounting. It's a cultural thing.
@ConcernedOfTunbridgeWells you know what's scary? Most IT people don't understand accounting and avoid it like the plague hahaha.
One of my largest customers does financial services
ont he internet
they have an IT department of probably 30 people and an accounting departmnet of maybe 10
Of their IT folks there is one who understands accounting well enough to have an intelligible conversation with the accounting folks.
well, maybe 2 if you include the CTO.
Consequently there is only one person who can touch the accountign system besides me (the external consultant)
It's scary :-P
@ConcernedOfTunbridgeWells And what's scarier about it is that to me (and I assume you too) these fields seem really close together.
@ChrisTravers Yes. There's a lot of overlap, particularly in the MIS area. From time to time I even get accounts departments viewing a data warehouse as a threat.
The problem is that SQL Server was running under a NT SERVICE sub-account.
@ConcernedOfTunbridgeWells hmmmm. What is the concern that they have re: data warehousing?
just that they want control over the numbers?
Does them out of a job or reduces their gatekeeper status on the data.
Data warehousing tends to be quite political. A lot of people view control of certain data or insight into how it's calculated as job security or prestige. There is very much an 'I report this to so and so' mentality. They want to be seen to be producing something.
Same old, same old. Kimball coined the term 'gatekeeper' to describe these people and it's a real operational problem in implementing data warehouse systems.
Accountants definitely want the ability to send 'adjusted' figures out. For a data warehouse I need to be able to separate the manual adjustments out and show them in reconciliation reports. They definitely don't like having their dirty little secrets exposed.
It depends on the accounts people. Some like the idea of automated reporting systems to get BAU work off their plate. Some view it as a threat. I had one systems accountant say he wanted to 'feeeeel' the data before he released it.
Having said that, there are plenty of applications for having the manual adjustments available in the data warehouse. It allows corrections of things that can't be corrected at source (e.g. mistakes in financials advised over EDI systems that you need to get a broker to sort out at their end).
10:25
@ConcernedOfTunbridgeWells As far as financial figures, accounting should be the gatekeepers of the data, IMO. The question becomes what role a data warehouse plays in supporting the work of everyone, and such. The challenge might be to either help ensure that accountants can be gatekeepers for their domain or how data warehouse systems can support (and supplement) their domains separately.
One thing that gets drilled into anyone's mind studying accounting is this idea of careful division of oversight.
(Because this is something that prevents things like embezzlement, or human error running amok)
How my customer does things is they have live credit card transactions entering in web servers (unfortunately running MySQL). These get pulled in nightly to the accounting system using PostgreSQL, and digested into financial transactions. These transactions are then reviewed and posted to the books (or backed out and support requests filed) by accounting staff.... Then the final numbers are digested into reports that go into other reporting systems beyond accounting's control.
(those systems include customer-facing reporting systems)
@ChrisTravers There's a whole dissertation in the nuances of interactions between accounts and operational systems.
@ConcernedOfTunbridgeWells Totally agreed.
My issues tend to arise from accountants not being particularly keen on applying transparency to their own processes.
@ConcernedOfTunbridgeWells that;s not even good accounting
Accounting needs to be transparent
@ChrisTravers I never said they were necessarily good accountants.
10:30
@ConcernedOfTunbridgeWells Where accountants are not transparent, my general rule is to wonder what they are hiding.
Not dishonest or anything, but they were quite politicised and defensive about their own little empires.
@ChrisTravers I'd suggest the same thing, but I don't normally have authority to audit that sort of thing.
Usually it's not fraud, just sloppy manual processes that they'd rather not expose to the light of day.
@ConcernedOfTunbridgeWells Very true. And then there are processes that nobody understands how they work and attempts to be transparent reveal fun surprises. :-P
The UK has a terrible 'don't rock the boat' culture.
@ConcernedOfTunbridgeWells I once did a fixed asset depreciation system for a customer and they wrote back saying it was generating the wrong numbers, compared to their existing system.
@ChrisTravers There is that too - and IT departments are just as bad. I have this working theory that incompetence goes up to about the 90th percentile of the IT industry.
10:33
Turns out their existing system was using different rules than I was given :-P
@ChrisTravers It's deja vu all over again :-}
I was told "straight line, per day, over a year" and their current process was "straight line, per month, over a year"
@ConcernedOfTunbridgeWells you should see the open source project we forked LedgerSMB from.
@ChrisTravers Which reminds me, I owe you a white paper on a reporting system.
Working with code we haven't replaced in the few years since we forked I still find bizarre and unpleasant suprises
Watch this space. I've got a little less work pressure now.
10:36
(and the db design when we forked was.... well theres nothing I can say that isn't too charitable)
@ChrisTravers The only true software metric: 'WTFs per minute'
3
How about WTF persistence? How many new WTF's you can find on a codebase you have worked with for 7 years ;-)
The early ones we got rid of (including using float's for money) were just the tip of the iceberg.
@ChrisTravers You could do that - graph WTF density over time.
I went through the list of antipatterns on Wikipedia, and the source before we forked hit 75% of them.
You could do a lambda metric for exponential decay of WTFs over time. The steeper the better.
Half life of the WTFs.
10:39
I am guessing the old codebase (which we are still replacing) is largely flat in that regard.
at least at this point
@ChrisTravers Had I been drinking coffee I'd have sprayed it over my screen ;}
Large parts of the old codebase I still can't test because it relies on sloppy scoping.
What's it written in?
I added test cases to the GL reports and it took me 8 hours to get them working (even though manual runs passed) due to scoping issues.
It's written in Perl
Really, really, really bad perl.
So bad in fact that there are lines like:
GL->post_transaction(\%$form, \%myconfig);
would it help if I explain \%$form?
Does it involve user interface elements?
10:43
well, the syntax here says: "Pass by reference to dereferenced reference"
Hold on. phone call
anyway off for dinner, but the basic point is it is a sign of someone really programming outside his (in this case) depth. In other words trying all kinds of kludges before settling on something with the explanation of "FINALLY IT WORKS!"
Nothing new there then. Enjoy your dinner.
11:19
@AaronBertrand This feels more like an attempt to attack Android so they can try and slip Windows 8 into the smartphone space.
 
1 hour later…
12:27
0
Q: How to apply patches in MySQL in any version

ashuthoshHow to apply patches in MySQL 5.1.67 or any version. because we need to fix so many bugs in our version without any upgrading. please suggest me .

and another cryptic one:
0
Q: Mysql: disable unused schemas

mserioliI have many schemas on mysql instance running on my development pc. I've noticed that mysql is taking a large amount of ram and cpu time. Is there a way to "disable" schemas of project I'm not working for? I like to avoid to drop schema and then re-import when I need it. I'm searching to a way ...

 
2 hours later…
14:14
@swasheck I'm alive and unaffected by the explosion
@billinkc good to hear that
kansascity.com/2013/02/19/4075290/… That area is about 70 blocks from my home. But a very popular place to be and be seen
14:29
Take note folks, if you ever need to setup SSL for SQL Report Server, verify the stinking certificate before configuring SSRS or deal with this: dba.stackexchange.com/questions/34760/…
Ick. Sorry that consumed a week of your life
As part of the development team's desire to get out of doing production support, we've gone through all of the SQL Agent jobs and provided friendly instructions to help people gauge "is this important", when does it need to be fixed, etc
"Job failures will have a direct impact on our websites. Contact on-call teams if you need assistance!
This issue needs to be resolved by 7:00AM.

If this issue is not resolved please alert the Marketing Team"
Soooo uhh that failed last night at 5:30 and no one did squat until this morning at 750 after our business users, and potentially the public, had been noticing
Boggles the mind. I can't see how you can make the criticality of that situation more apparent
14:47
Send an alert to a group and all you get is a group of people assuming one of the other guys will do something :)
4
@MarkStorey-Smith This^^^^^^
Always have a specific person responsible for at least the triage of issues.
Just don't make them do a development workstream as well, as that will never actually get done.
@MarkStorey-Smith On a completely unrelated note, should we keep prodding @Phil to go do some serious job hunting?
Thing is, we have a dedicated on call pager. They just didn't do shite last night
@billinkc Maybe a spot of percussive stakeholder management is in order?
I gave notice yesterday so my "give a damn" is sitting firmly on E ;)
@billinkc Fair enough.
My go to resource when people bother me with irrelevancies.
15:12
anyone else want to throw some close votes to this one?
-3
Q: how pivot the below table

user2090977MGRP SRNO LOC AdmitDtm shift1 shift2 Mode of Arrival 5 Ambulance 2013-01-02 0 1 Mode of Arrival 5 Ambulance 2013-01-02 1 0 Mode of Arrival ...

gbn
gbn
15:32
wow.
-1
A: SQL Bitwise in SmallInt

Data MasseurThe ideal solution would be to use 32 separate TinyInt fields. TinyInt supports values 0-255. If you try to use a single field and do bit processing you lose the ability to index any of these flags just as you would if you used Bit type fields.

@gbn took the appropriate steps
gbn
gbn
@dezso thanks
15:53
how can people post something like this and not recognize the inherent irony/hypocrisy?
16:10
This guy is real helpful... explaining to Aaron how temporary tables work.
Dynamic SQL needs the ## in order to communicate with the outside. — JohnZ 6 mins ago
HOLD ON. i makin' mah popcorn
@MikeFal brocked. you need a jr. dba, btw?
IT's the lol wut pear.
Nope, sorry
Need a Sr. DBA?
A friend got cut in a re-org yesterda
16:28
@MikeFal bummer.
@MikeFal we might. but you don't want this boss.
@swasheck Heh. I'm not the one looking. :) But I hear what you're saying.
17:01
1
Q: SQL Server 2005 database corruption. Advise

PanosPlatI have encounter some database corruptions in the past but I knew which object has hit the road. In this situation I run a DBCC CHECKDB against a problematic SQL Server 2005 database and I get the following errors Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, pa...

lol
"The database is in Simple Recovery mode (unfortunately) and I have a month old backup.

I must have it up an running because it contains vital data."
Double "ha ha".
JNK
JNK
You need a Delorean and enough road to get up to 88 mph
2
@JNK Awesome.
17:09
@billinkc Great minds!
Hat tip to you sir
The audio rip of that was error message on far too many computers
Maybe we should give him Paul Randall's number. Paul can laugh at him too, then charge him ridiculous amounts of money to fix it with a hex editor.
Month old back-up!
Maybe the data only changes once a month. It's a snapshot reporting database. Oh who am I kidding
Better thought: We should append links to resume writing services.
17:13
"Why did you leave your last job?" Ummm, I accidentally all the data
@billinkc There has to be a better way to frame that... how about "My aggressive space optimizations were undervalued by upper management"
If I ever win the lottery, I'm going to become a nomad and wander Spain and France eating nothing but cheese, bread and drinking wine
@MichaelFredrickson Obviously not vital, otherwise you would have backups. Next.
Have I told you the story about a friend of a friend who insisted on storing backups on another location (and was either ignored or scolded)?
Oh joy one of the sites I have to import into datawarehouse tonight has had the primary keys striped off on the client site.
How did the previous DBA even manage to do that without blowing up replication.
JNK
JNK
17:26
Hopefully someone else can give you some magical answer, but I STRONGLY suspect the resolution will be to restore the month old backup and deal with the data loss. If it was vital data then it's unlikely a competent DBA allowed it to be in simple recovery with a month between backups, so there may be resume-updating as well. — JNK 10 secs ago
@ypercube They had a facilities issue?
@JNK Savage burn
JNK
JNK
@MikeFal wasn't going for a burn but for a reality check
@JNK Yes, but you burn them with truth.
JNK
JNK
well that may happen
No, they were lucky not to lose anything. The funny part was they were located in a 40-storey building (one of the few in Athens).
The real fun was the day after 9/11, when no-one dared to speak to him. I think they rented a place a few weeks later for the backups.
JNK
JNK
17:33
@ypercube I think sometimes people don't want to think about disaster recovery because it's unpleasant and kind of grim
if you are in business long enough something bad WILL happen to a physical structure or system
it may not be a building collapse but you will have a water leak or the person in the floor above you will leave something running over the weekend and flood your server room or the AC will kick off or there will be a fire that sets off sprinklers or something
@billinkc i need that audio rip, sir
pretty sure Peschka just lost his mind
DB2 4 LYFE!
Not sure I have it any more. Well, I'm sure I have it as I'm a pack rat but do I have a box with ... IDE hd connectors and which of the umpteen hard drives sitting in my rat hole would have it...
I would choose DB2 everyday and twice on Sunday compared to MySQL
3
also, i'm pretty sure Paul Randal has his hands full right now.
@PaulRandal it's a Microstrategy query using lots of intermediate temp tables. User running large unfiltered report. #sqlhelp
@billinkc true story. informix is my hell
@swasheck Worked with Informix at the last job. Only saving grace was one of our DBAs used to work for them so he knew how to wrangle it
My mischievous self sometimes wishes that you could star just a portion of someone's chat messages... so you could take things wildly out of context.... "The real fun was the day after 9/11"
17:47
@MichaelFredrickson well that would be awkward
@billinkc it is ... well ... it is a sore misfortune for anyone to have to use that thing
YAY! My first twitter reply to #sqlhelp
holy duplicate answers
1
Q: Counting records issue

neojakeyThis probably is a simple one but I cant get my head around it. I have a table of MemberBusinessCats which contains a BusinessCatID and a MemberID.. the table could be presented like this: +-----------------------+-----------------+------------+ | MemberBusinessCatID | BusinessCatID | Memb...

@billinkc just out of curiosity what's your beef with mysql?
I'm not a huge fan myself just curious.
@Zane standards. like it has none.
@bluefeet i believe you mean "unholy"
@bluefeet Very odd that almost everyone also said "Try This"
@MichaelFredrickson 'cept @bluefeet. she's a true pro!
17:53
@MichaelFredrickson I think the try this is the way to get away with a code only answer
@Zane I hate MySQL's for their stupid, kind of compliant query syntax
I can run a similar query across SQL Server, DB2, Oracle no problem. MySQL not so much. What error do I receive? "Something's wrong with the query, LOL"
@billinkc and the fact that you can turn standards mode on or off per session. What the WHAAAAAT?
i like this one ... select bob, count(bob) from name group by mary
@bluefeet Reminds me of "Check this out", and then a link only answer... stackoverflow.com/search?q=%22check+this+out%22
njk
njk
@bluefeet You didn't let the OP try anything. That's mean
I don't even want to know that.
17:56
@billinkc know what?
@MichaelFredrickson i hate those answers
Standards mode on/off. It leads to shite like VB On Error Resume Next
@billinkc yeah. it's pretty funny.
JNK
JNK
any SQL Server folks know about cross DB ownership chaining/
@JNK evidently not
JNK
JNK
18:02
lol does it?
@swasheck no worries
trying to work on some permissions stuff and am a bit confuzzled
@JNK are you asking about the option in SQL 2012?
JNK
JNK
it's in 2008 and 2005 too
but yes
@MichaelFredrickson hahahahahaha
JNK
JNK
18:28
We need to come up with a new name for Paul White AKA SQL Kiwi
in light of his apparent obsession with the Halloween Problem
@JNK what halloween problem?...no, wait, what obsession?
JNK
JNK
@Lamak have you heard of the halloween problem?
it's only called that because they found it around halloween
@JNK oh, that, yes I have. I thought that this was a humorous comment
JNK
JNK
Well he is writing a series on SQLPerformance about it
like 4 blog posts
I'm worried about him
@JNK will read them
@JNK so, wich name do you have in mind?, SQL Krueger?
JNK
JNK
18:42
That's a good one
Paul O'Lantern
I'm going to pretend I never read Part 1 of that series and go on about my life
@JNK not enough SQL in it
JNK
JNK
@billinkc Why is that?
@JNK Too much for my brain to think/worry about
JNK
JNK
And then I told Aaron "shut up stupid"
3
oh hi Aaron
How was Seattle?
18:50
@zane anything come from dumping the full event log for your ssis packages?
Haven't done it yet
We deployed new database/web application on Monday so I've been working nights and supporting that...
And tonight I'm adding 85 client sites into the datawarehouse which is another overnight operation.
That's what, 85 rows? Piece of pie
@JNK ha, still in Seattle
JNK
JNK
@AaronBertrand Was just messing around since I saw you drop in
Bring the Heap a keychain!
No, bring us a smoked salmon and pastries from La Monde
19:09
@billinkc I sent my friends in BC a Mac & Cheese kit from Beecher's
and herbs de provence from Penzey's
" is it bad practice to set MAXDOP to 0 for a OLTP database? I do see a performance hit when I use MAXDOP 1."
@AaronBertrand Huh, they have one of those not far from where I'm working. I think I remember peeking in the window but never stopped in
JNK
JNK
Penzeys is marvelous
if you need some specific or random herbs or seasonings they are great
we ordered from their catalog for a long time but there is a store near where I work now
Greatest place to get peppercorns
I hang my head in shameful ignorance
@billinkc speaking from experience, you get used to it
19:21
How did this answer have an up-vote within 3 seconds of posting?
0
A: Error converting 2 varchar attributes to datetime

Aaron BertrandDECLARE @x TABLE (CREATEDATE VARCHAR(32), CREATETIME VARCHAR(32)); INSERT @x VALUES ('20120101','142304'), ('20120101','44427'); SELECT CONVERT(DATETIME, CREATEDATE + ' ' + STUFF(STUFF(RIGHT('00' + CREATETIME, 6), 5, 0, ':'), 3, 0, ':')) FROM @x; So in your case, UPDATE dbo.UsersTemp S...

Sorry, not my answer, the one by xBert
It's called your answer is too long and people don't like to read
@bluefeet @AaronBertrand teh codez is more important than any other warnings
@bluefeet I mean that a "1 new answer" banner appeared, and by the time I was able to click it, there was already an up-vote. That doesn't make sense to me. Nobody could have read the answer that fast.
@AaronBertrand Yesterday I clicked "Post your answer" and it was upvoted 1 second later. I mean the page was returned with almost instant upvote.
I understand that it happens, I just don't understand how it happens
19:27
@ypercube i have a greasemonkey script that autoupdates all my friends
(kidding, don't ban me)
JNK
JNK
@swasheck Don't get your "friends" and Aaron's "favorites" mixed up
Aptem would be unstoppable
@JNK i'm not smart/famous enough to use that extension the way @AaronBertrand does.
i use it for people i like :)
JNK
JNK
@AaronBertrand It could have just been server side caching of the "live" updates
there is a severe lack of pivot questions today
JNK
JNK
An answer was posted, then like 30 seconds later it was voted on, then both actions were distributed at the same time
19:30
is log shipping a superior/preferred technology to replication?
@JNK I was talking about 1 second later, not 30.
JNK
JNK
@ypercube Yeah no answer for that scenario
but for @AaronBertrand 's it's possible it was just because the data was sent to him together
New comment on very old answer. I understand what he's saying but not sure why it's relevant:
I'm down voting because context_info is not persisted over connections, whereas transactions are. — The Mouth of a Cow 2 hours ago
and it was my answer, so no caching, unless others can see my draft before i hit the "Post" button.
@CadeRoux you should go here and say "I'm down-voting because your code sample is presented with vertical scrollbars."
0
A: Can different contexts create the same object?

The Mouth of a CowTo ensure that entities created by different DbContexts are be the same it is necessary that they share a common ObjectContext which can be passed in through the DbContext constructor. The way to create a common ObjectContext using the Code First approach is via a DbModelBuilder - the recommende...

19:36
Or you can just downvote them because they have a mouth of a cow.
Personally I object to the interspecies marriage of AnimalContext and FruitContext.
Race mixers!
Kiss your momma with that mouth?
I'm exporting from SQL Server to Excel, but Export Wizard is erroneously reading my nvarchar source column data types (i.imgur.com/ymxtnKc.png). They should not be 202, whatever that means. I'm not sure why the Export Wizard would be incorrectly reading the columns' data types considering that they're coming straight from SQL Server..
@Zach is that a question?
19:51
Yeah, I'm confused as to why 202 would appear as the source type. Checking if anyone has any guesses.
@Zach assuming your DDL doesnt declare at 202 which is why you're wondering. perhaps export does a scan of a representative population of the data and that's the longest it found? i dunno. @billinkc may know better
@swasheck Yeah I'm not sure. The length idea doesn't make sense because those columns have nvarchar limits far below 202.
@Zach Looks like a known problem with the wizard and queries (as opposed to tables). Not sure if a fix is around or not.
not on-topic but here is one reason to skip living in AZ -- azcentral.com/community/mesa/articles/…
@CadeRoux Thanks a lot for the resources. That's saddening though :(
19:59
@bluefeet when has "on-topic" been a requirement here?
@swasheck true, I just felt like sharing the joy of AZ
@bluefeet Is that just a regular black rat?
@CadeRoux no they are almost like mice and they travel on the telephone lines to the houses or jump from tree to tree to eat the fruit
They are called roof rats because if you don't fully seal your attic, then will get in through any little hole and live in the attic
We got them in AZ by people moving from California. They did not realize that the rats were in the moving boxes and they packed them up.
@Zach The Import/Export wizard is great when it works. Otherwise, crack open VS. And Excel is a wonderful data exploration tool but as a data transport system I hate it with the fury of a thousand suns.
The person who decided to make Excel a source and destination instead of CSV, well there's a special level of hell reserved for them. One that Dante wrote about
@bluefeet I see scottsdaleaz.gov/Page2166.aspx They don't seem to be a big citrus eater here in Louisiana, but I think we have mainly Norway rats - they definitely DO love MREs or NATO Field Rations. Whatever we have in the roof does climb the lines, though. They come in during the cold weather. I probably need to put poison out again.
20:10
@CadeRoux Put a colony of fire ants out
@billinkc I need to pit the mockingbirds against the rats against the fire ants and then my figs, basement and attic will be safe.
@CadeRoux i read that Louisiana was ranked as one of the most unhappy places in the US based on Tweets because of their love for profanity. perhaps that's the reason?
@CadeRoux we had to seal every little opening with steel wool and then cover it with chicken wire to prevent them in the house. Then outside we have traps with peanut butter
@CadeRoux But the mocking birds excrete the fig seeds and you get new trees. Circle of life man
@billinkc There was a product which let you share data sets and analyze them - it had a free viewer but the main product was pretty slick. Would be nice if there was a standard. CSV is too vague - lots of tools have problems with it and it doesn't have any metadata. Excel at least has SOME metadata and formatting, but it's a tool of Satan, of course.
@swasheck That's fucking bullshit
20:14
@CadeRoux so i heard
@swasheck 3.2.1...mods
@CadeRoux i didnt flagit
@CadeRoux Agreed. Once I read the source code for the python CSV module. I've been afraid to sleep ever since
@swasheck let's hope they see the humor when they get here.
@billinkc I think this is what I was thinking of: yohz.com/products_sqldatasets_overview.htm
@swasheck I think that study was flawed because it's simply based on use of language on twitter. There have been other studies about happiness and we come out tops. nytimes.com/2009/12/22/nyregion/22nyc.html?_r=0
@CadeRoux methodology matters
20:23
@swasheck I really don't understand the point of those studies. Are they expecting to improve the happiness in the unhappy areas through some kind of changes or investment? Or let people know to just move away from unhappy areas because they are susceptible to natural unhappiness disasters? We'd be better off spending money on more volcano warning systems.
(That's a joke about Bobby Jindal.)
Because there definitely is some "scientific" research which is a waste of money.
@CadeRoux the purpose is to get and spend grant money on a useless project that uses fancy visualizations (d3) which the member(s) parlay into a job somewhere else
@CadeRoux apologies. it's lost on me
@swasheck A couple years ago, PBJ mocked funding a volcano monitoring project at the USGS, then there was a volcanic eruption like two weeks later: indecisionforever.com/blog/2012/08/27/…
haha
20:43
ARG! I didn't go to the pass meeting.
00:00 - 21:0021:00 - 23:00

« first day (778 days earlier)      last day (4388 days later) »