var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help on delete statement
I have two tables.
MySymbol, Open, High, Low, Close
I want to perform one task--Delete all the records in table2 whose MySymbol matches one given BloombergSymbol in table1.
Try this query:
Delete Table2.* from Table1 LEFT JOIN Table2 ON Table1.MySymbol = Table2.MySymbol
Alternate syntax :
n.b. I have based this on MySQL syntax which may or may not work in your DB.
DELETE FROM table2 WHERE MySymbol IN (SELECT MySymbol FROM table1)
Originally Posted by r937
this one works.
thank you guys.
Originally Posted by aschk
For SQL Server use:
INNER JOIN table1 ontable2.MySymbol = table1.MySymbol