I don't think this query is about TVPs so much as complexity. The plan has an optimizer timeout. You can see it in the F4 properties of the SELECT operator as "Reason for Early Termination of Statement = Time Out" or StatementOptmEarlyAbortReason="TimeOut" in the plan xml. These are not always...
Check out the heroic SQLfiddle on that answer generated entirely from the execution plan. Deserves some upvote love, even if the answer itself is not perfect and the question is an iceberg.
Let say I have table #Foo:
Id Color
-- ----
1 Red
2 Green
3 Blue
4 NULL
And table #Bar:
Value
-----
1
2.5
I would like to create table Result using simple statement to get:
Id Color Value
-- ---- -----
1 Red 1
2 Green 2.5
3 Blue NULL
4 NULL NULL
What I have invented s...
I'm writing a script that gets a count of rows for a few tables, however for some tables I want to only get a count of rows where a flag is set (in this case active=1). Is there a way I can do this in one query?
Eg:
Table users has a column called active
Table clients does not have a column c...
This section of Slick's documentation page is quite odd.
What is this zip join? It says that it means:
a pairwise join of two queries
but what that means @.@ I don't know
I've tried Googling for both "zip join" and "pairwise join"... but no results to do with databases.
I do get this f...
Makes little sense to me. Of course I also find little sense in expecting rows to be ordered in the same order they were inserted, but a lot of people think that is useful (or want it to work that way without having to add a column that could make that explicit)
I have created an Oracle Procedure which takes more than 100 seconds to execute only for the data of around 10k records.
After fetching the data from the main query, there are some conditions checked inside for loop after which values are assigned to variables and the same variables are used in t...
i love the open market where the presence of choice is available to any and all who have the capital to spend. like, for instance, my internet service provider. i have all the choice in the world. wait. i dont? i have to choose between tweedledumb and tweedlefraud? because of "municipality agreements" i can't have an "open" choice in this open market?
also: apparently there's going to be an expendables 3??? didnt realize there was a 2
So ... I kind of wanted to close this question as too-localized or something, but decided I didn't remember if we had a "canonical" version of this question/answer pair. Should we move it to Meta? Any thoughts on my answer and what should be said to improve it, other than "everybody has a different style, get over yourself"? dba.stackexchange.com/questions/68264/…
If we have a canonical version of this, I'll move my answer and we can close it as a dupe ;-)
(I mean, if there's not already a better answer, of course)
I don't know that would be hard. First of my dog is 14 and moving to another State would not do her well. I just signed a lease. I've got my whole family here. I fucking hate the Royals... :)
I have a table with ID (identity) and XID (int) which is my custom auto increment column. I am using an instead of insert trigger to maintain XID, but I am getting duplicates.
table
xtable (ID identity, XID int)
trigger - instead of insert
insert into [xtable] (XID)
select [x].[Nextavaila...
@Zane ... hate to break it to you but ... a) the dog's going to be gone soon, anyway b) leases are easy to break c) your family will still be there and you can visit them d) see previous comment about the Royals. nobody likes them.
@Zane Ok, so Dallas is still an option? :p Sorry to hear about the dog.
Mine is 10 and some change and all you people who talk about dogs being 14 and 15 make me sad and angry because I don't want to put her down even tho it's between 2 and 6 years away ...
The biggest reason I wouldn't leave now is I have unfinished business here. The people I'm making this large project for have been fucked around for about 8 years. I'm definitely not going anywhere until this project is rolled out. That's a promise I've made to a "customer" and I'm definitely not backing out on it.
If I did go I'd have to do it like today. I technically haven't given my lease back lol.
But to answer your question @billinkc Wells plans on giving me 10K over my current Salary. It would probably take 20/30 to get me out there under different circumstances.
@jcolebrand Hell no they stole the NorthStars!
:)
Oh and cost of Living is lower in KC so I'd have to Factor that in as well I suppose.
@swasheck also I've very close to my family. We have get togethers monthly.
Since you mentioned readability as a reason to not just simply use fully qualified names, and also mentioned that you aren't familiar with aliasing, I'm left to assume you're query looks like this.
select
serverA.Database1.dbo.TableName.ColumnExample,
serverB.Database2.dbo.TableName.Sec...
@Zane again, I understand. I was in the exact same situation on both of my previous teams. It is hard to leave when you are in that position but seriously consider if you are staying for the right reason. Most of the time it isn't.
@bluefeet But I also love my job it's not like when I stayed at Wand for too long out of some misguided sense of loyalty. I am very happy with my employer and hadn't really considered leaving at all until a how much would it take to get you out here offer was made.
@Lamak "I would recommend adding the .prior to the database in the server variable that way you can leave it off if it's a local server"
@Lamak I thought he should add that to the variable that way if he's not using a linked server it will still work.
With the agony displayed by every player who ever falls in soccer, it's amazing kids ever get interested - these players look like they're dying from a severed foot
Only saw bits of the USA/Ghana match. Right now it's annoying - TV is on behind me, and I keep turning around every time the crowd gets excited. Sadly, they get excited every time someone crosses the center line with the ball
Well, CYCLE essentially tells SQL Server you are okay with reusing values. I have absolutely no idea why you're having this issue, and don't know that you'll find out why (how much time do you spend investigating why you got a flat tire, before you just replace it?). I still think your best bet is to have a constraint there to prevent duplicates, and to turn off caching in hopes of preventing reuse. — Aaron Bertrand ♦1 min ago
@Zane i'm fascinated by the game ... but the obvious corruption that permeates it is just so distasteful. also why i dont like the nba and am increasingly disliking the nfl.
Currently I am facing issue with SSAS tabular cube. As soon as server restarts, the SSAS cube disappears. Every time server restarts, I have to restore cube everytime and process it again.
Please suggest a solution for this. Please let me know if more information is needed.
Thanks,
Yogesh Chaud...
+1 for not answering the question? Gordon sinks to a new and desperate low, I see.
+1 . . . But only because I don't think the answer deserves a downvote. It does answer the question. The sample result is inconsistent with the text of the question. — Gordon Linoff6 mins ago
ugh sour grapes. I mean the edible kind, not the other kind of sour grapes
because your answer doesn't scale
@bluefeet . . . You will get two of the values, which seems quite consistent with the sample results in the question. Would you downvote the answer for this reason? I don't understand the downvotes. — Gordon Linoff1 min ago
@ypercube DBA doesn't yet qualify for the Generalist badge. Your 40th top tag (foreign-key) only has 189 questions. Generalist cannot be awarded on a site until all 40 of the top tags have at least 200 questions. — animusonMay 19 at 14:46
Weird to me that Amazon is trying to get in on the phone market... It seems way late for that.
@bluefeet . . . You will get two of the values, which seems quite consistent with the sample results in the question. Would you downvote the answer for this reason? I don't understand the downvotes. — Gordon Linoff34 mins ago
Plztell that how to design a database for the shopping cart. i also want to know how to design table for the category and sub category.
tell the whole database design with subcategory specially
Just want to confirm what I read in BOL. Found client's physical server with single 6 core processor. Standard Edition is running on the server, which means it would only support 4 correct?
@bluefeet No need to explain. Even if he truly wrote it herself, they should have removed it, after seeing it's a duplicate. And I'm not really wondering about why the answers there have downvotes. I made some of them ;)
How can I create an event that fires ever 5 minutes in SQL-Server? I have been working with SQL in different forms for a couple of years but have never had to create a trigger. And believe it or not I only have currently mySQL books and that is not working exactly as I thought that it would.
I t...
@bluefeet . . . I disagree with your "scaling" comment. If a question is explicitly trying to pad things to two elements, that seems like a reasonable upper bound to me. — Gordon Linoff42 secs ago