Viewing 15 posts - 496 through 510 (of 921 total)
quote:
Your query will result in null because you have not initialized @mail, useset @mail = ''or...
--Jonathan
quote:
quote:
SET DATEFORMAT dmySELECT KeyCol, DateColFROM YourTableWHERE ISDATE(DateCol) = 0
--Jonathan
Merge your tables into one table with a column for Break Number. Your current schema violates Codd's "Information Rule," forcing you to use hacks like this with dynamic SQL.
--Jonathan
--Jonathan
quote:
Frank, the following is an example of both code and result set
SELECT DISTINCT *
FROM CDSCTM_M B
WHERE NOT EXISTS
(SELECT *
FROM...
--Jonathan
You would need to use dynamic SQL, e.g.:
EXEC('SELECT SUM(Revenue) AS Week' + RIGHT('0' + CAST(@CurrentWeek AS varchar(2)),2) + '
FROM MyTable
WHERE SaleDate BETWEEN...')
--Jonathan
--Jonathan
quote:
Just to add
%SomeName%will not make use of an index, IIRC
Frank
--Jonathan
"Recovery model" was a new concept introduced with SQL Server 2000. The closest thing in SQL Server 7 would be to check the "trunc. log on chkpt." and "select...
--Jonathan
You can set the default collation of a database when you create it.
--Jonathan
--Jonathan
quote:
Just a note on using like. If the syntax is always "Somename%", ie., begins with, usingthe following is a much more efficient...
--Jonathan
No. As setting up hashing requires table scans, that makes no sense. The logic of not indexing where the values may be "easily hashed" is relevant only to...
--Jonathan
Viewing 15 posts - 496 through 510 (of 921 total)