Viewing 15 posts - 5,746 through 5,760 (of 7,597 total)
Try this:
SELECT COALESCE(fs.CustomerKey, fo.CustomerKey) AS CustomerKey
, COALESCE(fs.StoreKey, fo.StoreKey) AS StoreKey
, ISNULL(fs.LastWeek, 0) + ISNULL(fo.LastWeek, 0) AS LastWeek
, ISNULL(fs.LastTwoWeeks, 0) + ISNULL(fo.LastTwoWeeks, 0) AS LastTwoWeeks
, ISNULL(fs.LastThreeWeeks, 0) + ISNULL(fo.LastThreeWeeks, 0) AS...
September 25, 2014 at 12:00 pm
No, such detailed change log info is not available. And when you think about it, you realize that it would be just too much overhead and disk space for...
September 25, 2014 at 11:40 am
I don't think you need to go thru all that. Just modify the original query to get what you need. Not a lot of details, but something like...
September 25, 2014 at 11:36 am
About the best you can do is to cluster the Costing table by date. That could help significantly when there are a limited number of lookups. For large...
September 24, 2014 at 4:35 pm
You could adjust it to handle an address without a period / with only the top address specified (such as "10").
LEFT(IPAddress,CHARINDEX('.', IPAddress + '.') - 1)
September 24, 2014 at 9:06 am
In fact, the "property name" should not really be in the activity table, just the property_id that represents that property name.
September 23, 2014 at 10:24 am
You're assuming that every property name will be in the activity table. That may be a valid assumption for your particular data set up, I don't know. You'd...
September 23, 2014 at 10:23 am
I think this is simpler and will do what you need. You might want to tweak "<" to "<=", depending on exactly what you want the cutoff date to...
September 23, 2014 at 10:01 am
You'll need to use the "property master" table with a left join, something like below:
SELECT property_name, pa.activity_date
FROM properties p
LEFT OUTER JOIN property_activity pa ON
pa.property_name = p.property_name...
September 23, 2014 at 9:58 am
SQL won't automatically KILL running tasks.
Your best bet is to force them to recompile immediately. AFAIK, the only way to do that is to have it affect the entire...
September 23, 2014 at 9:54 am
Never use ISNULL() in a WHERE or in JOIN conditions. You can always code around it, and it causes optimizer issues. There are very few times when you...
September 23, 2014 at 9:31 am
You have to specific with terminology here. A deadlock is a specific type of blocking that cannot be resolved without canceling/abending at least one task. Blocking can eventually...
September 23, 2014 at 9:20 am
Yes. If the procedure was already executing, that execution would still use the old code.
September 23, 2014 at 9:19 am
GilaMonster (9/22/2014)
In this case no assumption was needed, since the OP saidField from table1 is primary key
It's currently the PK (perhaps). Just in case, I'd write the code so...
September 22, 2014 at 1:25 pm
Of course the only ultimate solution to "replace bad vendor query" is "replace bad vendor." 😀
You can set up a trace with a high threshold(s) to capture really bad queries....
September 22, 2014 at 10:37 am
Viewing 15 posts - 5,746 through 5,760 (of 7,597 total)