Viewing 15 posts - 14,551 through 14,565 (of 14,953 total)
tuseau (3/13/2008)
Hi,If not, does anyone know of a good way to imitate a "global" variable? i.e. a variable that has a lifespan longer than the current transaction.
Store it in...
March 17, 2008 at 12:20 pm
NullIf will be faster than a case statement by a small margin.
select cast(NullIf(datex, '00000000') as datetime)
March 17, 2008 at 12:13 pm
Shouldn't matter regarding the sequence. The whole idea of Try/Catch is that if any error with a severity greater than 10 (I think that's the minimum) comes up, it...
March 17, 2008 at 9:38 am
peterhe (3/14/2008)
WHERE ...
and c2.structureid not in
...
March 17, 2008 at 9:27 am
It makes sense in that the transaction fails, so the catch is called.
March 14, 2008 at 2:32 pm
select *
from dbo.rangeproof
where left(id, patindex('%[^0-9]%', id)-1) between '123' and '124'
Will get you the results you want, but it's going to be slow on a big table. (I tested it...
March 14, 2008 at 2:26 pm
I must be missing something on this.
First, all of the inserts in your sample data have "N" in column "sku_upc", but you said you want <> "N", and your query...
March 14, 2008 at 1:48 pm
If you can provide a copy of the create statements for the tables involved, and the code for the query, we can probably help you narrow down the exact problem.
March 14, 2008 at 12:49 pm
GilaMonster (3/14/2008)
GSquared (3/13/2008)
In that case, you'd be recovering from the prior day's full backup, and the most recent log backup.
To do that, you'll need the previous day's...
March 14, 2008 at 12:41 pm
I just tried this on two linked servers. The calling server is SQL 2005 (of course), one link is to SQL 2000, the other to SQL 2005.
create proc ErrorTest
as
declare...
March 14, 2008 at 12:37 pm
I would tend to think that the problem is that it's running the called proc on SQL 2000, which doesn't have Try/Catch. But that's just a guess based on...
March 14, 2008 at 12:24 pm
There are two ways I can think of to get that to work.
The first would be to insert the criteria into a temp table created in the calling procedure/script, then...
March 14, 2008 at 12:06 pm
You should be able to do range searches on strings.
create table RangeProof (
ID varchar(25) primary key)
go
insert into dbo.rangeproof(id)
select '123-1234a' union all
select '124-1234a' union all
select '125-1234a' union all
select '123-1234b' union all
select...
March 14, 2008 at 12:01 pm
Another possible solution (if you can) is a computed column with the first character of the ID and an index on that. Or, if you can't modify the table,...
March 14, 2008 at 9:28 am
Viewing 15 posts - 14,551 through 14,565 (of 14,953 total)