Viewing 15 posts - 151 through 165 (of 581 total)
if exists(
select fk from tbl group by fk having count(distinct id) != (select count(distinct id) from tbl)
)
select @retval = 0
June 30, 2006 at 4:37 am
Maybe the production environment is using a suboptimal stored plan. You can get rid of all plans with DBCC FREEPROCCACHE, but that could cause temporary performance problems on the prod...
June 29, 2006 at 2:22 pm
I don't think this happens in SQL9, as individual statements have their own plans. I stand to be corrected of course.
June 29, 2006 at 10:10 am
Yes, it is unclear. The column needs to be a column in the outer table (i.e. the one to the right of the left join) which cannot be null. You...
June 29, 2006 at 10:05 am
It may be that SQL server has a suboptimal plan based on an atypical value for this param. Try DBCC FREEPROCCACHE and then run the procedure twice with a typical...
June 29, 2006 at 9:36 am
Here's previous post on the same topic:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=289159
you should use a left join and check for NULL in a join column of the outer table. The alternaitive is concatenation but...
June 29, 2006 at 9:32 am
To expand on the above, you need to create parameter objects and add them to the parameters collection of the command object, which should be of 'stored procedure' type.
June 29, 2006 at 9:00 am
Yes, wasn't sure and didn't look it up. Largely irrelevant to the issue though.
June 29, 2006 at 8:38 am
I wouldn't combine data cleansing with ordinary DML. Check the values using a SELECT with ISDATE() first, then fix any corrupt values, then move the data.
If you have mixed date formats,...
June 29, 2006 at 8:13 am
Yes, I was wondering about that. At the point in time at which you insert a new record, there oughtn't to be any records referencing it - what did they reference...
June 29, 2006 at 7:52 am
Ask this joker what he means by product-oriented. It sounds as though he means 'trying to use rows as columns'.
You need to give us a little more background. Your current...
June 29, 2006 at 7:43 am
Since your issue is maintenance/code reuse, a view would be the best solution, rather than a derived table (inline view).
It's not particularly useful here since the calculations are simple...
June 29, 2006 at 7:28 am
Viewing 15 posts - 151 through 165 (of 581 total)