Viewing 15 posts - 5,761 through 5,775 (of 8,731 total)
Basically the same thing as Alan. I just wanted to note that it's considered best practice to post DDL and sample data in a consumable format, as well as expected...
September 30, 2014 at 9:36 am
My translation:
Hi, I have the following inconvenient with a table with 9000 rows, which in theory is not a big table. When a SELECT is run on this table is...
September 30, 2014 at 8:41 am
I didn't realized that you had the date twice with different format and one had time. Here's a different option:
"aSNAP_Data_" + REPLACE( SUBSTRING( ((DT_WSTR, 29) GETDATE()), 1, 10), "-", "")...
September 29, 2014 at 5:58 pm
Luis Cazares (9/29/2014)
To get the code block, you use the IFCode tags [ code="sql"][/code] (without the space)
Actually, this:
DATEADD(WK, DATEDIFF(WK, 0, TestDate - 1) - 1, 7)...
September 29, 2014 at 5:36 pm
Something like this?
"aSNAP_Data_20140929_P-" + (DT_STR, 4, 1252) YEAR( GETDATE()) + "-" + RIGHT( "0" + (DT_STR, 2, 1252) MONTH( GETDATE()), 2) + "-" + RIGHT( "0" + (DT_STR, 2,...
September 29, 2014 at 4:31 pm
You could try the formula yourself. I wouldn't use a date that far away.
SELECT comment,
TestDate,
dateadd(dd,((datediff(dd,'17530101',TestDate)/7)*7)-7,'17530101'),
dateadd(dd,((datediff(dd,'17530101',TestDate)/7)*7),'17530101'),
...
September 29, 2014 at 4:16 pm
You should try the DelimitedSplit8K. You can find information on how it works and how to use it (along with the code) in here: http://www.sqlservercentral.com/articles/Tally+Table/72993/
September 29, 2014 at 3:22 pm
Maybe something like this will work, but your description makes it confusing.
UPDATE a SET
Units = x.Units,
TotalTrigUnits = x.TotalTrigUnits
--SELECT *
FROM #Tracking a
CROSS APPLY(...
September 29, 2014 at 1:42 pm
I'm not sure if using SET SHOWPLAN_ALL is a valid option for your case. Maybe you could query the XML from the plan.
But, I wouldn't use this approach as the...
September 29, 2014 at 12:36 pm
Revoke create and alter permissions and create policies to apply changes to the database. People will start to do things right when they're enforced.
September 29, 2014 at 11:16 am
You could also try this basic tips: 45 Database Performance Tips for Developers.
The book recommended by Koen is more complete, but this one can give you some basic performance principles...
September 29, 2014 at 9:33 am
If it's urgent, I assume that you have tried something. Please show us what you've tried and we'll help you from that. It's considered polite to post the sample data...
September 29, 2014 at 9:13 am
It's possible but it might not be legal.
Extract from ApexSQL EULA:
C.Excepting authorized users of You, the Licensee, as provided by this Agreement, You may not distribute, publish, or otherwise...
September 26, 2014 at 3:39 pm
Yes, there is. you can read about that on the articles in Sean's signature.
However, I agree with what Sean has told you multiple times. You need to fix your non-SARGable...
September 26, 2014 at 2:18 pm
SSMS won't return more than 8000 chars. You could use substring to review the complete code.
September 26, 2014 at 1:17 pm
Viewing 15 posts - 5,761 through 5,775 (of 8,731 total)