Viewing 15 posts - 46 through 60 (of 426 total)
SELECT REPLACE(MyColumn,CHAR(13),'') FROM MyTable
Will remove all instances of the CR character, you may also want to remove the CHAR(10) or LF character as well. For these I would suggest replacing...
August 2, 2006 at 11:06 pm
INSERT INTO MyTable (My9_4_Num)
SELECT My10_4_Num
FROM MyOtherTable
WHERE My10_4_Num < 99999.9999
Accomplishes your goal of "Arithmetic Overflow prevention".
I know of no way to shove a decimal(10,4) number into a decimal(9,4) column without...
August 2, 2006 at 10:54 pm
If you must pray at the ALTER, then script each to text files, and Diff the previous and Current versions for each sp_ to decide if it was ALTERed, that...
August 2, 2006 at 10:05 pm
Watch out for this dropping your REAL tables, for SQL 2000:
SET NOCOUNT ON
IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID('section') AND sysstat & 0xf = 3)
DROP TABLE section
GO
CREATE...
August 2, 2006 at 2:33 am
Change to:
WHILE 1 = 1
BEGIN
...
IF @@ROWCOUNT = 0
BREAK
END
@@ROWCOUNT is like @@ERROR, the 1st time you access it changes to zero, so you may want:
SET @Rows = @@ROWCOUNT
IF @@Rows = 0
BREAK
I...
August 2, 2006 at 1:44 am
Is this what you are looking for?
INSERT LineFaultData (FaultCode, AssetID, StartTime, Duration, Shift)
VALUES (@FaultCode, @AssetID, @Timestamp, 0
, CASE WHEN DATEPART(hh,@Timestamp) BETWEEN 7 AND 15 THEN 'Days'
WHEN DATEPART(hh,@Timestamp) BETWEEN...
August 2, 2006 at 1:34 am
Sam,
Sounds like you are connecting to a network with VPN, then attempting to login to SQL Server using Windows authentication (SSPI), right?
The VPN connection authenticates using windows credentials, but never...
August 2, 2006 at 1:16 am
Create a shadow table with the PK value, and create a Foreign Key on that table to the PK, now add a trigger that Inserts new PKs in the shadow...
August 2, 2006 at 12:49 am
Try:
SELECT a.field1 AS a1, b.field2 AS b2, a.field2 AS a2, b.field1 AS b1
FROM TableA AS a
INNER JOIN TableA as b ON a.field1=b.field2 AND a.field2=b.field1
ORDER BY a.field1, a.field2
Andy
August 2, 2006 at 12:43 am
Look into Using Partitioned Views in BOL as one approach, another is to have view only pages for the archived data that mirror your active data pages.
Andy
August 1, 2006 at 12:33 am
I suspect that the customer is using hubs not switches to interconnect their network?
So If one NIC card in the network decides to scream, it will bring the entire network...
July 31, 2006 at 11:51 pm
Good luck on finding the site that will cure this issue, the real problem is that the RRAS connection does not "login" or net start workstation, instead it simply authenticates...
July 31, 2006 at 11:40 pm
Peter, you are da man!
First you complain about Outlook having a memory leak and next you provide code that is almost guaranteed to be the cause for a memory leak, namely...
July 31, 2006 at 11:22 pm
I am in favor of anything that gets the Job done, with minimal impact on the database server as the primary consideration.
SQL Mail uses a MAPI connection to Exchange, the...
July 31, 2006 at 11:07 pm
Search is your friend...
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=112330
In this case Search these forums for CDOSYS
There are downloads for a SMTP email xp_ extended stored procedure, as well as roll your own examples of sending...
July 31, 2006 at 10:32 pm
Viewing 15 posts - 46 through 60 (of 426 total)