« first day (1527 days earlier)      last day (3639 days later) » 
00:00 - 19:0019:00 - 00:00

00:14
"Check out my book Data Analysis Using SQL and Excel"
00:33
If @bluefeet is about, this SO question needs closing because the OP is dumb: stackoverflow.com/questions/28974109/…
01:09
YAY HIGH SCHOOL!!!!
 
1 hour later…
02:11
@Phil done
hiya @bluefeet
02:48
@swasheck hiya
 
6 hours later…
09:11
THANKS PHIL! THIS SOLUTION SAVED MY DAY! LOOKING FORWARD TO LEARN MORE FROM YOU! :) — Nico Pratama 6 hours ago
2
09:48
Did we get a shipment of users from SO?
See this one. They tag with postgres, then after 2 people have answered:
I am using Teiid VDB, it doesn't support Recursive WITH clause. — lourdh 17 mins ago
10:11
@ypercube He's my number 1 fan
We are the Prats religion. Our deity is @Phil ;)
@PHil, sorry to bug you again.
But does this answer really deserve -4 ?
-2
A: How do I get the difference in minutes from 2 timestamp columns?

Dirkselect round( (cast(current_timestamp as date) - cast(<other_timestamp> as date)) * 24 * 60 ) as diff_minutes from <some_table>; This is what I used to calculate the difference between the current timestamp and a heart beat table entry for latency monitoring.

I tested at sql-fiddle and casting to date does not cut off the time part (as I thought first).
So, it seems to be a valid way to solve the issue.
@ypercube Not much I can do to reverse others votes
@Phil Yes, off course. I had a comment that was misleading. deleted now
10:39
@JackDouglas ha, edits :P
@Phil nothing personal ;)
Wasn't me that added it :P
oh year - didn't notice that
 
1 hour later…
11:54
1
Q: Is it a good idea to create an index for each column in a new table?

Rafael PiccinelliI will short my question. (SQL-Server 2008) Is it a good idea , when crating a new table, to create an index for each column? Why i'm saying this? Today I was creating a database, and my boss was behind me, and he said: "Oh, it's good to create an index, for every column" (and then he showed...

Index everything. Says the boss ...
12:11
ah, bosses
JNK
JNK
Next month "Why do relational databases take so long to write data? We need to get MangoDB!"
JNK
JNK
13:09
good grief, every time I look into our old pages and how they interact with the DB I get a few more gray hairs
I saw a stored proc I hadn't looked at before as the victim of a deadlock last night so I am digging into it
This procedure hits like 3 heavy transactional tables, several lookup tables that are still heavily hit, and uses several scalar udfs on some of its 30ish columns to do things like convert timezones and whatnot
I look into the web code and the ONLY thing we need from this procedure is a single Id
so like half the joined tables are completely unnecessary
all the scalar udfs are unnecessary
SSDT VS 2013, where in the name of everything holy and good did source control explorer go?
Am I just completely overlooking it?
@JNK all scalar udfs are unnecessary
they should die in a fire
JNK
JNK
13:30
@KrisGruttemeyer I agree
was telling boss about it yesterday and he was like "But encapsulation is a best programming practice!"
I said "not in SQL Server it's not"
They have this aversion here to making tables for things
they wanted to store preferences for something in a regex
b/c they were worried about having a couple thousand row 1:N table for it
@KrisGruttemeyer @Kris It's a plugin for SSDT 2013
@MarkSinkinson Yeah, just got to that part, thankfully it blows up when i try to start it
JNK
JNK
I did it manually
for some reason the rollback function wasn't working
yeah, it wouldn't let me roll it back.
to meta I go!
@mmarie Thanks, I'll give that a try and see if it works. Not having much luck today with VS13, keeps fighting me
@JNK I tested it again and it let me roll it back now.
weird
Something weird happened indeed.
I voted for closing because when I saw the question, it only had one line:
> How do I write a query for making the instance of a table in and tell me about the use of like?
The whole code part was not visible at all.
13:55
@KrisGruttemeyer GIVE IT A TRY!!!
@Lamak Waiting for it to update. All kinds of excitement happening here right now, haha
I was just messing around
using Rolando's signature
14:17
@mmarie That did it, finally have it back. I'll make sure to mark that as answer, ha!
Thanks a bunch
@KrisGruttemeyer :-) You're welcome. I just had to do that myself so I had the link handy.
@mmarie Exactly what I needed, glad you had that link around!
GOOGOL NEARLINE IS HERE!!!
(what does that even mean?)
14:33
what?
@swasheck Well, hello to you, too.
@Lamak exactly
@mmarie hello to you two, too
@swasheck I see
@Lamak i'm glad we had this conversation
@swasheck me too
15:07
Crikey, Oracle certifications are a b'stard. They force you to go on a £2500 course :( x
nobody pays full price
They don't pay full price for software licenses, not sure about courses. Well pricey.
lazy
-1
Q: Relational Algebra

jhonI just want to check my answers and for last one I need help with it. - thanks

i hate it when i close the wrong, unsaved window in ssms.
15:23
@swasheck that means that you also chose to not save after closing it
@bluefeet so now Uber is the basis for the relational algebra class. gotta stay relevant, i guess
@Lamak yes. i just assumed it was the one i wanted to close, not the one i didnt want to close
@bluefeet I don't really remember relational algebra
@swasheck tough luck
@Lamak indeed. thanks for the sympathy.
> please allow me to introduce myself
i'm a man of wealth and taste
i've been around for a long long year
stole many a man's soul to waste
What's your answer, even better what's the question? Right now this isn't really a question and more like a "do my homework for me" request. — bluefeet 30 secs ago
@swasheck why are you introducing yourself?, we know you. Though I didn't know you where a man of wealth and taste
15:28
@swasheck This is why redgate SQL Prompt is useful. Saves a history of all tabs for when you/I foolishly close them
@Lamak 'tis a song ... and i'm not
@Lamak this is the mysql @swasheck today, we don't know him very well so he needs to introduce himself
@swasheck don't be ridiculous, I know you are not a song
@bluefeet bizarro swasheck
@MarkSinkinson we have it ... however their licensing model is crap and i can't use it (anymore) until someone deallocates a license
@Lamak @bluefeet this is spiraling out of control. i just said "thanks for the sympathy" which reminded me of Sympathy for the Devil
i am both offended and hurt by the baseless accusations that implicate me in any wrongdoings by way of involvement with mysql
sorry @swasheck
15:34
@swasheck Ah, shame.
15:47
Ok, I need to bitch about the disappointment that is the new power bi and I think you guys will understand... First they finally made the SSAS connector so we can talk to on-prem tabular models. This is great, but this first version, it keeps the permissions of the user who creates the data viz. So all of the permissions you build into the cube are worthless.
Then they publish how they are making it work. You have to connect the Power BI SSAS connector using a Windows account that has SSAS (instance) admin access. And it's actually storing your password, so when it expires you have to go in and update it. Then when a user connects it's just using effectiveusername in the connection string.
I get that we are supposed to be excited to get access to on prem data sources like this, but seriously? What company would use this?
FTFY: "So ... the cube [is] worthless."
@swasheck oh silly dba. cubes can be very useful
@mmarie as useful as my columnstore indexes
Sometimes more.
cubes aren't just used for aggregation
@mmarie one that isn't very secure
15:51
@mmarie orly? ;)
Half of my clients are still scared of the cloud. This isn't going to convince them to use Power BI.
@mmarie damn clouds
@Lamak just bring rain
I guess this is the new version of setting up PerformancePoint to use per user security through Kerberos. There was always a fight with the DBA because it required 5 services accounts and some of those needed admin access.
but at least that ended up actually using the permissions you set in the cube. This one just bypasses them.
OK, /rant
Always hate fighting with security people about service accounts :/ Had a pre-packaged app that required the DBA role for its service account. Was no way around it, unless we paid for software certification (ie: pay them to re-test and fix anything that broke). Right pain in the arse
16:02
@mmarie, but if it uses the effectiveusername, doesn't it work correctly?
@bluefeet what do you expect from someone who can't spell his own name ...
> Ireland rushes new law after inadvertently legalizing ecstasy
@swasheck Let me check the next flight to Dublin ;)
@swasheck Yes. The main claim to fame of cubes is that you can embed complex business logic in them. For example, you can embed context-sensitive F/X rate conversions (e.g. P/L and Balance sheet accounts using different F/X rates), running sum calculations, recursive queries to find the 'last' item of interest to measure times, 'percent of total' computations that skip around contexts, 'top n' sets with an automated 'and the rest' grouping and much, much more...
@Gonsalu No. it only sets the effectiveusername when the report is published, not when a user opens it. blogs.msdn.com/b/powerbi/archive/2015/03/11/…
16:28
wow blackberry 10 sucks.
@mmarie ah... so there's no way to get dynamic security working with it?
@Zane wow, that's a brand I haven't heard about in years
@Gonsalu not at this time
@mmarie well, that sucks
I can't believe this first query works
0
Q: PostgreSQL - combining WITH and CASE WHEN

Piclmy question is some kind of extension to Erwin Brandstätter's excellent answer in this thread on the correct use of WITH. My old query looks like this: WITH x AS ( INSERT INTO d (dm_id) SELECT dm_id FROM dm, import WHERE dm.dm_name = i.dm_name RETURNING d_id ), y AS ( I...

why would you insert in a select like that?
16:42
just because
is stored procedure or trigger effective?
I don't even understand what the heck they are doing
> Data modifying queries using CTE are possible with PostgreSQL 9.1 or later.
@hilmanshini what?
JNK
JNK
@bluefeet yikes
I only ever do DML with a CTE for stuff like deleting dupes
i.e. WITH Ranked AS (SELECT RN = ROW_NUMBER() OVER (Partition By SomeKey), * FROM MyTable) DELETE FROM Ranked WHERE RN > 1
16:44
i am lecturing some class, and now i decided to skip stored procedure and trigger curriculum because i know when some people word as programmer , stored procedure and trigger is not barely used, because its much better for programmer to put the SQL inside a program rather than put it as stored procedure or trigger, am i right?
not word, sorry but work
stored procedures are barely used, I think that it's really not true
triggers are sometimes frown upon mostly because there are people that think that they are the answer for everything
JNK
JNK
@hilmanshini absolutely not
why not?
@hilmanshini I whole-heartedly disagree
@hilmanshini because stored procedures are vastly used
and they are certainly better than put the SQL inside the program
16:48
We use SPs everywhere. For security, manageability and troubleshooting they are the obvious option.
@hilmanshini this just screams "SQL injection"
@Lamak Absolutely, 100%, without a doubt
you mean it worries about security?
JNK
JNK
Stored procedures allow code reuse, they allow much more complicated processes than are easily done in inline sql
they allow plan reuse
they allow more granular security and permissions
16:49
What happens if one of your queries generated in the application starts behaving badly? As a DBA, i cant access the code directly as your app is generating it. That means YOU get a call at 2am to fix, recompile and redploy your app
JNK
JNK
If you do all inline sql, the user your app runs as needs full rights to all your tables
If it happens during the workday, the consequences would be far worse than if you just went into a SP, made 1 change and BANG, its deployed
for me debug is easier with SQL that stored in program
instead of calling the name of stored procedure
but yeah looks like i need to continue to lecturing stored procedure and trigger
ok i have another question
is DBA used for only big scale application?
DBAs are needed for so many other reasons than applications....
I don't think a DBA is really for an application.
16:59
for instance, to have meaningful chats
It's a database administrator, so DBA's main job is at the server side.
of course it need application
so that mean end user will execute SQL plainly?
@hilmanshini No. A good DBA is paying attention to several databases, large and small, to make sure the environment is running well and has room to grow, in addition to helping deploy code to environments.
@hilmanshini what do you think a DBA is?, I think that we may be talking about completely different topics
yeah i completely dont know how DBA works
i am programmer and i dont know what role is DBA
17:01
Database administrator
if i have one application and say its completely working, what should DBA do?
nothing is ever done, even though it is working
there are always improvements that can be made to everything
@hilmanshini like giving you a light smack for suggesting to use plain SQL in the application
Data grows. Data moves. It affects performance.
17:03
saying you'll never have to make improvements is like saying we never needed to get new safety features in cars.
things can always be improved on
that's part of engineering software, etc
sorry for offensive argument lamak but idont mean that
Constant improvements, some little, some big. Speaking for myself, the number 1 thing is backups.
A DBA is only as good as his tested and verified backups
@hilmanshini hey man, I'm joking
oh lel
oh ok i get that, backup and maybe maintenance of data
@AndriyM it's the circle of liiiiiife
17:05
seriously though, you seem to have a lot of misunderstandings about databases and SQL ("stored procedures are barely used", "better to use plain SQL", etc), that points to you really needing a DBA
there is always query optimizations, indexing, etc that could be done
was wondering why i couldnt see what @Lamak was joking about. then i remembered that i'm glad as to the reason
21 mins ago, by hilmanshini
i am lecturing some class, and now i decided to skip stored procedure and trigger curriculum because i know when some people word as programmer , stored procedure and trigger is not barely used, because its much better for programmer to put the SQL inside a program rather than put it as stored procedure or trigger, am i right?
hmmm k i get that
@Lamak i'm going to block you too if you dont stop
17:06
lel
but mostly i do that because query is dynamic
@swasheck aw, don't be mean
@hilmanshini hence the screaming about "SQL injection"
i mostly put SQL inside program because its dynamic
why would you need mostly dynamic SQL
because client want to
@hilmanshini I'm fairly certain that your SQL isn't quite that dynamic and can be parameterized. You're likely just being lazy.
3
17:07
@Lamak i'd never block you
@swasheck The funny thing, it also makes the DBA move (either around or on) :) And potentially grow too (professionally).
@AndriyM did you just call me fat?
JNK
JNK
If you TRULY need that much dynamic sql then you have a design problem.
@swasheck that's reassuring
@MikeFal i cant even read the conversation and i agree with this
JNK
JNK
17:08
What you PROBABLY need are dynamic parameters and filters, which are easily encapsulated in a stored procedure.
@swasheck Ha, I didn't expect that :)
JNK
JNK
If your table and column names change depending on parameters that are passed in then you have a design issue.
@swasheck I seem to not remember your first interaction with him
yeah last project i cover is to make a CSV published and client want to publish based on date, saturday only , monday only , mon to sat, and also sat only and it has 4 sub categories , monthly, average, total, and each data, and it has categorized again with normal and big car
@Lamak sounds like it was similar. belligerent resistance to advice. ask for help - say that the help is wrong.
17:10
What JNK said. Unless your application is a DBMS.
if i calculate it must be 4x5x4x2 = 160
if i should make query , i must make 160 stored procedure in MySQL
I don't see the need for dynamic SQL in this scenario
JNK
JNK
@hilmanshini but really you are talking about 4 parameters
@swasheck I see
JNK
JNK
@date, @weekday, @subcategory, @cartype
that's it
17:11
yeah its dynamic right?
JNK
JNK
you pass in parameters to the stored proc
@hilmanshini no
it will be more complicated
@hilmanshini do you know what dynamic SQL is?
JNK
JNK
I think you believe it will be more complicated
I don't think it's true
17:12
this is awesome
@swasheck I'm glad we are entertaining you
i'm envisioning @JNK and @Lamak yelling at themselves in a mirror
@swasheck How do you know I did that?
JNK
JNK
I have stored procedures that do stuff a lot more complicated than what you are describing and do it with a limited set of params
17:13
@swasheck they have no power here!!
hmmm :\
that's what you think
that's my secret, I never think
or is that @billinkc's secret?
JNK
JNK
@hilmanshini so if you have specific design or implementation questions feel free to ask them on the site
17:17
oh, jeezus
@Lamak you should see what i just got
insert table (a) values ('a');
insert table (a) values ('a');
insert table (a) values ('a');
insert table (a) values ('a');
...
begin transaction
commit
what?
JNK
JNK
@hilmanshini yeah you need a dba
@swasheck This is SO stuff.
@ypercube these are my devs.
@Lamak yeah. hurrrrrrrrrrrrrrrrrrrrrrrrrrrrr
@swasheck bwahahahaha
@swasheck was that....real?
@Lamak yes. very real. well, i was lazy and copy/pasted the inserts over and over (they all had different values) ... but the point was the end
@hilmanshini dude, really, no one here is gonna go through all that code
2
@swasheck We have to them a +1. They use ;
17:22
@swasheck that was the part I was talking about
@Lamak use the block, @Lamak
@Lamak I looked at it
then closed the tab
@ypercube eh?
JNK
JNK
@swasheck my boss did something similar once because that's how a data migration tool wrote the inserts
@bluefeet same from me
17:23
steps away from the awful code
JNK
JNK
I got as far into that pastebin as seeing LEFT JOIN table t ON ... WHERE T.Something = something
and realizing the person that wrote it doesn't understand relations
@swasheck They terminate the (insert) statements, I mean. About the transaction ayyyyy, ......
some client are crazy , they want CSV as SQL
JNK
JNK
@hilmanshini there's much better ways to do that
but like I said, if you have a specific question feel free to ask it on dba.se
@Lamak I can't click that link....
17:24
Can you spell SQL Injection?
@Zane block the user
@ypercube i see ... now i can parse your statement
@hilmanshini getting CSV from a database doesn't sound that crazy
@MikeFal mysql?
Oh I suppose I did do that.
@MikeFal that's what I've been repeating
@Zane lucky you
17:24
yeah but when csv has so many redundants data its crazy
@JNK I think he believes that this chat is dba.se
JNK
JNK
@Lamak unfortunate if true
but surely
oh yeah, and i got one question again
anyone know about noSQL?
17:26
@hilmanshini but surely......what?
i mean surely this client is crazy
JNK
JNK
@hilmanshini yes we know of it
whats differences between SQL and noSQL?
@hilmanshini did you google it?
@hilmanshini why?, this seems like a job for a simple report
17:26
2 chars
2
yeah
i did that
but i dont see the similiarity between them
and what did you find?
JNK
JNK
they aren't that similar
they both store data
@hilmanshini and yet, you are asking about the differences?
it says mapred is differences
SQL has no mapred
but noSQL has
and i dont know how indexing could work in noSQL
we know we have btree for indexing algo
but nosql ?
and also we have a design database model in aproach with OOAD
17:28
I think you need to do some research
but how about noSQL?
@ypercube 1 cup
JNK
JNK
@hilmanshini NoSQL has a lot of different implementations
that's too specific a question about too generic a concept to be answerable
any source i can use for learn nosql?
JNK
JNK
It's like saying "I read that the difference between cars and motorcycles is the number of wheels"
There's a crap-ton of other differences too
17:30
@JNK I read that too!!
@MikeFal you are far too nice
I am
It's true
JNK
JNK
He's In-fal-ably polite
3
oh ok, thanks mike
but that book is too expensive to afford, i will try to seek it
17:31
....
psst torently
flies away
JNK
JNK
you realize you've wasted at least $30 of your time in this chat room asking us non-specific unanswerable questions that the book would address, right?
4
And ignored
$30 is half month salary of lecturer here
@JNK increase that by including our time that was wasted trying to answer
17:33
i think its meaningful
@JNK That's quite possibly the worst attempt to use my name in another word I've seen a long time.
2
thanks anyway
@hilmanshini Welcome
Live long and prosper
flies away
JNK
JNK
@MikeFal I'm sorry if it was a FALlacy. I meant Xero offense.
17:49
I fear I have missed much
@billinkc not really
@JNK Heard the first have before. The second? Well played....
@JNK is so punny today.
JNK
JNK
@bluefeet I'm in a pretty good mood this week
it's been above freezing for like 3 days straight
What, did the DBA get fired or something?
17:53
is the DBA on vacation?
JNK
JNK
lol
No but I may have organizational changes
In the short term I'm getting the CIO's office while he goes somewhere else
so I'll have an office with a window and a DOOR
@JNK a mutual friend calls @MikeFal "Fail" ... that's not nice and i'm sure he's never heard it
JNK
JNK
right now I'm in the "bullpen" which is basically a room with desks on the outside walls and me and 4 other developers in it
@swasheck @MikeFal How about "Do the needFAL?"
@JNK Oh God, that's awful
So awful that...
OH: Do the needFAL.
@JNK Only 1 window? When will you get upgraded to Windows?
18:04
@ypercube This was the perfect ending to reading the transcripts.
many happy endings
please vtc
-1
Q: Need Help converting object models and normalizing relations

Jeff DudaPart one: Convert the object model found below to a set of normalized relations. Rules:Individuals can share phone numbers. Part Two: Normalize the relation found on the document under Part Two. 1

Fox 2 away
@bluefeet Wow. Eff that guy.
One more vtc vote!
18:26
Sorry don't have one there.
Surely you can spare one for this turd
-1
Q: Multiple people working on same SSIS Solution

Debpriya SealWe are developing a DW using SSIS. We are 4 people who are developer for SSIS code. Even though we have a seperate package for every table. We are still not able to work on same project solution. I thought until we are not working on same package we should be good. Can someone tell me whether it'...

"You should each work from your own copy of the sln and proj files."
Yeah! My first VTC.
There will be many more to come
@Zane You have taken your first step into a larger world.
18:34
@Zane has his big boy pants on
I don't get it. But then I don't like coffee. :)
I like it
:D
I'm no good in the morning until cup #2
00:00 - 19:0019:00 - 00:00

« first day (1527 days earlier)      last day (3639 days later) »