Viewing 15 posts - 9,841 through 9,855 (of 15,381 total)
Take a look at the undocumented procedure sp_MSforeachdb. A quick internet search will provide you with plenty of examples of how to use it and the pitfalls that come with...
December 13, 2012 at 11:08 am
Yes you can do this quite easily.
select col1, col2
into #temp
from dbo.fn_MyFunction(1)
select * from #temp
I would suggest that you look at your function more closely. You have declared your...
December 13, 2012 at 11:03 am
forceman29 (12/13/2012)
I've looked online and either I haven't looked in the right...
December 13, 2012 at 10:56 am
The image datatype exists for 2005. Use the import data wizard on the 2005 instance and you should be fine. Of course you said you are using the image datatype....
December 13, 2012 at 10:52 am
dsorensen 97289 (12/13/2012)
December 13, 2012 at 10:48 am
Michael T2 (12/13/2012)
and (txSubtype > 'BACKORDER'
or txSubtype < 'BACKORDER'
then the scans go away.Strange.
I am going to read up...
December 13, 2012 at 10:39 am
Michael T2 (12/13/2012)
AND coalesce(txSubtype,'') <> 'BACKORDER'
no records are returned. thats why i am using the coalesce. Most of the records i need have a null...
December 13, 2012 at 10:21 am
You do realize that this query will not produce consistent results?
select
@indateto = dateto
,@inseason = seasonid
from
tblSeasonDates
where
datefrom<@datefrom
and
dateto>@dateto
and
seasonid in (select seasonid from tblSeason where groupid=@groupid)
If there is more than 1 row returned from...
December 13, 2012 at 9:40 am
Why do you have NOLOCK and READUNCOMMITTED? You are using two query hints that do the same thing. Do you really need/want to use this hint? Are you aware of...
December 13, 2012 at 8:06 am
Michael L John (12/13/2012)
Remove this from the where clause and see if you still get a scan:AND coalesce(txSubtype,'') <> 'BACKORDER'
Then, do a search on this site for SARGABLE.
You can still...
December 13, 2012 at 8:00 am
I still say that if you are only looking for dbo that it seems unnecessary. If you have only one schema everything will be created there anyway. Unless you are...
December 13, 2012 at 7:43 am
Michael T2 (12/12/2012)
Is that not good to use nolocks? I use them alot on queries that i do not need total accuracy.
Actually NOLOCK is far worse than simply dirty reads....
December 13, 2012 at 7:38 am
Can you post the actual table and index definitions? Both of those index scans look like your stats might be stale. They both have an estimated row count of about...
December 12, 2012 at 3:14 pm
Using your description in your last post here is some code that will do exactly what you said you want to happen.
create table X
(
Prog int
)
insert X
select 1 union all
select 2...
December 12, 2012 at 12:36 pm
Viewing 15 posts - 9,841 through 9,855 (of 15,381 total)