« first day (379 days earlier)      last day (4488 days later) » 

12:00 AM
I wouldn't be surprised to see the application's still running on its original Sun E4500.
Although that would be getting on for 10 years old now.
Still, you have the option of being very condescending to them the next time you have to deal with them.
"The database is not your personal persistent object store. Other people actually have to use the data in it, and - believe it or not - they're more important than you."
Is something I had to say to a developer once.
In fact, I really want a facility to head butt people through the internet.
 
12:21 AM
The juror search must be filtering correctly since it hasn't called me up once yet :v
(10 years of eligibility)
 
12:51 AM
@SimonRigharts I think your chances of getting called up are fairly low, and IIRC the criteria are something like: must have no indictable convictions that carry a prison sentence and (IIRC) not related to someone who matches the above criteria. Can't remember the exact details - I just did the data model, someone else developed it.
 
I could do some napkin math to figure out an approximate chance, but :effort:
wild-ass guess would be 1% per year
Here's something random - in sybase, the name of stored procs is stored in sysobjects. the text of stored procs is stored in syscomments in 256-byte chunks. If I wanted to check that the definition of the stored procs was the same what would be the easiest way?
... oh wait it's obvious now that I think about it, can just do a chunk-by-chunk comparison
 
 
1 hour later…
2:05 AM
why... this post makes me so sad stackoverflow.com/questions/8904122/…
 
Oh god. :barf:
it's like people think they can handle date/time data better than an built-in type that's had a lot of time spent on it by a lot of smart people
 
 
1 hour later…
3:24 AM
1
Q: How to SQL JOIN with table which is sometimes empty

Richard DesLondeI have a table (Tran) with transaction records. I have two tables (Parameters1 and Parameters2) which are used to filter results when selecting from the Tran table a la: SELECT * FROM Tran t JOIN Parameters1 p1 ON T.code1 = p.code1 Parameters2 p2 ON T.code2 = p.code2 WH...

for here?
 
 
4 hours later…
gbn
7:36 AM
@ConcernedOfTunbridgeWells IIRC The "old" style is ANSI 89. The "new" is ANSI 92
I prefer implicit and explicit: stackoverflow.com/a/5654338/27535
 
 
1 hour later…
8:57 AM
@gbn Anything but 'Old Style' and 'New Style', I think.
Besides this sort of argument tends to take place in environments where intellectual rigour is no noted for its prevalence.
Gods, I've been consulting for too long, haven't I?
 
 
5 hours later…
gbn
2:12 PM
Anyone want to assist me in killing this? stackoverflow.com/a/8911444/27535
Suggestion is about using sp_OA to invoke CDO. In a 2009 article!
 
I'm not looking for an answer for this in chat, because I think it would make a good question on the main site, but I'm not quite sure how to ask it properly:
I need PIVOT-like behavior from Oracle 10g. I've got a table like
OBJECT_NAME ATTRIBUTE_NAME ATTRIBUTE_VALUE
'object 1' 'color' 'red'
'object 1' 'size' 'big'
'object 2' 'color' 'blue'

And I'd like to make a query that returns this:
OBJECT_NAME COLOR SIZE
'object 1' 'red' 'big'
'object 2' 'blue'
well my formatting failed but you get the idea
basically I want to de-normalize the table a bit for a report
it's oracle 10g. I believe 11g literally has a PIVOT keyword that does exactly this, but there must be a way to achieve this pre-11g?
 
gbn
fixed columns or dynamic columns?
if fixed, you can self join per column
 
dynamic, preferably. If that's not possible static is acceptable.
 
gbn
Dynamic is best done in the client code then
 
in fact, lets say it's got to be dynamic, because if it's static I can already figure that out myself
 
gbn
2:27 PM
static can be done in slef joins
 
ahh, alright
 
gbn
SQL doesn't do dynamic columns. In SQL Server you can build a string up using metadata, and execute that
 
does it help at all if the list of possible values for ATTRIBUTE_NAME is stored in another table?
 
gbn
Dunno if Oracle has the same
@ColinK See line above
 
yeah I saw it after I hit enter on my last line :)
 
gbn
2:29 PM
A consequence of using an EAV
Evil Anti-pattern Vortex
 
What's that?
 
gbn
I would link to Wikipedia but they threw teddy out of the pram today
 
lol, funniest way I've heard that described so far today.
Oh! I understand what you mean about EAV, and as I described my table it would indeed suffer from that problem. There is an important difference between the example table I made up for that question and my actual table
 
@NickChammas I would quote you wikipedia but ... ;-)
 
In my real table, I actually am following the "each type of attribute in a separate column"
for example, it would in fact make sense to sum over columns in my table
 
2:37 PM
so you've bastardized a bastard concept?
 
Have I? I didn't mean to :)
based on what @gbn was just saying, that sounds like a good thing, right? Now I'm confused
 
lol, I'm in on the tail end of something
listen to GBN over me, I assure you
I just wanted to make a funny
 
:)
I'm no database pro, so I've got no clue. I'm picking this stuff up as I go.
Trust me, where I work, just realizing that a database isn't a big Excel spreadsheet puts me way beyond everybody else
 
gbn
@ColinK EAV and OTLT are 2 "great" ideas then folk stumble upon.
Your example looks like an EAV
However, if you have a real table with real columns then you may have a valid question. The key is good sample data.
 
The example I gave absolutely was EAV
Lemme try to come up with a better example...
actually lemme just tell you as much as I'm allowed about what I'm actually doing, that would be easier.
I've got this data analysis that looks at pictures of these spherical objects, and identifies surface defects. The defects are put into various categories based on their appearance. The table records the results of this. So the columns are actually:
Object_ID Defect_Category Number_of_Defects Total_Area_of_Defects
lets say that the defect categories are 'bigRound' 'smallRound', and 'long'
I'd like to make a report that says 'Object 1' has 5 'bigRound', 20 'smallRound', and 0 'long' defects.
 
gbn
2:53 PM
2 options
1. normal aggregate. Categorytable Left join this table with a COUNT
 
So it's not really EAV. You could sum over Number_of_Defects and get a meaningful result. You might do this for example:
SELECT Object_ID, Sum(Number_of_Defects) FROM my_table GROUP BY Object_ID;
 
gbn
This will expand to n categories, one row pre category
2. Add extra columns per category with SUM(CASE ..)
 
I think the second one is what he wants
so he ends up with:
object_id  number_of_defects   type_of_defect
    1              2                    long
    1              5                    bigRound
    1              0                    smallRound
 
gbn
that is option 1
 
@jcolebrand: That's what I've got right now, thats just SELECT * FROM...
 
2:57 PM
that's not quite what I understood from you before
do you want to pivot that?
(and you're allowed to say "I don't know what pivot means")
 
yes, I believe pivot is the correct term
@jcolebrand: What markup did you use to make that formatting work?
 
gbn
SELECT Object_ID, Sum(Number_of_Defects), Defect_Category  FROM my_table GROUP BY Object_ID, Defect_Category;
@ColinK 4 leading spaces
4 leading spaces
 
@ColinK press ctrl-k on the keyboard after typing, shift enter to give new lines
@gbn apparently his comment leads me to believe he's already summed them up ...
What DB is this in? MySQL?
 
the output I'd like is:
object_id    long   bigRound    smallRound
      1       2         5           0
      2       4         7           9
grr, 4 leadidn spaces didn't work, one sec.
where the table itself is what @jcolebrand posted above
 
ok, yeah, so you want (rephrasing you) PIVOT in Oracle10g
 
gbn
3:04 PM
SELECT Object_ID,
   Sum(CASE WHEN Defect_Category = 'long' THEN Number_of_Defects ELSE 0 END),
   Sum(CASE WHEN Defect_Category = 'bigRound' THEN Number_of_Defects ELSE 0 END),
   Sum(CASE WHEN Defect_Category = 'smallRound' THEN Number_of_Defects ELSE 0 END),
FROM my_table
GROUP BY Object_ID;
 
@gbn dynamic pivot ...
 
gbn
onyl need that to add columns per category
for a finite and fairly static number, then self join or sum/case
 
I'd prefer the columns to be automatically generated, if possible
 
yeah, can it not be done?
@ColinK do you have all the columns in a table?
 
gbn
@jcolebrand in SQL Server, dynamic SQL
 
3:06 PM
@gbn that's what I'm thinking
 
The list of category names is in a separate table, yes.
 
@ColinK what you need to do is to generate the SQL statement and then execute it
 
gbn
However, I'd do it in client code
 
it will be slightly slower, but we're talking fractions of a second
 
gbn
this is arguably presentation
 
3:06 PM
@gbn you would pivot on the client?
I would too, but my DBA is like "noooooo"
I get so confused sometimes
 
yeah the speed isn't the issue with that. I can definitely do it in client code. I just figured that doing it in the select would be cleaner and more correct
doing it in a single call also has the benefit that I can make a summary table in an excel spreadsheet to show to non-DB savvy people who are interested in the data
and doing it with dynamic columns means that if we introduce a new category, the sql doesn't have to get rewritten.
 
@ColinK doing it on the client also means you don't have to rewrite the SQL
 
I could probably pivot in Excel, if that's what it comes down to. Really if I have to I can just link a table in Access and definitely pivot there.
 
either way you're going to have to parse your dataset for the names of the columns, and then build the columns based on that
 
gbn
@jcolebrand if this an SSRS report, I'd use a Matrix or tablix control to do it for me
 
3:10 PM
@jcolebrand: wouldn't it, if I had to write the category names into the SQL statement?
 
What's your language on the other end?
 
gbn
or embedded ReportViewer
 
Also, giving people the data in Excel and letting them pivot is often easier :p (they like the control, makes them feel better about themselves)
@ColinK no, you can do a string concat'ing based on the values in the one select statement (to get the category names) to build the SQL used to create the pivot
So it becomes a two step process, but it's rather straightforward at that point.
 
in the client? mainly Matlab, but I usually also make an Excel spreadsheet with linked tables because databases scare the scientists.
 
How are they getting into the database TODAY?
 
gbn
3:13 PM
@jcolebrand "empowerment"
 
@gbn words ...
 
Today? Usually via Excel spreadsheets with linked tables :)
or via some code that is so bad it would scare you
 
but mostly the tables they use are not normalized in any way. They prefer to use oracle as a big spreadsheet table in the sky.
 
@jcolebrand If it's for a report, a lot of reporting tools will do the crosstab for you.
 
3:17 PM
@ConcernedOfTunbridgeWells that's why I asked how they get it now, because if it's not a custom UI then it sounds like he's doing a lot of ... extra work for nothing
 
Yeah, I think my answer is "do the pivot in Excel or Access"
 
@ColinK If that's what they're using for the front-end then you can do this quite trivially with MSQuery and a pivot table.
 
Are they using Access then?
 
gbn
@ConcernedOfTunbridgeWells "One true lookup table" dba.stackexchange.com/q/5064/630
 
They will use access if I give them an access file
 
3:20 PM
@gbn Now I know what you're taliing about.
Seen one or two of those in my day.
 
Sorry, I've got to run to a meeting. You guys have been really helpful, thanks!
 
gbn
3:57 PM
looks OK to me
 
1
Q: Server Tag Options

Leigh RiffelI've noticed that people asking SQL-Server questions sometimes tag their questions with the SQL and Server tags or just the Server tag rather than the SQL-Server tag. Often the question isn't about SQL at all and Server doesn't necessarily add any information unless it means SQL-Server. As of t...

@gbn apparently a newb saw it?
 
gbn
@jcolebrand not sure
 
4:13 PM
oh waitasecond
a) that newb is wrong, b) wtf is causing that error?
 
gbn
indeed
 
I think we have a case of bad example
or are you replicating it? It looks fine to me
I haven't tried to run it tho
 
gbn
@jcolebrand I can't currently
Only MySQL to hand
@ConcernedOfTunbridgeWells: Something for your IO fetish sqlblogcasts.com/blogs/tonyrogerson/archive/2012/01/16/…
 
Do we want this?
1
Q: Global Temp Tables - SQL Server vs Oracle

Stealth RabbiI am using Oracle 11g Global Temporary Tables as I need a solution where I can add rows to a temporary table for a join, and I want only the rows added to the temp table for the Oracle Connection/session to be included. I am using Global Temp Table in Oracle becuase I want the table to exist betw...

 
gbn
I say yes.
@jcolebrand @Mikael Eriksson did, no errors in posted SQL
 
4:33 PM
@ConcernedOfTunbridgeWells it looks to be a code question
 
gbn
@jcolebrand it's about spanning connections and passing data around too though.
 
@gbn I thought it was about NOT spanning connections
as in, prevent that
 
gbn
@jcolebrand ah. I get it now
 
5:06 PM
@jcolebrand Actually has a pertinent bit of insight about SQL Server vs. Oracle feature sets and their handling of temp tables.
 
Is the main chat message pane "twitching" for anyone else today?
Or have I just had too much coffee?
 
@BenBrocka No such thing as too much coffee.
At least that's what the voice in my head says.
 
Boo, the snowman is gone
yeah it's definately twitching
 
I'm not seeing that ...
 
5:30 PM
it's intermittent...the worst kind of bug
 
@jcolebrand just got around to your @'ing me ... i'd be more than happy to talk about our experience w/ ssd's if you guys still want to hear about it
 
I always do
so reddit and wikipedia are down, now you got time huh? :p
shame the tropers didn't do a blackout as well :p
 
haha, don't exactally have time ... but for you ;)
 
yay
I think someone should just do another blog on it
I hit a public tweet to @codinghorror
 
yea ... the trouble is it's much harder to get benchmark data when you are dealing with a production system (like i don't want to take down SO to get said data :) )
 
5:43 PM
well yeah
we're just curious about failure rates, moreso than anything else
like, have SSDs been lasting more than 10 mos on average, more than a year, more than 18 months, etc
 
0 failures so far and we are at over a year with the db servers
it's actually starting to look liek the reason we are going to have to swap them out is due to space limitations - the DB tier is running on older gen intel X25's which only came in at 64GB
 
@Zypher SO's DBs are on SSDs?
 
@BenBrocka correct, we have two DB server pairs, 3&4 run Stack Overflow and are SSD 1&2 run every thing else and are spinning disks
we also run the Intel 320 series on our web tier so probably about 60% of our enviroment is on SSDs at this point
 
Awesome
 
Here's one for the NoSQL crowd
0
Q: Zeo/ZODB lock file location, possible to change?

SharbelWe recently moved a Zeo instance over to a new server environment and one of the changes was the file system now has the database files stored on an NFS share. When trying to start zeo, we've been getting lock file errors which after researching seems to be because of a known issue of lock files...

Do we want it?
 
5:57 PM
$('#mw-sopaOverlay').remove();$('body').children().show();
For those dealing with wikipedia
wtf skype?
Also note I'm too lazy to type all that by hand
even if I am the one that checked up what needed to be done there
 
Or is it more of a serverfault question?
 
It sounds more like an NFS problem than a zodb problem
 
7:02 PM
@Zypher this is all very cool info
 
@ConcernedOfTunbridgeWells it's definitely db engine related but we don't have any zeo I don't think ...
 
7:13 PM
(╯°□°)╯︵ ∀ԀIԀ ∀ԀOS http://nyan.cat/
Hah
Arg, the letters never line up right on upside down text
And that S isn't even transformed
 
@NickChammas indeed
 
@BenBrocka yes it is
or is there a subtle difference in curve width between top and bottom halves of the S?
 
7:32 PM
Bottom curve is bigger as it always is, so it doesn't look "top heavy" when it's right side up
 
@Zypher I always wondered who you were, lurking here in this chat room never saying anything. Turns out you're Server Fault Valued Associate #00002.
you should update that link in your profile btw; it points to a dandy 404
 
lol yep ... I've been much more of lurker recently as i've had more real work to do :)
yea that's actually something wierd from when we converted from tumblr to wordpress ... one day i'll dig into why that happens
I try and at least lurk in rooms that are of interest but there are oooohhh so many rooms
 
@Zypher It happens because WordPress is evil, of course. ;)
 
ohh it's not soooo bad :)
 
web.mit.edu/newsoffice/2012/faster-fourier-transforms-0118.html <-- cool as hell if you like this sort of thing, in my opinion
 
7:43 PM
I dunno, I've looked at its insides, and they scare me sometimes.
 
I just don't like WP on principle
I'm sure it's nice enough
 
Let me guess, you use Xanga ironically?
 
@jcolebrand I used to know some people in New Zealand who worked with Zope but I don't know if they're active on SO.
 
@BenBrocka no, but as a true programmer I am considering writing my own platform ;-)
 
@jcolebrand Oh that always ends well :P
Make sure you write it in a robust language like Bobx
Oh, DailyWTF is blacked out (whited out) too. In an obnoxiously hard to read manner
 
@jcolebrand would be welcome here; seems to be addressed adequately over there too
 
it's a design Q right?
That site is for design
he needs help with his design, it's not advanced
I'm just afraid of importing too many basic Q about syntax or design
 
@jcolebrand Database design or modelling questions are on-topic here, I think.
 
@ConcernedOfTunbridgeWells and there
the rule is "If it works equally well on two sites, and it's already on one of those two, don't migrate it"
 
8:09 PM
Leave it where is then.
 
the only valid answer he got was from me
and I'm sure we would've done better here
 
@NickChammas that's already well answered and accepted, and appears to be syntax only.
 
it's about dynamically joining to tables depending on certain conditions
not really a syntax quesiton
but yes, already solved over there
 
8:49 PM
@NickChammas a code question then?
 
@jcolebrand yeah: "How do I filter on these two tables, but only when they're populated?"
 
haha, lovely
 
Weeee, the Cognitive Science site launched
2
A: How is it that taking a break from a problem sometimes allows you to figure out the answer?

Ben BrockaIt sounds like you're talking about a classic example of Incubation. Here's a great article by John F. Kihlstrom: Intuition, Incubation, and Insight: Implicit Cognition in Problem Solving. Basically it is believed that Incubation or stopping conscious thought on a problem allows one to find more...

Oh, the links don't work for the plebes
 
One of these days I gotta introduce you to tricks
@BenBrocka see if that does what you wanted
 
9:08 PM
Yup, thanks
 
haha, I know things ;-) [not really, I have an army of people at my fingertips to help me with that stuff] [count of army:2]
 
Idea I wanted to run by someone, especially a mod: I was thinknig of asking on the UX meta site to gather questions they want on the Cog Sci beta. Lots of them have questions, but most didn't want to commit to the proposal because they weren't subject matter experts. Think it would be okay?
I'd be vetting the questions and not just trying to spam the beta, but I still wasn't sure if that'd be cool or not. I think the UX guys have lots of relevant questions but weren't as cool on joining the beta itself.
 
yeah, that sounds good
also use the proposal Q to spawn new Q on the site
stuff that's highly ontopic according to the site definition
and if you work a lot on the site in the first few days, and help aggressively shape things, you can nominate for the pro-tem, and probably get your own diamond
 
@gbn @jcolebrand Do you agree with the accepted answer to this question? Looking for a solution myself to this problem.
 
I don't like it, fwiw
I prefer the second solution, the one that's highly upvoted
 
9:19 PM
unfortunately, I don't think that's a solution
 
why not?
I always prefer to query the engine for metadata before passing information inside the functional block
 
it's a comment directed at Googlers who land there looking an answer to a related question: What is the current proc I'm in? Instead of the question the OP asked: What proc called the proc I'm in?
 
the engine already has that knowledge, why pass it? It's going to end up out of date or omitted at some point
 
@jcolebrand how does this sound:
[The Cognitive Science proposal][1] site just went into Private Beta. I know a lot of users here have questions but didn't feel they could commit to the site. Please post questions you would like to see asked as answers here, and I will post questions that will be good for the site.

Remember these are questions about *cognitive sciences* like cognitive ergonomics, cognitive psychology, behaviorism or neuroscience. I'm not asking for UX questions we can bug Cog Sci with, but rather real Cognitive Science questions you have.
 
@jcolebrand reread the OP's question :)
 
9:21 PM
@BenBrocka I think more like ... "If you have a Q you think would help define the site, but didn't think you could commit completely"
@NickChammas I thought I did ... what am I missing? that the answer I'm giving doesn't quite help? You still have to return the value, but don't make it a string when it can generate for you
 
@jcolebrand OBJECT_NAME(@@PROCID) gives you the name of the current proc
the OP is asking how to know what proc called the proc he's currently in
make sense now?
 
oh, you want to know the parent proc
I was thinking if an error occurred or something, catching the one that was called
yes, I missed that
 
0
Q: Post questions you want asked on Cognitive Science.Stack Exchange

Ben BrockaThe Cognitive Science proposal site just went into Private Beta. I know a lot of users here have questions but didn't feel they could commit to the site's. Please post questions you think would help define the site, and I will post questions that will be a good fit. Note you won't be able to see...

 
That sounds good
 
@jcolebrand Have any insights on this BTW? The Cog Sci/UX overlap reminds me of the SO/Programmers/DBA overlap
0
Q: How to handle the overlap with Cognitive Science?

Steven JeurisCognitive Science private beta has just started. I would imagine there will be an overlap with this new site. How will we handle this overlap? Can we draw a line what is out of scope here and better refer to Cognitive Science? P.s.: I started a similar topic on Cognitive Science.

like programmers/DBA I feel many questions could live on both sites just fine
 
9:36 PM
I think you're doing the right thing by asking it now
 
I didn't ask it :P but I provided an answer on Cog Sci
gotta go though
 
@BenBrocka I know, I meant you the group, not you the individual :p
 
gbn
@NickChammas I don't know of any way except via parameters. In one sense, in makes no difference: like some OO class method shouldn't know who called it. Encapsulation. The stored proc should do one thing and not care about calling state.
 
@gbn Agreed. I'm interested just for some logging/debugging purposes.
Well, parameters it is.
Been tracking down an interesting dequeuing bug. Many ways to fuck that up.
 
9:55 PM
Does TSQL not do call stacks that you can tap into? That's what I would do in .NET
blogs.msdn.com/b/extended_events/archive/2010/05/07/… doesn't quite seem to do it, but seems to have some ideas that I'm trying to find words for
 
10:49 PM
@gbn - I vaguely remember you (or some other SO high rep user) posting something about client txn timeouts
1
Q: SQL Server Transaction Timeout

David Gray WrightIs there a way in SQL Server 2008 R2 to cause a timeout for a database modification involving a transaction? We have a scenario where our application code hangs or throws an exception and fails to perform a rollback or commit. This then causes other sessions to hang waiting for the transaction to...

 

« first day (379 days earlier)      last day (4488 days later) »