Viewing 15 posts - 3,271 through 3,285 (of 6,036 total)
to add my 2 cents. 🙂
Hungarian notation is good for compilers, but T-SQL is an interpreter.
Prefixes on names make it longer and inflate system indexes
It slows slows down interpreting of...
_____________
Code for TallyGenerator
November 30, 2007 at 8:15 pm
Another surprising for someone result comes from simple primary school exercise.
[font="Courier New"]X / N * M = X * M / N[/font]
Is it true?
Let's check.
[Code]
declare @d decimal(18,15), @f FLOAT
SET @d...
_____________
Code for TallyGenerator
November 29, 2007 at 8:46 pm
If you're expecting the answers from DECIMAL calcs to match those of FLOAT calcs, you'll be surprised. You do have to take some post-calulation action as you suggested...
_____________
Code for TallyGenerator
November 29, 2007 at 8:24 pm
Bah - just import it all, let the collation sort it out....:)
If you import into numeric column you'll never have a chance to sort anything out.
Insert will fail immediately.
_____________
Code for TallyGenerator
November 29, 2007 at 6:48 pm
Heh... rumor has it that's because the old treasurer for France had a typewriter where the comma key didn't work... 😛
Well, if it's true then too many typewrites all around...
_____________
Code for TallyGenerator
November 29, 2007 at 4:55 pm
dbaltazar (11/29/2007)
So let me ask a follow up question. Under what circumstance would a cursor be good? Small data set?
When you need to send emails.
Or upload/report data from/to...
_____________
Code for TallyGenerator
November 29, 2007 at 4:28 pm
Jeff Moden (11/28/2007)
No, no... not that, Serqiy... I understand that.I meant this type of accuracy when I said you better know what you're doing...
In fact what you are doing is...
_____________
Code for TallyGenerator
November 29, 2007 at 1:43 am
November 28, 2007 at 9:14 pm
[Code]select @sql ='SELECT distinct top ' + @MyCount + ' ' + @sqlrest + ' FROM Employee E
WHERE E.Firstname LIKE '''+ '%' + @term + '%' + ''''
print...
_____________
Code for TallyGenerator
November 28, 2007 at 9:11 pm
Heh... who cares about the precision... using FLOAT, you've lost some accuracy. Think not? Try this...
You have not lost anything.
You just display the same value in different representation.
Think...
_____________
Code for TallyGenerator
November 28, 2007 at 9:06 pm
Always do
[font="Courier New"]PRINT @sql[/font]
before you do
[font="Courier New"]exec sp_executesql @sql[/font]
_____________
Code for TallyGenerator
November 28, 2007 at 8:08 pm
This syntax was introduced in SQL2005.
In SQL2000 use SET ROWCOUNT @param instead.
_____________
Code for TallyGenerator
November 28, 2007 at 7:14 pm
[Code]
CREATE TABLE dbo.CustomerFlags (
FlagCode nchar(1) NOT NULL , -- change datatype if 1 letter is not enogh for some flags
CustomerID int NOT NULL ,
CONSTRAINT PK_CustomerFlags PRIMARY KEY ON (FlagCode, CustomerID)
)
CREATE...
_____________
Code for TallyGenerator
November 26, 2007 at 2:32 pm
Correct syntax:
DECLARE @smsglist VARCHAR(8000), @sDelimiter VARCHAR(8000) = '/'
SET @smsglist = 'Part 1/Part 2/Part 3'
SET @sDelimiter = '/'
Select * from dbo.fnSplitMsg (@smsglist, @sDelimiter)
_____________
Code for TallyGenerator
November 13, 2007 at 2:57 pm
DELETE tsd
FROM #tmp_searched_table1 tsd, table_2 dta
WHERE dta.doc_id=tsd.doc_id_pk
_____________
Code for TallyGenerator
November 13, 2007 at 12:55 pm
Viewing 15 posts - 3,271 through 3,285 (of 6,036 total)