Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 92411

All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag, like sql-server-2016, since it is often relevant to the question.

2
votes
1answer
I am looking to better build my SQL Development skill set. Where I work currently most all the data fits into a hierarchy and we almost always start with the top most element to work our way "down". …
asked Feb 26 by Kirk Saunders
3
votes
It appears to me that this was asked with a similar context in a StackOverflow Question. Using that as a foundation I think a Create Trigger will give you what you are looking for. CREATE TRIGGER db …
answered Jun 27 by Kirk Saunders
1
vote
I think the answer you need is exactly what ypercubeTM indicated you would need to do. If you modify the subquery (named B) to be just a SELECT of the grouping of those 4 columns. If you the join th …
answered Jun 13 by Kirk Saunders
2
votes
My guess is the question is something like: I have a table that looks something like this: +----+----------+----------+---------+ | ID | Status | Approved | Request | +----+----------+----------+- …
answered Jun 17 by Kirk Saunders
2
votes
Byron, Following our small conversation in the comments, I would recommend making a table structure change instead of trying to make a code change to accommodate this. I believe this is the solution …
answered Jul 3 by Kirk Saunders
1
vote
Talking with Mateus in the discussion he mentioned that he wants to avoid an insert onto the Animal table in this kind of instance if at all possible. As he and I discussed it is difficult since all …
answered Sep 11 by Kirk Saunders
3
votes
1answer
Question I have a query which outputs one column, created through a series of CASE statements. That same column is used as part of a CASE logic for a 2nd column in the same SELECT statement. If I …
asked Jun 20 by Kirk Saunders
3
votes
1answer
We are looking to use the SQL MERGE statement in SQL Server 2012 to handle data replication for a data warehouse that we have access to from the manufacturer of a 3rd party application we use for data …
asked Apr 18 '16 by Kirk Saunders
0
votes
2answers
We have a situation where effectively the same report is requested by different customers but they: Don't want all the columns Want the columns in a different order than we naturally have them Want …
asked Jul 12 by Kirk Saunders
1
vote
2answers
We are in the process of building out a database for a new application. I got some feedback from the architect that he read somewhere there is a memory utilization benefit for having all of the non-n …
asked Jun 6 by Kirk Saunders
2
votes
1answer
When multiple selects are used in a UNION/UNION ALL are the table locks for each individual SELECT statement handled individually or are all table locks held until all SELECT statements are completed? …
asked Nov 30 '18 by Kirk Saunders
2
votes
So it looks like to me what you are missing is the "Return only the top Created record for each instance". So you are getting all rows, and then watever its top Created value is for the same SomeInfo …
answered Jun 14 by Kirk Saunders
3
votes
So this isn't exactly what you are looking for, but it may help. I provided an answer to a separate question asked last week. Very similar queries, vastly different performance In this question t …
answered Jun 28 by Kirk Saunders
3
votes
1answer
I think I have found the answer for this already but I am hoping to get some additional perspective. Assume we are JOINing two tables together on a shared column and each table then has a different c …
asked Oct 29 by Kirk Saunders
0
votes
0answers
We have a Table Value function which: Creates and Populates a table variable (@Temp) from a SELECT Runs two different UPDATE statement to change values on 2 different columns in @Temp Populates the …
asked Feb 12 by Kirk Saunders

15 30 50 per page