Sorry that I had to post it as new message instead of replying since I got server application error.
Kalen, this is a different issue. I wonder why other 4 base tables got IX TAB lock as well since the partitioned view is supposed to look up the relevant tables only by querying on the constraint column.Tom
Can you please include relevant portions of the original message, so I can
know what I am replying to without having to search the archives?
If this is a question about partitioned views, did you supply the view
definition, and the version you are using?
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Tom" <anonymous@.discussions.microsoft.com> wrote in message
news:29346002-6963-4D4E-B63C-C6A5C5E292CD@.microsoft.com...
> Sorry that I had to post it as new message instead of replying since I got
server application error.
> Kalen, this is a different issue. I wonder why other 4 base tables got IX
TAB lock as well since the partitioned view is supposed to look up the
relevant tables only by querying on the constraint column.
Showing posts with label base. Show all posts
Showing posts with label base. Show all posts
Sunday, March 11, 2012
Friday, March 9, 2012
Deleted mdf file
I am currently trying to recover a data base that i detached. I have search the computer with *.mdf with out results...
I detached the database from msde 2000 and then installed sql express now when i go to attach the db it is missing, is there away i can recover the db?If you have a backup, you can restore from that. Otherwise, you will need the MDF file at a minimum. The .MDF file is usually the datafile that contains all the database metadata (table lists, Allocation pages, etc.). On a side note the extension MDF is not required. Are there other files that might fit the description?|||i actually don't have a back up... all i know is the file name lis32.mdf. I have searched for that as well, I'm thinking when i installed 2005 it over wrote everything there for msde2000|||It's dead Jim|||RESTORE DATABASE MyDatabase
FROM WormHole = '<insert your path to the space time continium>'
WITH Recovery
Have you checked your recycle bin?|||I have checked the recycle bin...|||It's dead Jim
What he said
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67782|||thanks anyways...
I detached the database from msde 2000 and then installed sql express now when i go to attach the db it is missing, is there away i can recover the db?If you have a backup, you can restore from that. Otherwise, you will need the MDF file at a minimum. The .MDF file is usually the datafile that contains all the database metadata (table lists, Allocation pages, etc.). On a side note the extension MDF is not required. Are there other files that might fit the description?|||i actually don't have a back up... all i know is the file name lis32.mdf. I have searched for that as well, I'm thinking when i installed 2005 it over wrote everything there for msde2000|||It's dead Jim|||RESTORE DATABASE MyDatabase
FROM WormHole = '<insert your path to the space time continium>'
WITH Recovery
Have you checked your recycle bin?|||I have checked the recycle bin...|||It's dead Jim
What he said
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67782|||thanks anyways...
Friday, February 17, 2012
Delete Query Using Join
I need to delete records from one table base on criteria from another table. The example below from the Northwind database shows exactly what I want to do. I want to delete the records from the employee table who a terrorityID of 30346 in the EmployeeTerritories table.
Can someone tell me how to write a delete statement that will delete the rows returned from the following SQL Statement? The sql statement will return one employee name. I would lke to delete that one employee from the employee table and I havent been able to figure out how to do it.
////////// Sql Statment
SELECT dbo.EmployeeTerritories.EmployeeID, dbo.EmployeeTerritories.TerritoryID
FROM dbo.EmployeeTerritories INNER JOIN
dbo.Employees ON dbo.EmployeeTerritories.EmployeeID = dbo.Employees.EmployeeID
WHERE (dbo.EmployeeTerritories.TerritoryID = N'30346')
////////// end of sql statement
Thanks
GEMRemove the select clause and replace with a delete clause. Your delete clause needs to include the name of the table you want to delete from.
Assuming of course you want to use the T-SQL extension rather than SQL standard syntax:
http://msdn2.microsoft.com/en-US/library/aa258847(SQL.80).aspx
As ever, BoL is the best starting point|||DELETE dbo.EmployeeTerritories
FROM dbo.EmployeeTerritories
JOIN dbo.Employees
ON dbo.EmployeeTerritories.EmployeeID = dbo.Employees.EmployeeID
WHERE (dbo.EmployeeTerritories.TerritoryID = N'30346')
--ddave
Can someone tell me how to write a delete statement that will delete the rows returned from the following SQL Statement? The sql statement will return one employee name. I would lke to delete that one employee from the employee table and I havent been able to figure out how to do it.
////////// Sql Statment
SELECT dbo.EmployeeTerritories.EmployeeID, dbo.EmployeeTerritories.TerritoryID
FROM dbo.EmployeeTerritories INNER JOIN
dbo.Employees ON dbo.EmployeeTerritories.EmployeeID = dbo.Employees.EmployeeID
WHERE (dbo.EmployeeTerritories.TerritoryID = N'30346')
////////// end of sql statement
Thanks
GEMRemove the select clause and replace with a delete clause. Your delete clause needs to include the name of the table you want to delete from.
Assuming of course you want to use the T-SQL extension rather than SQL standard syntax:
http://msdn2.microsoft.com/en-US/library/aa258847(SQL.80).aspx
As ever, BoL is the best starting point|||DELETE dbo.EmployeeTerritories
FROM dbo.EmployeeTerritories
JOIN dbo.Employees
ON dbo.EmployeeTerritories.EmployeeID = dbo.Employees.EmployeeID
WHERE (dbo.EmployeeTerritories.TerritoryID = N'30346')
--ddave
Subscribe to:
Posts (Atom)