You should try something like this:
SELECT ebbudd.budamt3 AS invoice,
ebbudd.optional4 AS invoicenumber,
exchangerate = CASE WHEN MAX( ebbudd.optional2 ) = 'AUD' THEN 1.0
WHEN COUNT(himsys.dbo.cscrd.rate) = 0 THEN 1.0
ELSE SUM(...
Hi,
for me this looks like the source of the problem:
Clustered Index Update(OBJECT:([Anon].[dbo].[tbDVLACensus_Anonymised].[PK_tbDVLACensus_Anonymised_intDVLACensus_AnonymisedID])
Are you updating columns that are used in clustered index ?
On that table with 36 milions rows it can take...
Can you post there your ADO statement ?
Zhavic
---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
Try this
select Table_Transaction.location, Table_Transaction.Item
from Table_Transaction
left join Table_Master on Table_Master.location = Table_Transaction.location AND Table_Master.itemno = Table_Transaction.itemno
where Table_Master.location is null
Zhavic...
When you run that DTS package manually, are you running it directly from server machine or from another computer through Enterprise manager (for example) ?
Zhavic
---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a...
maybe I am missing something, but ...
There
SELECT Substring('<A href="http://www.domain.com/chem.asp?cId=' + CAST(chemicalId AS varchar) ... blah blah
you have not FROM clause, so you are using columns from 'nowhere', for example column chemicalId
I thing you need something like this...
:-) I learned it at this forum !
Zhavic
---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
At first, create procedure that will return a table as result
CREATE PROCEDURE usp_get_table
AS
...
blahblah
...
-- create result ( SELECT statement without INTO clause )
SELECT some_field, some_another_field
FROM some_table
WHERE some_condition
And this is how to use result...
Hmmm, there is better way to write this procedure,
This may be one of the ways, it shoving first part - building the CREATE TABLE statement.
It does not using temp table and it using only one varriable to store the result in ( offcourse, there is also @job_id :-) ). Also it assumes that values...
You should create temporary column in your parent table to hold original ticked_id and after all, drop that column, e.g.:
In the table dbo.tblDispatchTicket create one more column called previous_ticked_id
Than do your insert into that table
INSERT INTO dbo.tblDispatchTicket
(all your...
:-)
SET @flag = '''A'''
Zhavic
---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
This is how I understand it:
Let say you has local_table with 10 rows and remote_table with 1 milion rows.
So if you use
SELECT * FROM
local_table A
INNER REMOTE JOIN
MyRemoteServer..remote_table B
ON A.Col1 = B.Col1
than values...
Hi,
I am not sure, but let's say you has this rows in FlightPilot table
FlightPilot table:
flightId pilotid flightPilotAssignedTimestamp
10 12 5
15 12 21
14 25 13
7 12 6
3...
Hi,
my english is poor but if you qwant to edit file 'hosts'
you can try to experiment with system stored procedure
xp_cmdshell - it execute any shell command - if you have permisions
( I am using SQL server 2000 )
Zhavic
---------------------------------------------------------------...
Hi m0nkey,
can you post there more info about table 'repo_35' ?
I was trying simulate your problem, having 87 milion rows in '[20054_dup]' table, 12K rows in 'avoid_areas' table and 0 rows in 'repo_35' table and query runs for a 1 second,
but then I insert 800K rows in 'repo_35' table and quwry...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.