Viewing 15 posts - 2,566 through 2,580 (of 13,469 total)
this is just a variation on what you posted, butI see the delay is the WHERE Clause, 18 seconds for a server with 62 databases
but i don't have very many...
February 6, 2014 at 5:43 am
i think a field with a SUM+CASE statement would do the job:
SUM(CASE WHEN order_date > 2012-01-15 THEN amount ELSE 0 END ) OVER (PARTITION BY customerid )
--this passes 2012...
February 5, 2014 at 3:27 pm
here's what i think you could do:
use powershell to check out a folder, and then script out any objects.
then use powershell again to add any new items, and check in...
February 5, 2014 at 2:04 pm
YSL i just created one and scripted it out for you.
This example is filtering for a specific databaseID (18) , for a specific user, and ignoring any '%exec sp_reset_connection%' commands...
February 5, 2014 at 1:50 pm
would you consider adding a CLR procedure that gets the data instead? that seems like a much better way to go.
February 5, 2014 at 7:05 am
i don't believe the permissions are that granular, so I don't believe you can do what you are asking.
AFAIK, there is no owner for a linked server either.
it's very...
February 5, 2014 at 6:11 am
why don't you just decrypt the stored procedure instead?
February 5, 2014 at 5:46 am
want to use a remote server, but don't want a linked server? I'm with Sean, your dismissing the #1 tool without an apparent reason.
openrowset is disabled by default, whereas linked...
February 5, 2014 at 5:43 am
performance wise, this would be a little better, since the OR statement forces a table scan, and this would/could take advantage of existing indexes instead.
but it's effectively the same approach.
SELECT
...
February 4, 2014 at 10:42 am
first stab at the issue:
SELECT OrdersTest.*,
CASE
WHEN RTRIM(ISNULL(OrderNo,'')) = ''
THEN 'Blank Order Number'
ELSE
''
END AS OrderNumberIncorrect,
CASE
WHEN ISNULL(PalletCount,0) =...
February 4, 2014 at 10:34 am
SQL is really good about not caring about the order of things, the order of columns, the order of data are not relevant to SQL, so having the PK as...
February 4, 2014 at 10:11 am
for that specific query, that index is not a good match for a parameterized query
a new index, something like this would probably work immediately for your existing query and...
February 4, 2014 at 8:06 am
there's a lot of logic holes in here; are we trying to find the fiscal start date or something? is the 05 date a copy paste err, and it should...
February 4, 2014 at 7:40 am
what is the definition of the index?
your query has three columns in the WHERE statement, is the index on all three columns?
since you are doing SELECT *, at a minimum,...
February 4, 2014 at 7:02 am
Viewing 15 posts - 2,566 through 2,580 (of 13,469 total)