Viewing 15 posts - 301 through 315 (of 367 total)
Try this:
-- you can use "SELECT *" before "FROM" to see the rows before the update
UPDATE h
SET h.hLongitude = pa.Longitude,
h.hLatitude = pa.Latitude
FROM House h
CROSS APPLY ProcessAddress( h.HouseNumber +...
May 8, 2011 at 10:32 am
You didn't post the most important thing: definition of the table(s).
Without that, don't expect a very precise answer.
Also, you don't nedd explicit "ROLLBACK TRAN" in your code to have a...
April 28, 2011 at 12:30 am
I've dates stored in my Table
MyDate
------------------------------------
2011-03-03 12:17:48.000
2011-04-04 12:17:48.000
2011-04-12 12:17:48.000
2011-04-16 12:17:48.000
2011-04-16 12:17:48.000
....
------------------------------------
I want to select the records as per months requirement.
Means than if I want...
April 27, 2011 at 5:40 pm
Listen to Lynn. If you do not have "ORDER BY", by definition, the order of rows is arbitrary! Remeber that. That means db engine will give you results in any...
April 27, 2011 at 4:40 pm
tinnusqlserver (4/27/2011)
how can i join the 'table variable' with the 'matters' table to delete duplicates
I would rather use a temp table than a table variable, because table variable does not...
April 27, 2011 at 4:27 pm
how it is possible?
Like this (it is working and tested demonstration):
-- We could do the same "hole" in ID's by deleting some rows, but this is shorter:
CREATE TABLE test_t(x INT...
April 27, 2011 at 3:39 pm
Seems to me that you had un-closed transaction in your session before you even called this procedure.
Exception occured and rolled-back all. Try without "try-catch" to see which exception occured.
Also, check...
April 27, 2011 at 3:09 pm
Size of a file is stored in "8-KB Pages". So what would I do if I wanted the file size in MB? How about GB?
pages/128 = MB
pages/(128*1024) = GB
Convert pages...
April 27, 2011 at 2:52 pm
Yup, ColdCoffee, you are right! EXISTS will stop searching as soon as it finds the first row. Other command will set the variable each time it finds a resulting row,...
April 27, 2011 at 2:38 pm
Performance is probably not poor because of returning statement. Check for triggers on destination table. Or it has (too)many indexes.
April 27, 2011 at 2:32 pm
Please do "DESC ADDR", "DESC CIRC", "DESC addr.pk_dynreport" and "DESC circ.subs_bill_util".
Because we need to know what this objects are: dblinks, schemas, packages, or non-existant ?
You cannot SELECT * FROM <FUNCTION>.
April 27, 2011 at 2:28 pm
DECODE and almost the same query triple times in it ? You are doing something horribly whong here. Try to do it with just one query and DECODE within it.
April 27, 2011 at 2:22 pm
Use #tempTable instead of @table variable, if you have more than 30 id's in there. Execution plans may be better, because table variables do not have statistics and optimizer assumes...
April 27, 2011 at 2:17 pm
First, transactions put many locks, and chance that somebody is waiting on the lock is high. Your transactions should be as short as possible. BEGIN TRAN outside of the loop...
April 27, 2011 at 2:08 pm
Viewing 15 posts - 301 through 315 (of 367 total)