« first day (707 days earlier)      last day (4146 days later) » 
00:00 - 22:0022:00 - 00:00

@dezso Excellent! There's probably someone better to do that though.
 
@dezso make it so
 
It seems none of the existing PG version tags have wiki entries
 
1
A: UNPIVOT on Table in a Different Server/Database Fails with 'conflicts with the type of other columns' error

RichardTheKiwiThe error The type of column "XXX" conflicts with the type of other columns specified in the UNPIVOT list. is very obvious and one of the better messages. It tells you that your UNPIVOT list contains columns of different types. Here's an example that causes such an error: SQL Fiddle SEL...

Why does it cause an error with the remote query? In what situation would the CASTs not be resolved there and therefore allow the query to run?
Is it something to file on Connect?
Where are my manners. Good morning gents!
 
@RichardTheKiwi down under?
 
10:11 PM
@swasheck middle earth
 
@RichardTheKiwi clearly
 
Where we have 10 sheep per person
 
@RichardTheKiwi Good morning :)
 
@SQLKiwi Good morning. Are you back on Kiwi time?
 
10:14 PM
@RichardTheKiwi Ish. I woke up at 3am having gone to sleep at 11pm.
@RichardTheKiwi No error for me running from 2012 remote to 2008 R2
Did you test on 2008 or 2005?
Aha! Error from 2012 -> 2005
 
@SQLKiwi The SQL Server team must have realised it. I tested 2008 (r1) -> 2005
Good of them to fix it
 
10:29 PM
@RichardTheKiwi Also errors 2012 -> 2008 so seems a DQ issue fixed in R2 at some point
 
It works fine locally on the 2005 box that was being remoted
 
Yes. DQ = distributed query.
I just saw @jcolebrand leave in a sleigh.
2
 
@SQLKiwi That's very good to know! Thanks for looking into it. No need to wake up an old fixed Connect item.
 
@SQLKiwi a sledge?
 
Watch me
 
10:30 PM
@swasheck yep
 
Up-voted your answer already. Can't immediately think of a better workaround.
 
@SQLKiwi disconnected network >.<
 
Did I leave in a sleigh too?
 
@jcolebrand where have you left your sledge?
:)
 
Up on a tree branch, where it belongs
 
10:31 PM
@swasheck Ah I see what you did there :)
 
I mean, those players are like huge
 
@RichardTheKiwi You did!
 
you are soooo childish
 
Ha ha ha
 
One wonders how many hours could have been put to productive use, instead of generating that sleigh animation. Think of the children.
 
10:34 PM
@RichardTheKiwi once we deliberately introduced a bug in a system
it crawled all around the place
 
@RichardTheKiwi Aha!
SELECT * FROM
(
    SELECT
        ID,
        CONVERT(sql_variant, F1) AS F1,
        CONVERT(sql_variant, F2) AS F2,
        CONVERT(sql_variant, F3) AS F3
    FROM
        SQL2K5.Sandpit.dbo.temp AS t
) AS T
UNPIVOT(FieldValue for FieldName IN (F1, F2, F3)) AS UNPVT;
Works
 
@RichardTheKiwi SO users?
 
Does this autobox?
It does!
So, my answer to the popover is because you haven't held it up with respect to the horizontal axis, but you have held it up with respect to the vertical axis.
 
@jcolebrand so you saw the MSN article?
 
@swasheck adonde?
 
10:38 PM
@jcolebrand you doin what?
 
@swasheck I hadn't, I just figured everybody knew our eyes were better tuned to blue than to violet, violet being the end of the visible spectrum (and ultraviolet coming after)
 
ah, there is a img title as well
 
If I had to actively explain to someone why the color blue is more visible than the color violet if both are portrayed as part of a broad spectrum of light, they would likely ask such a question in the first place.
The very act of asking such a question leads me to think that we need to have a more indepth discussion, about one of the following three points:
Think before you ask, for like 20 seconds.
What the cones and bars and the similar on the retina
Why color works the way it does
 
@SQLKiwi Why, why does it work? Can't understand the SQL Server team
 
10:42 PM
@RichardTheKiwi keeping up with the Montys?
 
@jcolebrand just why (in theory at least) DBA.SE is a better place for Q&A than G+
 
@RichardTheKiwi Might be something special about MAX or something stringy like collation. All sorts of fun to be had with linked servers and distributed query in general. And by fun, I mean you know...pain.
 
@dezso because there is already an established vendor-neutral Q&A site that facilitates finding answers, that is already integrated into a developers regular workflow, and that has all the features that facilitate getting an answer, that isn't G+.
I can give reasons why G+ is better for some things, like hangouts, or document stores, or long unmoderated emotional discussions
 
OFF WITH THEIR HEADS
 
Note also that finding != getting
 
10:45 PM
I tried a hangout once. It was awkward.
 
@jcolebrand ah, I think I misput my thought - I wanted to say that in order to ask a good Q you have to think before
 
Ahhhhhhh
Also, afk
 
The sky is very blue today. I might prefer violet or indigo, just for a change.
3
A: Field types for columns in a MySQL query

msi77SELECT column_name, data_type,character_maximum_length FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'yourTable' and TABLE_SCHEMA='yourDBname';

Low. Hanging. Fruit
 
Ooo! Want one!
 
10:49 PM
@SQLKiwi from "Down underer"
 
Looks like I'm selling this domain to a used car salesman in Kuwait. Crazy times.
 
@SQLKiwi Hmm... collation, maybe. Hope you don't mind I added a reference to your chat transcript solution in the answer, and linked to your profile :)
 
@CadeRoux which?
twitterrides or somesuch?
 
@swasheck tweetcar.com (and @tweetcar)
 
more money than sense
 
10:50 PM
@swasheck One meeeeeellion dollars!
 
@RichardTheKiwi Nice. That way anyone following gets a cool xkcd as a bonus!
@swasheck Going up to Cape Reinga for New Year. Lovely picture.
 
Funny thing is, for this whole thing to happen, it involved TWO Google fuckups. Firstly, they put 2 emails inquiring about this through godaddy into spam as false positives. Then I detected it because someone replied to a Google+ posting via email (noreply@google) and then asked me if I received it.
Then in recovering a couple dozen false positives, I came across this follow up to an earlier email (through LinkedIn) asking about it which I thought was done. Google is not in my good books this Christmas.
 
clearly
 
Just to add something hopefully valuable: dba.stackexchange.com/q/30228/6219 which is a first post, no one has reviewed it and not in the queue. — dezso 1 min ago
 
speaking of low hanging fruit ...
 
11:03 PM
The beast query I was working on has gone from 1 hr plus load time to 56 seconds
 
@dezso The queue filtered it out because it is junk!
 
haha
 
Thanks for all the tips on that guys.
 
@SQLKiwi and how ...
@jcolebrand ... flag for migration to SO?
0
Q: How to update MS SQL server data base using another data base?

userAI'm using MS SQL server 2008. I have two data base call "Adb" and "Bdb". Both date base has one same table call "commonTable". I want to update date "Adb" data base ever 15 min using "Bda" bata base "commonTable" data. How can I do it?

 
For some reason I am now thinking about Arthur Dent asking the Heart of Gold to make a decent cup of tea
With reference to Zane's query
 
11:09 PM
Unless I completely misunderstood the point of PQsendQuery then a query my be collected in multiple chunks, I.e fragments of a big table. Therefor PQisBusy return 0 does not indicate that the query is over, in that case my question would be mood, it only indicates that some input is available. Validating this code by testing it is actually not a good idea; the code may run non blocking in lab environments but that doesn't guaranty that the code wont block in production. — JustMaximumPower yesterday
the last sentence
I bet the OP tried to spare testing, and unfortunately my knowledge on this is next to nothing
 
The user name tells us everything
 
So Should I answer my own question then??
 
@Zane Sure, tell us what you did. blog.stackoverflow.com/2011/07/…
@usr And to Paul's point, there are going to be cases where you can find gaps in functionality in the optimizer. If they're not going to be fixed, and you know a better way to write the query, use the better way. Patient: "Doctor, it hurts when I do x." Doctor: "Don't do x." :-) — Aaron Bertrand 7 mins ago
Vintage.
 
@AaronBertrand ... i know you're out there listening ... watching ... just posted a comment on that question and when i hit enter, your comment appeared
@SQLKiwi did you see that pic of him in a kilt?
now THAT was vintage
 
@swasheck I think I avoided it. Or my memory has blanked it out. One of those options.
 
11:20 PM
@SQLKiwi I will do that tomorrow then when I have time to write out a better answer. I'm already way late for dinner and I'm sure I'm in trouble.
 
@dezso It's in the review queue now - Aaron's already rescued it however.
@Zane Clearly we need to have a chat about your priorities ;c)
 
Well at least she knows by know if I say I'll be there by 5ish what I really mean is I'll get caught up at work and leave there at 5ish.
 
@SQLKiwi still believe it should be closed and migrated to SO
 
@swasheck No, Aaron did what was right
 
@swasheck What he said.
 
11:27 PM
fair enough
what about this one?
0
Q: Modeling Ranking with NoSQL

jlmg5564I'm using Google App Engine, a Non-Relational Database (NoSQL). My question is, which is the best way to model a rank (ranking of players) using their scores? For example, my players are: Player { String name, int score} I want to know the rank (position) for a player and also get the top 10 ...

 
Does dba.se charge you by the character for comments?
java? python? go? — swasheck 1 min ago
 
deleted
/d
 
Ugh. Aaron uses LEFT JOIN ... IS NULL
0
A: How to update one database from another?

Aaron BertrandWithout more specifics: CREATE PROCEDURE dbo.UpdateA AS BEGIN SET NOCOUNT ON; UPDATE A SET col1 = B.col1 /* , ... */ FROM Adb.dbo.commonTable AS A INNER JOIN Bdb.dbo.commonTable AS B ON A.key_col = B.key_col; INSERT Adb.dbo.commonTable(key_col, col1 /* , ... */) SELE...

 
@SQLKiwi what's wrong with that?
 
@swasheck It's a poor-man's anti-semi join.
We have NOT EXISTS and EXCEPT for that.
 
11:32 PM
Ah. well he did that in the INSERT portion
 
Exactly.
 
@SQLKiwi you're honestly already over my head so i dont know about anti-semi join but i guess that'll give me some googling time
well
this cleared that right up
 
Point is, something like NOT EXISTS can stop looking as soon as it finds a match. LEFT JOIN has to process the full set, then there's a separate filter to find the NULLs you introduced. Ugh.
 
@SQLKiwi I'm not anti-semi-joinic, but the NOT EXISTS and EXCEPT are usually a lot more readable and "more declarative". Typically in the past they weren't always optimized as well. LEFT JOIN can stop sooner IF there is a constraint which would tell you there can be no more than one match.
 
@swasheck in this case I have no idea about querying Google AE, so if those python files are the equivalent of queries, then it should likely go to Stack Overflow as a means of "how do I sort desc on a given column?" which is basic SQL all the way if it were SQL99.
 
11:39 PM
@SQLKiwi right, i knew that part. my retardedness^H^H^Hinexperience is showing now ... so if you're bringing in new rows (a la MERGE), wouldn't you want the whole set?
 
@swasheck Yes but just the set of rows without a match.
 
@SQLKiwi Not sure why he mixed the two techniques in the same answer. In this case, since it should be a unique key in each table the execution plans should be equivalent, wouldn't you think?
 
@SQLKiwi so NOT EXISTS "stops looking" ... does it resume from where it left off so that you get the entire set?
 
@CadeRoux No. SQL Server does not transform LEFT JOIN ... IS NULL to an anti-semi join. Oracle has some better optimization here IIRC.
 
@jcolebrand it's more like ... how do i sort a python/java dict or go struct by key
@SQLKiwi (sorry for my ignorance)
 
11:43 PM
@swasheck If that's indeed the case, then yes, Stack Overflow. Do we have any good AppEngineers here?
 
@swasheck The query is, "delete rows from A where there isn't a match in B'. For each row of A, not exists can stop thinking about deleting that row as soon as it finds a match in B. Left join performs the complete outer join before filtering for the NULLs.
 
@SQLKiwi right ... ok ... i think i found the flaw in my logic. i was thinking that it would have to resume from a RID on B to keep looking. but i was just not thinking clearly
 
@SQLKiwi Does it ever make a difference in practice?
 
@swasheck I went ahead and moved it, fwiw
 
@SQLKiwi And why doesn't it just optimize it?
 
11:51 PM
@jcolebrand thanks
 
@CadeRoux In my experience, yes, very much so. sqlinthewild.co.za/index.php/2010/03/23/…
@CadeRoux There's no reason is couldn't be rewritten, the opposite case is, there just isn't a transform for it. I asked why once, and was told it hadn't been asked for enough.
 
@SQLKiwi i was reading that. how many blogs do you maintain?
 
@swasheck Do you mean how many do I read?
 
@SQLKiwi oh. i guess i assumed that was yours too. like you were maintaining a southafrican blog too
 
@swasheck Hah, no that's Gail Shaw.
 
11:57 PM
good deal
 
@SQLKiwi I will keep it in mind in the future.
 
@CadeRoux If nothing else, even when looking for a PK-PK match (i.e. one row maximum) all the rows move from the outer join to the filter operator. In the ASJ operator plan, rows are rejected inside the operator. It all adds up.
 
00:00 - 22:0022:00 - 00:00

« first day (707 days earlier)      last day (4146 days later) »