Viewing 15 posts - 18,661 through 18,675 (of 18,926 total)
This should do it :
SELECT CONVERT(VARCHAR(8),GetDate(),108)
if you don't want the seconds then you can add left(..., 5) to trim that too.
This solution however means that the user could not...
January 20, 2005 at 1:33 pm
I've only heard of problems like this in replication, but then again it's real easy to fix with a single commande. So I would just go ahead and push...
January 19, 2005 at 3:09 pm
Hehe... that too .
One might also consider buying more ram and cpu power to handle such a query without a where clause to avoid...
January 19, 2005 at 2:45 pm
A job can be scheduled to run whenever you want just like a sceduled task in Windows... You'll have 1 more step to do and you're sure that nothing will...
January 19, 2005 at 2:44 pm
I can imagine... but I'd rather not have any nightmares tonight .
January 19, 2005 at 2:08 pm
I would stick with AJ's point that you MUST NOT ALTER SYSTEM TABLES. I cannot stress this point enough. However what you could do that would have almost...
January 19, 2005 at 1:51 pm
Ya you just don't need a case in this situation. You can do it with a case but that's just wasted cpu cycles if you want my opinion.
January 19, 2005 at 1:25 pm
One way to do it would be this :
Select right('0' + cast(ST.GR as varchar(2)), 2)
PS a smallint can go up to 32 768 and your column seems to hold...
January 19, 2005 at 12:18 pm
You can use the function COUNT_BIG() instead which returns a bigint.
It uses the same parameters as the count() function.
January 19, 2005 at 11:14 am
""And indeed, a trigger fires, even if the desired table statement did not affect any rows ! ""
Indeed that's why you should always do an inner join on the deleted...
January 19, 2005 at 6:52 am
You can lookup the "ISNULL" function in the books online
SELECT
Account_Code,
SUM( Amount) AS GROSS,
SUM(case WHEN (Transaction_Date <= DATEADD(DAY, -90, '20041231'))then (Amount) else 0 end) as "BAL_OVER_90",
ISNULL((select AmountSC ...
January 19, 2005 at 6:40 am
Have you tried this?
CREATE PROCEDURE test
@m1 varchar(10)
as
declare @sql varchar(100)
select @sql = 'SET ANSI_NULLS ON GO SET ANSI_WARNING ON GO select LastName from ' + @m1 + '.Northwind.dbo.employees'
print @sql
exec...
January 18, 2005 at 8:15 am
SELECT TOP 100 PERCENT dbo.sysobjects.name, dbo.sysobjects.xtype
FROM dbo.sysobjects INNER JOIN
...
January 17, 2005 at 2:16 pm
I hear one thing here.
It seens that the developers are working on their own little system with no code centralisation. That could be a problem, or the solution. ...
January 17, 2005 at 1:06 pm
Viewing 15 posts - 18,661 through 18,675 (of 18,926 total)