Reputation
4,425
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 14 34
Newest
 Suffrage
Impact
~168k people reached

5h
comment How to get max sequence of rows?
Possible duplicate of Select longest continuous sequence
19h
comment how to calculate difference of first row and last row fields value in each group
@ypercubeᵀᴹ: Good idea, thanks!
Feb
11
comment Increase date by 1
I see, but then you'll have the same issue with the DATE_ADD in your query. Anyway, that's resolved easily using DATE(): DATE_ADD(DATE(s.proddate),INTERVAL '22:30:00' HOUR_SECOND).
Feb
11
comment Increase date by 1
I'd probably replace the CONCAT bit with DATE_ADD(s.proddate,INTERVAL '22:30:00' HOUR_SECOND) as both a cleaner way and a more consistent one with the other expression.
Feb
11
comment Install Express/Standard side-by-side
Work with Multiple Versions and Instances of SQL Server. That manual page doesn't make distinctions between different editions of the same version, but from my personal experience I can tell you I've had no issues running an Express and a Standard alongside each other (although they were 2008 R2, not 2014).
Feb
10
comment Question about 'mysql error 1064'
What is "change column definition" as opposed to "changing a column"?
Feb
9
comment How do we convert SQL Server query to MYSQL?
It's unclear what you are asking. What specifically about IF (SELECT ...) is confusing you? Is the problem with the IF part or with the SELECT part of the syntax? Or is the problem with the query itself? Please clarify.
Feb
8
comment SQL Server Concurrency Issue
Maybe different processes shouldn't be working with the same isModified = 1 subset. Maybe you could create a SQL Server Agent job that would do all this at regular intervals. Or maybe you could take a different approach altogether instead of using isModified. Knowing what the "whole bunch of JOINS" are might help. Or it might be completely irrelevant, but you could start with a short explanation of what these five statements are doing, in essence.
Feb
5
comment How to relate a [ parent common] table with (possibly many) subtype tables?
@StixO: If you are struggling with making your verbal description perfectly clear and unambiguous, perhaps you could update your question with examples (data samples) illustrating what is and what isn't possible in the set-up you are trying to implement.
Feb
5
comment How to relate a [ parent common] table with (possibly many) subtype tables?
My understanding now is that any one row in SystemCommon is to be related to just one row in just one of the four SystemType tables. Is that correct? If so, this looks like a case of table inheritance to me. I'm sure I've seen questions on this topic (some of them with great answers by @MDCCL too), but I'm still struggling to find one that would best fit your scenario (and also contain an example of implementation), without irrelevant details so as to make it less confusing for you.
Feb
5
comment How to relate a [ parent common] table with (possibly many) subtype tables?
Perhaps I'm missing something but why are you talking about parents and types? Is the Parent table supposed to be a parent to a (sub)type table or is it a parent to a completely different table? If it's important for us to know that the table with which you are trying to associate a SystemType table is a parent table (to something else), please show the relevant parent-child relationship. But if a child table is irrelevant to the problem, then please don't use the term "parent", that's just confusing. I mean, if I knew why that was important, I might understand your issue better.
Feb
5
comment What is the correct way to rename/swap a table in production
Or maybe you could elaborate in your question how you did the renaming (exactly what commands or tools you used). All the more so since you've already been pointed to a couple of renaming methods.
Feb
4
comment Fatal error when not numeric value - PostgreSQL 9.2
You could have spared people's time by not posting your question until you got the complete information.
Feb
3
comment Counting outdated records
I wasn't clear, sorry. JSON is fine when you are dealing with JSON. But when you are dealing with tabular data, the tabular form is most convenient to work with. Please take a look at these various questions to get the idea about what I meant by "data sample", "current result", and "expected result": 1) dba.stackexchange.com/q/42841/6965 2) dba.stackexchange.com/q/111624/6965 3) dba.stackexchange.com/q/122226/6965 4) dba.stackexchange.com/q/80315/6965 5) dba.stackexchange.com/q/123401/6965
Feb
3
comment Counting outdated records
Your goal isn't clear at this point. Could you please post a data sample, the result your current query would give you, and the expected result?
Feb
3
comment How to compare dates on minute level in plsql?
@Phil: Or perhaps TRUNC(sysdate, 'MI') instead (since it's sysdate <= column and not the other way round).
Feb
3
comment ERROR: check constraint is violated by some row
Or like this: WHERE ("qb_id", "xero_id", "freshbooks_id", "myob_id", "ppy_id") IS NOT DISTINCT FROM (NULL, NULL, NULL, NULL, NULL).
Feb
3
comment Get start time and end time of a trip in SQL Server
It'll be great if you show us what you have tried. That way you may be more likely to learn something new rather than just get another proverbial fish for a day.
Feb
1
comment Why does the first query scan and the second seek?
You could post it at pastebin.com and link to it in your question.
Jan
29
comment Query with join to a table on a different database need an index
If the indexing route is no go (since you don't have the necessary permissions), perhaps we could take a look at the actual query?