Viewing 15 posts - 5,011 through 5,025 (of 5,394 total)
July 20, 2009 at 2:12 am
I'm not aware of any tool able to convert your code from T-SQL to PL/SQL, I think you will have to do it manually.
If such a tool existed, anyway, I...
July 20, 2009 at 2:01 am
You can't use parameters declared outside the dynamic statement in the statement itself. You have to declare the params in the appropriate argument of sp_executesql. Example:
declare @sql nvarchar(4000)
declare @value nvarchar(50)
set...
July 20, 2009 at 1:01 am
Uncle Moki (7/17/2009)
won't that make the join results HUGE x n?
No, if you just specify the columns you need. In that case results are smaller.
Uncle Moki (7/17/2009)
July 17, 2009 at 9:41 am
This is a simple way.
UPDATE dbo_DimAddress
SET city = replace(city, 'ã', 'a'),
country = replace(country, 'ã', 'a'),
state = replace(state, 'ã', 'a')
WHERE city LIKE '%ã%'
...
July 17, 2009 at 9:29 am
I don't remember where I got this script, probably from SSC...
Here you are:
declare @idint
declare @typecharacter(2)
declare@pagesint
declare @dbname sysname
declare @dbsize dec(15,0)
declare @bytesperpagedec(15,0)
declare @pagesperMBdec(15,0)
create table #spt_space
(
objidint null,
rowsint null,
reserveddec(15) null,
datadec(15) null,
indexpdec(15) null,
unuseddec(15) null
)
set...
July 17, 2009 at 9:23 am
Invert SELECT and UPDATE: you don't lock the row just reading, you have to write to put a lock.
BEGIN TRAN TestTran
UPDATE TestTable
SET ID =...
July 17, 2009 at 9:12 am
I think that missing indexes coming from DMV are just a hint to report something can be improved, but I would never create the indexes exactly how the DMV suggests....
July 17, 2009 at 9:10 am
I'm sorry, I was referring to the original post 'cause I had no time to look at the revised one. It's very strange: yesterday I removed from your query all...
July 17, 2009 at 2:31 am
That process cannot be killed, it's a system process. I don't think that process prevents you from setting the DB in read only: I suggest you investigate further to find...
July 17, 2009 at 2:23 am
Try this way:
SELECT
t.AccountNumber
,t.CustomerID AS LocalCustomerID
,c.CustomerID AS RemoteCustomerID
,t.AddressID AS LocalAddressID
,c.AddressID AS RemoteAddressID
,c.Address
FROM
dbo.MyAccounts AS t
INNER JOIN OPENQUERY(MyLinkedServer,...
July 17, 2009 at 1:55 am
Select from the menu: Query, results to..., File.
Ctrl+Shift+F is the shortcut for it.
I think you picked the wrong post type anyway, this is not a poll.
Regards
Gianluca
July 17, 2009 at 1:34 am
WayneS (7/16/2009)
I find this theory interesting, since the columns that are in the where clause are not in the tables that are producing scans.
It doesn't matter, the optimizer can choose...
July 17, 2009 at 12:51 am
You can't. Or, at least, I don't know how you could.
The scan is due to the OR to include NULL values for processed_flag and reviewed. Using ISNULL or COALESCE won't...
July 16, 2009 at 3:37 am
Graham.Irons (7/15/2009)
However, there may be any number of Employees.
This is one of the limitations of the PIVOT operator: it must have fixed pivoting values.
In your case you may consider...
July 16, 2009 at 1:05 am
Viewing 15 posts - 5,011 through 5,025 (of 5,394 total)