« first day (2103 days earlier)      last day (2756 days later) » 

3:58 AM
0
Q: Please add a tag for Google BigQuery

Misha BrukmanPlease add a google-bigquery tag (see tag info on SO). DBA.SE questions that would be covered by this tag include: Aggregating two queries and returning a COUNT of some permutations Alternatives for storing 365TB of info Counting unique records across 2 columns and computing a score based on bo...

 
 
3 hours later…
6:28 AM
hi all, pleaase tell me what kind of datatypes i need to use for fields present in above image
i found list of data types here : https://www.tutorialspoint.com/mysql/mysql-data-types.htm

http://www.w3schools.com/sql/sql_datatypes.asp
also instead of "int" if we use "varchar" or vice versa, is there any problem
 
6:50 AM
0
Q: can we use Varchar for columns that will save only numbers

Baby in Databasei am doing "user registration project",i am newbie in db..... I wanted to know why we need to use "Data types" & yes i studied some some tutorials that we can use "int, string, Date" as data types mainly. but my question is why there is no one particular datatype for all, that should support al...

 
@Lamak always. but ... politeness is not weakness :)
 
7:16 AM
Mistakenly voted as unclear. Too Broad would likely have been better, as @AndyK suggested.
 
7:33 AM
@AndriyM It's a bit broad but not that bad, in my opinion.
 
@ypercubeᵀᴹ really? why?
 
@AndyK why what?
 
@ypercubeᵀᴹ Presumably: why is it "not that bad"?
 
why don't you think the question is that bad , Ypercube? In SO, if I've asked similar question, I would have been slapped twice on the wrist and maybe on the face ...
 
Ah. It's a simple question, I agree. Seems so simple that anyone who has worked with databases long enough, doesn't even consider it. But sometimes simple questions like "what happens if I travel faster than light?" can lead to wonderful things.
 
7:42 AM
@AndyK Only figuratively, though, which is not that bad. (Hey, that's what @ypercubeᵀᴹ said!)
 
And there is at least one dbms, that doesn't have proper types.
 
fair enough gents.
 
Call me SQLite, where my columns have no type.
 
oh really?
 
> why there is not one particular datatype for all, that should support all these int, float, string, date , instead of using "int" for telephone , "char" for name and "varchar" for email.
 
7:43 AM
No, only values have types (5 basically), so its dynamic. You can store an integer and then change it to a string.
 
I cannot parse that. Help?
 
@PaulWhite What, you've not using "int" for telephone numbers? You must be doing something wrong!
(sarcasm)
 
I parsed it as: "Why is there not just one datatype for everything?"
 
@AndriyM I just can't make sense of it at all.
 
I didn't say that it cannot be improved
 
7:45 AM
@ypercubeᵀᴹ Well you did improve it, then it went backwards again.
There might be a good question in there, but it is not visible at present is it?
 
ha, didn't notice!
 
> Chatty, open-ended questions diminish the usefulness of our site
And the majority of chat appears to occur in comments, which irks me, as you all may know.
But of course I am just mean as well.
I'm not going to put it on hold myself, and have done my best to incorporate the author's comments in the question, but I certainly understand the close vote thinking.
 
@PaulWhite sometimes, it feels people are looking for a freeride not all the time but sometimes. How to be fair in a not so fair world?
 
8:10 AM
@ypercubeᵀᴹ why did you delete your answer about the DISTINCT aggregates?
 
@PaulWhite I think now that you've incorporated OP's comments, it's clearer how confused the OP is.
 
War
@AndyK shit all over them like everyone else does ... it'll teach them a valuable lesson
 
And my Unclear vote is now perfectly justified (in my eyes anyway). I was considering to withdraw it but now I won't.
 
@War I wish but I have made a vow to myself to be patient in situation where patience is needed (I was once a young fool, me too)
 
War
@AndyK ah a true believer in the kindness of man ... few and far apart these days
 
8:20 AM
@dezso because I noticed, just after I posted that he had the same code in the question.
And the question is more about what is better than how to do it.
 
@TomV Yes you are Right Suppose in Case If My Server service is not Started how can I send request from Sql with out such error — Alfaiz Ahmed 3 hours ago
huh?
Only one more stone required
 
a true believer, maybe not. just trying to do right when possible. When not possible, not possible ... ;)))
 
@TomV @dezso was faster by 11 seconds
 
There is no such thing as 'PostGre'. It's PostgreSQL or Postgres, if really necessary. Also, SQL is a language, and you mean [MS] SQL Server above. — dezso 22 mins ago
so helpful this morning
 
@dezso I can't type or click today
 
8:33 AM
@TomV cannot tell if I'm fatter than @ypercubeᵀᴹ as I cannot find a photo of him
 
@dezso 4D photos are hard to be found
 
@dezso Participants of the scintillating conversations might be able to tell if there any of them that know you in person as well.
 
@AndriyM I like that the image links to the Heap
 
@AndriyM I believe you were a king at some point and I'm pretty sure Bill is the fool in that picture
 
I never tried to discern details on it but now I'm curious to find a bigger (and probably more complete) version..
 
9:05 AM
@dezso Thank you!
 
9:30 AM
That ended in a bizarro way
Well, yes actually... — Bert Van Landeghem 39 mins ago
 
hi all char(4) means it will store only "1234", "1235" like so, but not "123" or "12345" , am i right ?
 
Maybe @AndriyM can write up his comment as an answer on that one?
 
No the comment I linked just above
 
Oh, sorry.
 
9:35 AM
Come to think of it, it doesn't answer the actual question but it did solve his use case
 
9:49 AM
My comment pointed him in a way I didn't anticipate. I'll probably suggest he post a self-answer with all the explanations he can afford. That seems most fair to me.
 
@AndriyM google image search is magic
 
War
10:09 AM
0
Q: Complex dto based result sets with EF and MS SQL server

Warok lets say I have a collection of these ... public class ReferenceLookup { public string InvoiceNumber { get; set; } public CompanyReference Buyer { get; set; } public CompanyReference Supplier { get; set; } } I need a collection of these as results where any of the pieces exist ....

 
10:52 AM
@dezso I doubted it could help because the image was overlaid with text and apparently clipped. I should have just tried.
 
11:27 AM
@War There may be more chances to get this answered on SO, I think. I haven't encountered many LINQ questions here (can't remember any at the moment, to be honest).
 
11:39 AM
in mysql, i read that : for varchar, : If you put a greater value than 255 it will be converted to a TEXT type ...... but when i tried more than 256 charactars , but i got error : SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'phone' at row 1sorry , Query could no execute... so my question is : is varchar will not convert to "Text" ?
 
@profile101 Where exactly did you read that?
 
please check under "mysql" section in this linkkkkk: w3schools.com/sql/sql_datatypes.asp
 
@profile101 w3schools isn't known for it's correctness
 
@profile101 I think your starting point should always be the product manual.
 
than what i read is wrong..... thanks..... @TomV @AndriyM
but its google mistake that its displaying that site in first page :-) i will start with tutorials.....
 
11:47 AM
There are times when the official manual is unclear and other sites/blogs explain the same things better, but I think referring to them should be the next step.
 
you are absolutely right @AndriyM
 
12:06 PM
@profile101 You need to declare the column with wider size.
VARCHAR(n) can be up to 65535
 
okay if i use varchar(255), it dont convert to text, but if i use
VARCHAR(n) it will convert , am i right @ypercubeᵀᴹ
 
@profile101 No, I mean you can have VARCHAR(1000)
or VARCHAR(65535) if you like.
There is no automatic conversion to the TEXT type
TEXT type is a different type
 
okay than we store "n" number of charactars , its not limited to 255 ?
for varchar @ypercubeᵀᴹ
 
It's limited by whatever you put between the parenthesis
you define how long the string can be when declaring it and then it's limited by what you declared it to be limited to
if that makes sense :)
 
@TomV than why they mention "Can store up to 255 characters."
 
12:13 PM
Not sure, that could be true for char
As Andriy said, trust the docs first
> The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. For example, CHAR(30) can hold up to 30 characters.
 
@profile101 Who are they?
 
@ypercubeᵀᴹ He referred to a w3schools link a bit earlier
 
Ah, the w3fools ...
 
> The length of a CHAR column is fixed to the length that you declare when you create the table. The length can be any value from 0 to 255.
> Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535
So w3schools is wrong or at least outdated @profile101
 
12:15 PM
@profile101 They all copy/learn from one another, when in doubt refer to the manual. Those can be wrong too but that's less likely
The docs are updated for each version, those tutorials might never get updated
and I don't know MySQL well enough to know if what they state was ever even correct but I doubt it
 
@TomV If it was (some time) correct, it would be in a 4.x or 3.x version.
 
okay @TomV got it..... Thanks a lot, also for @ypercubeᵀᴹ
 
Like 15 years ago
@TomV ater some digging, it was indeed a change in 5.0 version (to allow more than 255 length.) Which was released around 2003-2005
 
@ypercubeᵀᴹ I was trying to access older manuals by changing the version in the link but that didn't work. They probably archived those somewhere.
 
Shows how much work the fools are doing with keeping their site high in google rank and how much non-work in good content
3
@AndriyM yeah, I don't think they have online anything before 5.0 for years
I think they removed 5.0 and 5.1 as well, now.
(guess because they are not supported any more)
 
12:26 PM
Yeah, I couldn't access 5.1 or 5.0 either.
 
I can find downloads and the source code for older versions online. But not form Oracle. They only have 5.0 and later available
 
I do however agree that some more official tutorials should be created instead of just a reference, to serve as a starting point for those just getting their feet wet
It can be hard to connect the dots using a reference if you have no general knowledge about the technology
Like they do for Django, a basic tutorial creating a real application, updated for each version
"Now you do this, if you want to learn more, here is a link to the reference documentation"
 
For me, the difficulty would be in deciding what to include and what to omit. It's usually very easy for me to get carried away.
 
12:57 PM
@TomV something like what SO is trying to do, with the Documentation?
 
@ypercubeᵀᴹ remains to bee seen how up to date that will be
 
@TomV Whenever I visit the SQL topics, I get depression.
There are so many things that need improvement, that I touch nothing.
 
@ypercubeᵀᴹ Same here. Much better for my sanity if I never look at Docs.
If it ever comes to dba.se, maybe I'll revisit that.
Probably not though. Time spent on Docs would have to come from somewhere.
 
@PaulWhite yeah. We don't want you spending time there.
I had a wonderful/terrible dream of refusing Gordon from answering and sending him over to the Docs.
 
But we always have time to mock w3schools :)
 
1:03 PM
But then the whole section would be filled with the horror of his formatting
 
@ypercubeᵀᴹ I tried, but it's kinda of a mess
 
hey @Lamak
 
hey @AndyK
good to see that you are also saying hi now :-)
 
I do
sometimes I forget the hi
but well, it happens
 
@ypercubeᵀᴹ OMG
 
@ypercubeᵀᴹ yeah, there's no chile there
 
@Lamak also, no DBA
 
Data Scientist
Lern teh newspeak plz
 
@Lamak Not the only one missing :)
What they don't say is that whatever they pay it isn't enough to be active on meta.SE
 
@PaulWhite lol
@PaulWhite you're right, there's no Australia
4
 
1:43 PM
@Lamak You've never been kicked from chat before have you?
 
They trick that continent into working for free and call them mods
5
 
@TomV Ha ha ha ... wait!
 
@PaulWhite there's always a first time
 
@Lamak There doesn't have to be ;)
 
bluefeet would be proud ;) — ypercubeᵀᴹ 16 secs ago
for identifying - and answering a PIVOT
 
1:47 PM
@PaulWhite right, right, forgot about that option
 
2:12 PM
Developer from the company next door walked over to ask, "How do I delete log files?"
It's looking like a fun Friday so far :)
 
@Forrest beginning of a beautiful friendship
which logs do they want to delete?
 
The active transaction log file...
It was just his dev database that was in Full recovery with no log backups happening.
 
had a guy last week asking why his attempt at using logtrunc on the transaction log didn't work
I was glad he didn't break it because it was production, scared the hell out of me
 
!
I wonder if I can make a DDL trigger for shrinkfile...
 
2:30 PM
so many things wrong with that ^^^^... not least of which is the font.
 
the hell is that?
 
@Lamak Comic Sans
Sheesh
 
Not the first column
 
no, interestingly that is some other font. But "NB" means "Note Well", not "Number" as would seem to be the intention.
Also, "MS-SQL 2007"????
 
@Forrest With an ancient ritual involving the sacrifice of a developer.
3
 
2:35 PM
@MaxVernon MS-SQL – it's like MS-DOS, right?
 
@MaxVernon Not surprising, they don't mean the number of cores in the server, they say "Nota Bene: The cores are soldered on the server" (i.e. the case)
 
3:31 PM
bye
 
@AndyK bye!
 
@AndyK bye!
 
@AndyK bye!
 
@AndyK bye!
 
man, he's so polite
 
3:47 PM
Showing class to an entire chatroom.
 
Goodness knows we need all the help we can get.
 
War
@AndriyM ah thx man ... it's a tough one
 
@PaulWhite we do
 
@War Indeed it is. No problem.
 
4:03 PM
3
A: SQL Server - NTEXT columns and string manipulation

Paul WhiteConverting to nvarchar(max) and back to ntext does make life simpler from a code point of view, but it does mean converting and rewriting the whole (perhaps very large) value, with all the CPU and logging overhead that implies. An alternative is to use UPDATETEXT. This is deprecated, just like n...

@AndriyM thought that approach might interest you ^^
 
It was mostly an excuse to play with stuff that I hadn't seen used for years. ntext was certainly a weird animal.
Or is if you are Phil ha ha ha
 
When Phil asked that thing yesterday I first thought "Hey I remember that, I'll create a case using ntext and patindex", then I actually remembered how it was and said hell no
 
Honestly don't know how we coped with it all pre-2005.
 
4:38 PM
@TomV Thanks. I probably saw UPDATETEXT in the manual once or twice, don't remember if I read much about it, it was a long ago. There was no chance I would have thought of it yesterday.
 
4:50 PM
@PaulWhite why, we were writing into tables some intermediary stuff because there were no functions in 7.0 or which version
0
Q: Why this result in MySQL is different than Excel or Calc?

user105927Hello I've been very confused because this calculation gives different results. Select (10/110*48576000) the result is: 4415999.9558 But if I do it in Excel using = 10/110*48576000 the result is 4416000. Even if you count it in Calc 10 divide by 110and multiply by 48576000, the result is44160...

just another thing MySQL does differently
fun fact: I've just found a 131 GB table called ..._current_history
from the nature of the thing, current probably means the last 6 years
I am trying to verify this suspicion, but have to create an index first
 
5:12 PM
dba.stackexchange.com/questions/151595/… I just assumed it would use the meta data for CE since it is used by the optimizer building plans. I hesitated a bit because of the column store stuff but still thought it worth trying. Really like your last comment on the connect item :). @PaulWhite
Interesting the MS rep talks about it like it is a bug instead of a design choice. Makes you think they actually meant for CE to use the meta data but failed in implementation and now they don't dare fix it.
 
Is there a SQL Server version that I can instal in a Windows-7 machine?
2016 Developer requires Win-8
 
2014 works on win7
 
great, thnx!
 
5:31 PM
0
A: Keys of a relation

SoccergodsAny relation has multiple keys present in it. The primary key is the minimal key amongst these various candidate keys which we can choose from. Candidate keys are a minimal cover of attributes which determines a tuple. We can have many many candidate keys. The reason A,B,C,D,E,F,G is a key is si...

Either a single-attribute one is not a relation, or there is something wrong
 
May I ask why? Keys are just there to be UNIQUE. It should not matter whether they're sequential or "gapless". — Phil 3 mins ago
"May I ask ..." Who are you and what have you done to the the real @Phil?
 
6:03 PM
@ypercubeᵀᴹ :P
 
0
Q: Achievements hint when putting a bounty on a question

Jeff.ClarkI recently put a 50 rep bounty on one of my questions, and today when I looked at the achievements menu item to the right of the "Stack Exchange" I saw a red -40 as one of the items. I know now that was simply due to the minus 50 rep bounty + two upvotes, but my first reaction was Gasp, why so ma...

 
 
2 hours later…
8:09 PM
just seen a very promising job offer, requiring Java webapp development skills, together with thorough Postgres 9.4, SQL Server 2014 and Oracle 11.2 knowledge
anyone interested?
/me ducks
While this answer works for a temp table insert, this operation is not a great solution for a production system, where it's very sensitive to add a new column to a table. — DB140141 47 mins ago
 
8:40 PM
@dezso That question is very similar to one about mapping that was posted (and linked here) today.
 
@dezso I saw your comment about the only catalog change.
That's only for nullable columns, right?
 
@TomV lol.
 
@ypercubeᵀᴹ no, NOT NULL too - the only exception is the single-statement ALTER TABLE blah ADD COLUMN blooh integer DEFAULT 0, where it will be filled with 0s
@AndriyM I remembered answering a similar question, but did not have any time to look it up
 
@AndriyM - for me, Comic Sans was the killer bit.
 
@dezso So, if I do ALTER TABLE blah ADD COLUMN blooh date DEFAULT 'some-date'; will it be catalog only or not?
 
8:46 PM
@ypercubeᵀᴹ this exception is implied by 'if done the right way'
 
I'd swear I was reading that they are planning to add this feature
 
@ypercubeᵀᴹ no, that rewrites the whole table
 
So, what DEFAULT doesn't rewrite?
 
ALTER TABLE blah ADD COLUMN blooh integer;
ALTER TABLE blah ALTER COLUMN blooh SET DEFAULT 0;
this leaves the column empty
 
So they get "filled" with NULLs but actually they aren't. It's only in the catalog
Did I get it right?
 
8:49 PM
@ypercubeᵀᴹ I guess filling a new column with NULLs is a NOOP :D
no structure change on the data pages, yes
 
@dezso Great thnx.
Someone proposed a few days ago, to add the feayure for ADD COLUMN x DEFAULT constant
 
@Phil needs some love
4
oops, I mean the review queue
@ypercubeᵀᴹ to what?
 
@dezso in Postgres
so it is a noop as well
They proposed it in the pgsql-hackers lis,t I mean
I was reading about it but didn't know it was already done for the case you told me..
 
ah
 
@MaxVernon Would you like to be called Max Marx or Marx Vernon from now on? I prefer the former
Thanks Marx it works but as Cody said this situation could have massive performant hit — user3569267 6 hours ago
Or Comrade Vernon, that would work
 
8:55 PM
@TomV lol.... I thought Marx had a nice ring.
Viva la revolución! marxiste.org
 
-1
Q: What are some suggestions to solve the Data issues caused by differences in Data models between the Mainframe DB and the integrated applications?

AdharshI have found that there are sometimes differences in the way we identify an Object in Mainframe DB and the integrated apps i.e in Mainframe DB an object can be uniquely identified by 4 fields whereas in the Integrated applications, only 2 fields might be required to identify the same Object. This...

 
@MaxVernon I thought Marx was German.
 
mainframe DB
 
@AndriyM yes, I believe so.
 
@MaxVernon So, you're not real Marx then!
 
8:58 PM
@AndriyM nope. Fake Marx.
 
@AndriyM I still regard him as a comrade
 
or Faxe Marx (as in the beer)
 
And Marx moved to England IIRC, so who knows Max may be a descendant
 
I'll post an answer then, the question still isn't overly clear but I dislike questions like this being raised to the frontpage because they don't have an accepted answer — Tom V 5 hours ago
 
@TomV lol, I'm actually a descendant of one of William the Bastard's men. (en.wikipedia.org/wiki/William_the_Conqueror)
 
9:00 PM
@TomV VtC?
 
@dezso That mainframe question?
Shopping list because of: "IS there any platform/software which we can use to highlight such Data Model differences"
 
@TomV no, the one you answered (which might be very useful, BTW)
 
@dezso I was bored today, so I don't know which one you mean, I answered more than one
Hell I could've earned mortarboard today if only one of those answers was actually good
/jk
Which one you refer to?
The conversion failed one?
 
@TomV the one from where I cited your comment just two more lines above :D
 
Ah yes, that was before he replied to my comment
 
9:03 PM
the VtC reviews are more entertaining now than usually
a food chain:
 
i still think it was unclear at that time. There is no way to point out the actual error without seeing the code
but since my comment solved his problem I converted it into an answer
 
> Furthermore these consumers can also be Used by other consumers.
 
And I thoroughly dislike crap like that being raised by community
I would have preferred actual code so I could point out the exact error
 
@dezso in the "mapping" question, why do you insert into the mapping table? Wouldn't it be better to just insert to users and emails, from your temp table? I thought your design was to avoifd the mapping table altogether, since the temp_table works for that, too.
 
@TomV makes total sense, might help someone in the future
@ypercubeᵀᴹ to be able to answer this, I should first understand what I answered there and why
 
9:11 PM
@dezso No worries. It's Friday night.
 
@dezso I'm curious which mod will review my flag on that question :)
 
Lets not talk SQL no more
 
> Comments resulted in an answer, please clean up dear mods, thank you, much appreciated. Mods like the better class of users asking nice and thanking in custom flags. We like our mods. Thanks again!
 
0
Q: RUNSTATS x REORG

LuizI'd like to know , whats the difference between , 1 - RUNSTATS ON TABLE 'mytable' WITH DISTRIBUTION AND DETAILED INDEXES ALL AND REORG INDEXES FOR 'MYTABLE' I dunno whats exactly right way to write those setences . But whats the matter difference between them ?

 
@ypercubeᵀᴹ NoSQL?
 
9:12 PM
I dunno where your setences end, and why you don't read that f* manual
 
@TomV Is that your custom flag?
 
@AndriyM yes
In case you missed
yesterday, by Paul White
So nice to get a please and a thank you on a custom flag. Better class of users here.
I intentionally attempted to overdo it :)
 
That's exactly why I thought it was a flag comment.
 
@Forrest haha
 
@ypercubeᵀᴹ Not sure who this new guy is, but he's funny for sure
 
9:16 PM
@Forrest reminds me of CQL
@ypercubeᵀᴹ you are good at it, can something be a relation while having only one attribute?
@TomV you don't even know if he is a she or not
 
@dezso Of course
Even with 0 attributes ;)
 
@ypercubeᵀᴹ aye
 
@dezso True
 
@dezso I've only heard of one person named Forrest, but it was a he.
 
@AndriyM that bearded one?
 
@ypercubeᵀᴹ and if there is only one attribute, can there be multiple keys?
 
Indeed, I am a "he." Thanks for letting the new guy hang around.
 
@Forrest New guys are welcome as long as they don't ask silly SSRS questions
 
@dezso No it has to be only 1 candidate key.
 
A joke you may not get, but there was a Mat kuch he kuch matics guy who overstayed his welcome a while back :)
 
9:23 PM
Either the (one_attribute) or the () (empty set of attributes)
 
@ypercubeᵀᴹ thanks, this was my understanding, too
 
@TomV SSRS is fine as long as not silly, and silly is fine as long as not SSRS
 
Ah...no, I'm not here to get questions answered, just to enjoy the presence of other DBAs
 
@TomV oh yeah
 
... and those who pretend to be ;)
 
9:24 PM
somehow disappeared
 
And those who don't even pretend
 
@Forrest A lot of us aren't even DBA, I'm not for example
Some are just developers
 
I gave some love to 4 unclear questions ;)
 
I'm not really a DBA at the moment. I just love databases [and have a rational hatred for MySQL]
 
Some are ERP consultants, the worst breed in this chat room
All they know how to do is tell silly jokes or troll @Lamak
 
9:27 PM
@TomV Is there a hierarchy chart somewhere? Dante's 7 layers of development would make a great office poster.
 
@TomV You forgot Photoshopping skills
 
@AndriyM I only did one, and I use GIMP
 
@Phil but you were for some years, weren't you?
 
The software used could explain the mediocre quality of the result
 
@TomV Sorry, I was thinking of someone else :)
 
9:30 PM
@AndriyM Oh, That's not a DBA either indeed, that's the village idiot
 
@Forrest Ha! I had somewhere made some notes about the Dante's 7 levels of hell, inspired by questiobns at the site (EAV, gapless IDs, Enums, BETWEEN-with-dates, denormalized desings, ...)
 
@ypercubeᵀᴹ I mentioned "Azure Stuck" to a MSFT rep today when he responded to a "when will dynamics cloud be available on prem" with "when azure stack is available"
2
 
But with development sounds cool, too. It would even be undesrtood by developers as well, not only dbas
 
he was not as amused as I was
 
@ypercubeᵀᴹ That's awesome. What was at the bottom?
 
9:33 PM
I thought it was hilarious just seeing his face
 
@Forrest I can't remember. Probably didn't finalize the chart.
 
Best of all, it was during a webex with a lot of participants in their chat box :D :D
 
@TomV I'm sure it brought some smiles to all the rest!
 
@ypercubeᵀᴹ yeah. Still devving on SQL Server & Postgres all day, and I do kinda look after the production DBs. Been doing loads of SAP stuff and web dev recently
 
@Forrest that's an idea
@TomV you mean PS is so much inferior to Gimp?
 
9:44 PM
@dezso I don't know, I use Gimp, I don't want to spend the money on PS or crack it for the occasional use
I like Gimp, don't know PS very well
I'm still very much an open source software user when not working
 
@TomV don't mention webex
I had exactly one phone conference ever the last week, was a nightmare (and not because the people talked German)
 
@dezso As i've mentioned before, when not working I'm using fedora
Ditched ubuntu years ago for the KVM/spice support
 
10:13 PM
@ypercubeᵀᴹ if i understand it correctly, the staging and the temp tables are the same (I even mentioned it somewhere in the answer)
 
10:47 PM
@MartinSmith @PaulWhite check the coment by Quandary and my last edit.
This put me on the right track. But it is still incorrect - the result is non-deterministic, so you couldn't use it for a computed column. Correct is: DATEADD ( day ,DATEDIFF ( day ,CONVERT( DATE, '19000101', 112) , mydate ) ,CONVERT(datetime2(7), mytime) ) — Quandary yesterday
Why does this happen?
> **: For some weird reason DATEDIFF(day, 0, d) is deterministic but DATEDIFF(day, '19000101', d) isn't!
 
11:11 PM
On phone, but only conversions from a string with a deterministic style are deterministic. Haven't followed the link, just based on what is here @ypercubeᵀᴹ
 
@PaulWhite OK but why is this deterministic?: DATEDIFF(day, 7, d)
which style is used in the implicit conversion of the int to date?
Oh, nevermind. I think I figured it out.
 
11:33 PM
Let me know either way. If not, I'll ping you next time I am at a computer
 
@PaulWhite I edited the answer with this (instead of the "weird reason" I put before):
> **: DATEDIFF(day, '19000101', d) isn't deterministic as it does an implicit conversion of the string to DATETIME and conversions from strings to datetime are deterministic only when specific styles are used.
 
11:52 PM
Right
 

« first day (2103 days earlier)      last day (2756 days later) »