Viewing 15 posts - 496 through 510 (of 921 total)
quote:
If case sensitivity is required and the collation of the db or column is not case sensitive, a cast can be used...
November 14, 2003 at 9:36 am
For use within code, just use:
CONVERT(char(8),DateCol,112)
This will be much faster than a UDF and doesn't really require much more typing.
And it usually does not make sense...
November 14, 2003 at 8:56 am
Use sp_rename to first rename it to something not starting with "#".
sp_rename 'table.[# OF MO TO PAY CLS]', 'newname', 'column'
--Jonathan
November 14, 2003 at 8:26 am
quote:
quote:
I hate dates in sqlHey! Come on...
November 14, 2003 at 8:07 am
quote:
Oops!My apologies
I hate dates in sql
November 14, 2003 at 7:29 am
quote:
Your query will result in null because you have not initialized @mail, useset @mail = ''or...
November 14, 2003 at 7:18 am
quote:
quote:
SET DATEFORMAT dmySELECT KeyCol, DateColFROM YourTableWHERE ISDATE(DateCol) = 0
November 14, 2003 at 7:07 am
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
November 14, 2003 at 6:08 am
quote:
Frank, the following is an example of both code and result set
SELECT DISTINCT *
FROM CDSCTM_M B
WHERE NOT EXISTS
(SELECT *
FROM...
November 14, 2003 at 6:02 am
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
November 14, 2003 at 5:20 am
quote:
Just to add
%SomeName%will not make use of an index, IIRC
Frank
November 14, 2003 at 5:11 am
"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...
November 13, 2003 at 5:13 pm
You can set the default collation of a database when you create it.
--Jonathan
November 13, 2003 at 3:58 pm
quote:
Just a note on using like. If the syntax is always "Somename%", ie., begins with, usingthe following is a much more efficient...
November 13, 2003 at 3:18 pm
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...
November 13, 2003 at 1:50 pm
Viewing 15 posts - 496 through 510 (of 921 total)