Viewing 15 posts - 5,761 through 5,775 (of 7,608 total)
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
GilaMonster (9/22/2014)
September 22, 2014 at 10:24 am
IF OBJECT_ID('tempdb.dbo.#sp_spaceused') IS NOT NULL
DROP TABLE #sp_spaceused
CREATE TABLE #sp_spaceused (
db_name varchar(100) NOT NULL CONSTRAINT sp_spaceused__DF_db_name DEFAULT '',
name varchar(100)...
September 22, 2014 at 10:22 am
You did add 70 rows, so while the growth is a little higher than average, it's not ridiculously high. Yes, you do want to convert to varbinary(max) instead of...
September 19, 2014 at 12:18 pm
That "DISTINCT" is a big concern. Either the joins are producing dups, and thus the joins need modified, or the code is needlessly forcing SQL to sort the results.
September 19, 2014 at 9:41 am
Viewing 15 posts - 5,761 through 5,775 (of 7,608 total)