Viewing 15 posts - 421 through 435 (of 486 total)
Not especially efficient, but you can do
WHERE CHARINDEX(, ) = 1
December 27, 2006 at 8:20 am
Also, make sure your variable datatypes match up to your column datatypes. This has oft been reported as the cause of performance degradation between 7 and 2000.
December 20, 2006 at 9:48 am
Try this function.
@cStripPat is the chars to remove. In your case, '%[^a-zA-Z]%'
HTH
P
IF OBJECT_ID('dbo.ufn_XU_PatStrip') IS NOT NULL
DROP FUNCTION dbo.ufn_XU_PatStrip
GO
CREATE FUNCTION dbo.ufn_XU_PatStrip
(@cStringNVARCHAR(4000),
@cStripPatNVARCHAR(4000))
RETURNS NVARCHAR(4000)
AS
BEGIN
DECLARE @nposINTEGER
SELECT @npos = PATINDEX(@cStripPat, @cString)
WHILE @npos...
December 7, 2006 at 10:48 am
If you can see it in programs, but not in services, likely you've only installed the client tools.
Look for file named master.mdf on local drives. If it's there, you may...
October 30, 2006 at 1:57 pm
If you check sysindexes in both DBs, you will see that they are not in fact the same -- the DB with no data will have fewer rows in sysindexes,...
October 18, 2006 at 7:16 am
Does something like this do what you want?
INSERT TABLEM(ItemId, jAmount)
SELECT t1.Item_Id, ISNULL(SUM(b.Var1), 0.00)
FROM table1 t1
JOIN table2 t2 ON t2.InventDimId = t1.InventDimId
AND t2.wmsLocationId 'The Room'
JOINbTable bON b.ItemId = t1.Item_Id
AND b.DataAreaId...
October 6, 2006 at 2:54 pm
Makes no difference where the column is physically in the table.
Table can be Col1, Col2, Col3. You can retrieve them in any order you need/want/like.
EM won't "re-create" an index unless...
September 28, 2006 at 6:52 am
It gets out of whack pretty quick, I never depend on it (pardon the pun).
Google sp_msdependencies to see if it can be of use to you.
September 21, 2006 at 8:59 am
Appropriate indexing. If you see Bookmark Lookup in the plan, you may want to re-examine the indexes on the table.
Clustered index scans = table scan. You already know about these.
Stored...
August 29, 2006 at 9:50 am
SELECT OBJECT_NAME(id), name
FROM sysindexes
WHERE OBJECT_NAME(id) NOT LIKE'sys%'
AND indid > 0
AND indid < 255
ORDER BY 1, 2
Note: table functions where the result set table has an index will also...
July 31, 2006 at 10:00 am
Perhaps you could explain what you mean about Death by SQL? IsNumeric is a system function with a single precise purpose. In my humble estimation, pattern matching (especially with NOT,...
June 26, 2006 at 6:30 am
IF IsNumeric(RIGHT(RTRIM('ABCDEF1234'), 4)) = 1
print 'yay'
else
print 'boo'
As already stated above, get the numbers and the letters into separate columns -- the way it's currently designed is not good, as evidenced...
June 23, 2006 at 12:28 pm
Still had the old IP in SQL Client on the machine. D'Oh!
May 24, 2006 at 7:03 am
If you google SQL deadlock, you'll find a list of things to watch out for.
Top of the list:
1) Keep transactions as short as possible
2) Always access tables in same order,...
May 23, 2006 at 1:34 pm
Viewing 15 posts - 421 through 435 (of 486 total)