Viewing 15 posts - 406 through 420 (of 482 total)
I just want to know how the app knows which of the two tables to insert.
February 16, 2007 at 6:36 am
How about 1 parent table A with identity, 2 child tables with foreign key and check constraints: table B, all the ids must be divisible by 2 with...
February 15, 2007 at 7:48 am
Here's the correct version (single column in select, ordering not by ordinal position - is that still to be deprecated?)
SELECTcVal
FROM #tmp_holding
ORDER BY CONVERT(INTEGER, STUFF(cVal, 1, PATINDEX('%[0-9]%', cVal) -1, '')), cVal
P
February 14, 2007 at 10:06 am
Try this:
SELECTcVal, CONVERT(INTEGER, STUFF(cVal, 1, PATINDEX('%[0-9]%', cVal) -1, ''))
FROM #tmp_holding
ORDER BY 2, 1
HTH,
P
February 14, 2007 at 10:00 am
Jeff,
VERY COOL!!!!
Never seen that UPDATE...SET construct before.
Not so fast here, tho, took 1m11s.
Thanks,
Paul
February 14, 2007 at 9:47 am
You say this is called from an update trigger, and then give an example involving one 1000 row insert (or 1000 single row inserts). Either way, unless the trigger is...
January 30, 2007 at 9:58 am
Save all your changes in a script file, then cursor through your DBs calling OSQL using xp_cmdshell.
January 25, 2007 at 7:21 am
Michael,
You're too funny!!! You say we're not here to preach, yet you're preaching at me!!!!
I just read your solution to the original question: update syscolumns????? IMHO, that's preaching suicide....
January 3, 2007 at 6:41 am
Michael,
In that case, it's not the ordinal position that breaks things, it's the poor code.
January 2, 2007 at 7:03 am
The ordinal position cannot matter. If you want to see columns in a specific order, select them in that order.
December 27, 2006 at 8:55 am
Hmmn, I put the greater-than / less-than brackets in last post, they were stripped out....
WHERE CHARINDEX(The_Text, TextCol) = 1
December 27, 2006 at 8:24 am
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
Viewing 15 posts - 406 through 420 (of 482 total)