Viewing 15 posts - 5,146 through 5,160 (of 7,597 total)
CELKO (4/22/2015)
Why are you changing obvious integer data types to character data types?
Please read any book on basic data modelling and look at the chapters on scales and measurements....
April 22, 2015 at 8:06 pm
Orlando Colamatteo (4/22/2015)
ScottPletcher (4/22/2015)
Orlando Colamatteo (4/22/2015)
April 22, 2015 at 2:07 pm
Eric M Russell (4/22/2015)
ScottPletcher (4/22/2015)
Eric M Russell (4/22/2015)
ScottPletcher (4/22/2015)
April 22, 2015 at 1:26 pm
Eric M Russell (4/22/2015)
ScottPletcher (4/22/2015)
April 22, 2015 at 1:06 pm
With an existing table, you already know what the length of the columns will be, whether varchar or not. The formula provides you with the additional overhead SQL requires...
April 22, 2015 at 11:23 am
It has to be the pointy-haired boss types that hire Celko. No one who actually knew any practical implementations would ever change obvious numeric values to character. There'd...
April 22, 2015 at 11:20 am
SELECT
crtdte,
ISNULL(CAST(NULLIF(minutes_ago / 1440, 0) AS varchar(5)) + ' days, ', '') +
ISNULL(CAST(NULLIF(minutes_ago % 1440 / 60, 0)...
April 22, 2015 at 11:13 am
Books Online has very specific formulas for how to do that, under:
"Estimating the Size of a Nonclustered Index"
April 22, 2015 at 11:00 am
This should definitely be faster. I've tested it for ASC sort but not for DESC -- I believe I've coded it to correctly handle DESC sort, I just haven't...
April 22, 2015 at 10:29 am
Orlando Colamatteo (4/22/2015)
April 22, 2015 at 10:02 am
As an aside, if possible, TRUNCATE the table rather than use DELETE to reduce logging.
April 22, 2015 at 10:00 am
Mark Finnie (4/21/2015)
April 22, 2015 at 8:59 am
Code below could perform better, esp. if table2 and table3 don't have an index that directly supports the lookup/comparison being done.
Edit: And performance could be worse with this code ......
April 21, 2015 at 4:16 pm
Another perfect situation for a tally table. You can create an in-line table using CROSS JOINs or create a physical tally table and use that. Unfortunately I can't...
April 21, 2015 at 4:00 pm
I used CASE rather than ORs ;-).
SET NOCOUNT ON
--Temp table DROP/CREATE, in alpha order--------------------------------------------------------------------------------
IF OBJECT_ID('tempdb.dbo.#CheckTables') IS NOT NULL DROP TABLE #CheckTables
IF OBJECT_ID('tempdb.dbo.#Results') IS NOT NULL DROP TABLE #Results
CREATE TABLE #CheckTables...
April 21, 2015 at 3:31 pm
Viewing 15 posts - 5,146 through 5,160 (of 7,597 total)