Viewing 15 posts - 13,801 through 13,815 (of 13,847 total)
Your UPDATE statement needs to contain a WHERE clause which specifically excludes all records which have already been updated - and this will, of course, depend on your update logic.
Note...
July 1, 2004 at 6:15 pm
Try something like this:
select top 3 record, date, country, sales
from (tablename)
order by sales desc
June 30, 2004 at 12:01 am
I suspect that your problem occurs before the Select statement has a chance to run on the linked server, so your @error checking never executes.
Your method of error trapping will...
June 29, 2004 at 8:03 pm
You might like to qualify 'decimal' with 'precision' and 'scale' arguments - eg decimal(9,5) gives you 9 decimal positions per number to play with - up to five of them...
June 29, 2004 at 12:33 am
Here's a routine that executes the same command for all databases in an instance. You should be able to modify it to plug in your commands.
declare @sql varchar(400)
set @sql='select...
June 25, 2004 at 12:09 am
I too have seen this error, with queries like
select * from table1 t1 where t1.id = (select t2.id from table2 t2 ... where t2.id = t1.id)
The error occurs when...
June 24, 2004 at 11:51 pm
Sorry to nit-pick, but just got up at 4am to watch England exit Euro 2004 on penalties, so I'm on the war-path!
Quoting from the original post, the required result in...
June 24, 2004 at 5:54 pm
Could it be a locking issue (eg table locked for update so other users can't access it)? Might be worth running Profiler to check.
June 23, 2004 at 10:11 pm
I'm with warey on this. Please explain how the data are linked and give an example of the output you are trying to get to.
June 23, 2004 at 10:03 pm
Can you post the exact error message that you are getting and the circumstances under which it is displayed?
June 23, 2004 at 9:57 pm
Kenneth, if field1 is anything other than zero, your solution won't produce the required result: instead it will produce (field1 + (other calculations)), in the case where field2 is zero.
However,...
June 23, 2004 at 5:40 pm
I think the Case statement is the way to go. Something like this:
SELECT Field1, Field2, etc...
FROM tbl_Purchase
WHERE ((case field2
when 0 then 0
else field1/field2
end)
+ (other calculations)) > 0
Regards.
June 22, 2004 at 6:49 pm
So, on insert to table2, need to set t2.refno to
select refno from table1 t1
where t1.email1 = t2.email2?
(where t2 is aliased to table2)
Is table1.email1 unique? If not, obviously an issue here...
June 21, 2004 at 1:10 am
This is a bit confusing and needs a bit more info. Are you saying that every time you create a record in table1, you need to create an associated record...
June 21, 2004 at 12:45 am
Nice thinking and thanks for the response - you've approached it from an angle I hadn't considered.
But had to get on with it and have already written a wedge...
June 18, 2004 at 12:15 am
Viewing 15 posts - 13,801 through 13,815 (of 13,847 total)