Viewing 15 posts - 46 through 60 (of 1,346 total)
I don't think you have any althernative other than dynamic SQL.
SQL code is parsed. Then it is executed. All code is parsed, including both branches of an IF .. THEN...
December 27, 2007 at 2:44 pm
>>month(datecolumn)
The MONTH() function only takes true datetime types.
A string value in DDMMM format won't implicitly convert to a datetime.
Since it appears as if year is irrelevant in your case, simply...
December 17, 2007 at 2:38 pm
Have you considered global temp tables (with "##" prefix) ? They can be accessed across SPIDs.
December 17, 2007 at 1:11 pm
If you are doing "SELECT *" into a #temp table, all the column names need to be unique.
In this case both your tables contain a column named "caseID", therefore temp...
December 14, 2007 at 3:29 pm
What about ISDATE() ?
Idenitify the bad data:
SELECT *
FROM YourTable
WHERE ISDATE(EffDt) = 0
December 14, 2007 at 1:34 pm
There are T-SQL people who know & use the SQL built in functions.
And then, there are "The Others" ...
Code below called many times per minute on 1 of my servers....
December 13, 2007 at 11:41 am
SELECT Count(*)
FROM TSQLCoders
WHERE FamiliarWithLEN = 1
AND FamiliarWithDATALENGTH = 0
Result:
Too bloody many
December 13, 2007 at 11:28 am
>>The application does not access any other database and I am able to run another package using the same server so that rules out permissions.
Not necessarily.
When you run this...
December 11, 2007 at 1:51 pm
>>tblItem is a recursive table where the parent ID refers to the ID of the parent item in the table itself.
If something is recursive, you need to join it to...
December 11, 2007 at 1:34 pm
Going back to your original post:
>>The maintenance plan remains the same regardless of the execution time. The maintenance plan doesnt use table scans only index seeks.
Just to confirm, you mean...
December 11, 2007 at 10:20 am
Can you give us some more details about the function dbo.CallSearchL3_2(). What does it do internally ? Does it use tempdb ?
Does you system have any tables pinned in memory...
December 11, 2007 at 8:12 am
Your DBCC results are interesting, because they appear to be the opposite of what I was expecting.
Since you stated that the execution plan remained the same, yet execution times got...
December 11, 2007 at 7:01 am
It appears that using an Oracle Sequence like this won't work.
2 options:
1. Create a stored procedure on Oracle and pass it the parameters for INSERT. The stored proc can get...
December 6, 2007 at 8:52 am
If the exec plans are identical then ...
Run DBCC SHOWCONTIG() on the 3 tables at the start of the day. Keep the results.
When the slowness is noticed run DBCC SHOWCONTIG()...
December 5, 2007 at 12:58 pm
The index scan on table [Price] is likely to be expensive with 14m rows.
Ideally you'd want an index seek.
Can you create additional indices on these tables ?
Also, I...
December 5, 2007 at 12:45 pm
Viewing 15 posts - 46 through 60 (of 1,346 total)