Viewing 15 posts - 7,246 through 7,260 (of 7,602 total)
Sean Lange (9/5/2012)
I don't think I agree that you should just add a trigger to trim spaces but we can agree to disagree here.
To me that is vastly better than...
September 5, 2012 at 2:51 pm
I think you avoid all the CROSS APPLYs, as below.
As written the code just ignores anything beyond 24 hrs, but if you needed to, you could add a check for...
September 5, 2012 at 2:28 pm
oradbguru (9/4/2012)Due to application limitations, there can only be the one existing filegroup.
Thank you
?? Not sure I follow. Applications should be completely unaware of any filegroups in SQL...
September 5, 2012 at 1:22 pm
You should use a trigger to trim the data during INSERTs and UPDATEs -- NEVER let poorly formatted data be queried directly from the database.
Personally I don't see anything wrong...
September 5, 2012 at 12:41 pm
Since the table already contains the previous year's YTD totals, would a simple LEFT JOIN suffice to get the prior year's YTD total?
SELECT
t1curr.cod, t1curr.[year], t1curr.[month], t1curr.value,...
September 5, 2012 at 12:29 pm
GSquared (12/14/2009)
BaldingLoopMan (12/14/2009)
To each their own.
Even in cases where the data type precedence won't cause a problem, I find the Coalesce version below much easier to read, understand, and maintain,...
August 28, 2012 at 3:45 pm
Any of that seems like overkill to me for the specific problem stated. Why not just?:
SELECT
name,
ISNULL(MAX(CASE WHEN type = 'typeB' THEN...
August 28, 2012 at 3:08 pm
winston Smith (8/28/2012)
But you can make a clustered index based on only a small number of columns in...
August 28, 2012 at 2:36 pm
Make sure the statistics on all tables are up to date -- obsolete statistics could cause SQL to choose the wrong type of join.
Of course SQL sometimes chooses the wrong...
August 24, 2012 at 10:39 am
You should be fine with a single table provided you cluster the table by:
( [Time], MnemonicId ) --if I understand Mnemonic id correctly, as the original telemetry data src
Uniqueidentifiers are...
August 20, 2012 at 9:23 am
CREATE VIEW permission denied in database 'MWC2'
Looks to me like there is an explicit DENY of CREATE VIEW permissions somewhere.
DENY will override/"cancel" an equivalent GRANT.
August 20, 2012 at 9:19 am
Kenneth.Fisher (8/20/2012)
August 20, 2012 at 9:06 am
It should be, it's a temporary work db, just like tempdb :-).
August 20, 2012 at 8:47 am
You don't need to take a log backup if the db is in simple recovery model -- indeed, you can't: SQL doesn't allow a log backup to occur while the...
August 20, 2012 at 8:27 am
Viewing 15 posts - 7,246 through 7,260 (of 7,602 total)