Viewing 15 posts - 61 through 75 (of 1,553 total)
Do you mind sharing what one of those queries look like?
Nothing beats looking at actual code 😉
(you may change names to protect the innocent ofc)
/Kenneth
February 28, 2008 at 9:22 am
tweety (10/22/2007)
I have a Date column as MM/DD/YYYY(datetime) i need to convert this to YYYYMMDD(int). Can anyone help me in converting this....
It may help to sort out...
February 28, 2008 at 4:51 am
Well, you may be on the right track.
What you have is three entities.
Region, City and Area.
You need an id for each.
RegionId, CityId, AreaId.
One region can have one to many Cities.
One...
February 28, 2008 at 3:30 am
Just for fun, another way to skin the cat.
This specific example relies on a numbers table named 'nums' with a column named 'n' that has numbers at least up to...
February 27, 2008 at 8:32 am
Yep, what Jeff shows is basically what's left when you take out the isolation level and transaction handling code. You can also remove the (rowlock) hint, it's also dead-weight here.
/Kenneth
February 27, 2008 at 7:41 am
Hmm well, I see some definitive issues here...
It's on one hand no problem to identify what is a Region, City or Area, just count the number of hyphens.. But...
How would...
February 27, 2008 at 7:37 am
This may look a little funky, but it does the job 🙂
declare @x table ( words varchar(50) not null )
insert @x
select 'This is the first line' union all
select...
February 27, 2008 at 7:16 am
Are you sure that it's deadlocks, and not blocking locks..?
Anyway, you may try to remove the serialazable transaction level, and also the begin tran/commit tran things, since they're not strictly...
February 27, 2008 at 6:54 am
Well, the total experience of a query isn't just the SQL alone.
The same query may behave differently (read: using different plans) due to differences in hardware, data, indexes, state of...
February 27, 2008 at 5:30 am
Unfortunately, I'm not much help either when it comes to OLE programming.
(It's simply not turned on on my servers) 😉
For this type of task, I use:
exec @err = master..xp_cmdshell 'move...
February 27, 2008 at 3:10 am
So this 'list' with hyphens and stuff, this is your sourcedata?
Can there be more than one region in this list?
Is your purpose to take this 'list' and store it in...
February 27, 2008 at 2:56 am
What does the plans look like?
Especially look for differences when it 'drags' and when it does not.
February 27, 2008 at 2:51 am
If I read your question right, what you're looking for is an INSERT trigger on table2, and in that trigger you place an insert statement into table1 if conditions apply.
Makes...
February 26, 2008 at 1:47 am
Ah, I didn't mean look in BOL for how to copy files using sp_OAxx procs explicitly, I ment for how to use the actual sp_OAxx procs in general. They are...
February 22, 2008 at 1:20 am
Join against the user table twice.
Once on the blocked id and once on the userid that has done the block.
That way you can get at both usernames, one from each...
February 21, 2008 at 2:44 am
Viewing 15 posts - 61 through 75 (of 1,553 total)