Viewing 15 posts - 736 through 750 (of 1,347 total)
What size is the column PRIMARY_KEY_DATA. It's more than 20 characters, right, but you're trying to stuff it into @Testdata which is a varchar(20). The reason you only see '419'...
January 11, 2006 at 3:37 pm
Well, that's too much code to wade thru, but I doubt removing the cursors are an option unless you have the time & budget for a major re-write.
Inside the cursor...
January 11, 2006 at 3:07 pm
Yes, but you don't need that user-defined function. SQL's DateDiff works on day boundaries if days is the requested interval:
Using the example of an invoice at 1 second before midnight on...
January 11, 2006 at 2:31 pm
>>Try to break up the statement into smaller pieces and see if they work properly.
Agreed. I also think a derived table would really help with clarity, considering the number of...
January 11, 2006 at 2:07 pm
>>Select RecordID+RecordCode+TotalTaxAmounts+QuarterTaxAmounts+YearTaxAmounts
So you're concatenating all the columns together in SQL before exporting it ?
You're probably running into max size of a varchar, hence the truncation. Use each part of...
January 11, 2006 at 1:14 pm
>> DELETE FROM dbo.[Latest Mail Received]
Use TRUNCATE TABLE instead of DELETE for improved performance, if you are emptying the entire table.
The cursor appears to be a simple 2 table SQL...
January 11, 2006 at 1:09 pm
Nope, SQL Server knows nothing about the source system generating this import data and has no way of knowing that the source system has apparently multiplied the data by 10,000...
January 11, 2006 at 12:59 pm
Not possible without more details on the problem.
January 11, 2006 at 12:50 pm
You could use DateDiff(), but there's not enough info to know if that gives the correct answer:
WHERE DateDiff(dd, GetDate(), ARJOBHD.INVDATE) = 10
However, how do you treat days ? For eaxmple,...
January 11, 2006 at 12:17 pm
>>I have to fetch each row from the first cursor, and start the second cursor, go through it, close it,
You don't have to. You get your head out of...
January 11, 2006 at 12:11 pm
>>ensured that the indexes etc have been updated on both.
What does "updated" mean in this context ?
- DBCC DbReIndex() or IndexDefrag() ?
- Statistics updated ?
January 11, 2006 at 11:52 am
>>They don't have no index.
I think it's pretty obvious what you need to do.
- Add index(es) to support the joins, and add a clustered index to prevent 2 large fragmented table...
January 11, 2006 at 11:21 am
There must be a bug in the function. We need to see the source code.
January 11, 2006 at 10:36 am
>>SELECT field_1, field_2, select(select()), select(Select()), function(select()), field_n.
>>What is the best strategy to reduce time of execution.
When you place a sub-SELECT within a SELECT, you are building a performance nightmare-in-waiting...
January 11, 2006 at 10:31 am
>>I was thinking it would need a while loop to build a temporary table?
Nope, this is just a simple 3 table join:
Select t.UserID, t2.QuestionName, t3.Response
From TableOne as t1
Inner Join TableThree...
January 10, 2006 at 3:31 pm
Viewing 15 posts - 736 through 750 (of 1,347 total)