Viewing 15 posts - 6,571 through 6,585 (of 7,600 total)
I suggest adding a computed column to the table to determine the value: then the definition is only one place, and is thus very easy to change everywhere:
ALTER TABLE dbo.tablename...
April 22, 2013 at 1:47 pm
The code's not really ready to be used in dev or QA either.
NO reason to search the same table multiple times, esp. not once per column.
Instead, should do a single...
April 17, 2013 at 2:48 pm
Here's T-SQL code to generate the full @decode_string:
DECLARE @decode_string char(2055)
;WITH
cteDigits AS (
SELECT 0 AS digit UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT...
April 11, 2013 at 9:20 am
The @decode_string needs a slight adjustment, moving the decode value for "255" to the end of the string.
As there's really no need to recompute the string every time, let's just...
April 11, 2013 at 9:02 am
I don't think it's really that complex.
I suggest a single lookup/"decode" string, with eight bytes per ip code; I'd also use a leading 7 "filler" 🙂 bytes, just to make...
April 10, 2013 at 3:30 pm
dr.mannhattan (4/9/2013)
ROUND(ISNULL ((SL2.Importe - SL2.Propina - SL2.ScAmt) -((SL2.Importe - SL2.Propina - SL2.ScAmt)/ 1.16),0), 2, 1) As ImpIVA, --the final ", 1" on the ROUND function "tells" it to truncate,...
April 10, 2013 at 8:15 am
SQL will automatically cast the result to the receiving data type; cast will automatically round.
To prevent rounding, you can explicitly use the ROUND function yourself (kinda ironic):
ROUND(ISNULL ((SL2.Importe - SL2.Propina...
April 9, 2013 at 3:06 pm
Turn on trace flag 1222:
DBCC TRACEON ( 1222, -1 )
Then when a deadlock occurs, SQL will put detailed info about the deadlock into the SQL error log.
Rebooting will not help...
April 9, 2013 at 3:01 pm
rarascon (4/9/2013)
April 9, 2013 at 12:52 pm
STUFF(TheDate, 3, 0, '/01')
Would convert 'mm/yyyy' to 'mm/01/yyyy'. You could then use it as a date, either implicitly (somewhat risky) or explicitly, 100% safe but you have to use...
April 9, 2013 at 10:33 am
GilaMonster (4/5/2013)
Any data modification that is minimally logged has to be written to the data file before the transaction completes
I don't think that's true. If it is, it violates...
April 5, 2013 at 2:06 pm
In SQL Server, temporary tables start with # or ##, such as #table or ##table.
IIRC:
SQL will automatically destroy # tables when the connection ends.
For ## tables, under SQL 2005 and...
April 5, 2013 at 1:57 pm
Lynn Pettis (4/4/2013)
ScottPletcher (4/4/2013)
Lynn Pettis (4/4/2013)
April 4, 2013 at 4:36 pm
Lynn Pettis (4/4/2013)
April 4, 2013 at 4:19 pm
Lynn Pettis (4/4/2013)
ScottPletcher (4/4/2013)
Lynn Pettis (4/4/2013)
ScottPletcher (4/4/2013)
April 4, 2013 at 3:18 pm
Viewing 15 posts - 6,571 through 6,585 (of 7,600 total)