Subject | How to do a join delete with Flamerobin V 0.9.2.1851 |
---|---|
Author | rosssmith55 |
Post date | 2013-03-19T13:08:35Z |
Hello! I am fairly new to learning SQL, I am attempting to learn how to do a Join > Delete using flamerobin and was told this is a great place to learn good stuff :) Any way this is what i got so far.
SELECT a.INV_PARTNUMBER, a.INV_ALTPARTNUMBER, b.INVSUP_SUPPNUM, a.INV_DESCRIPTION1, a.INV_DESCRIPTION2, a.INV_LOCATIONID, a.INV_UOMID, a.INV_DEPTID, a.INV_STOCKONHAND, a.INV_COUNTEDDATE
FROM INVENTORY a
join INVENTORY_SUPPLIER b
on a.INV_ID = b.INVSUP_INVID
where a.INV_COUNTEDDATE < '01.10.2012, 00:00:00.001'
and a.inv_locationid = -1
and b.INVSUP_SUPPNUM = 10
As you can see I have joined a few things (in this instance I will be marking inventory items as deleted) I just cant for the life of me figure out how to do it! I know how to just simply delete something but not in a join and for this it must be done in a join.
Any and all help is very much welcomed! Thank you!
SELECT a.INV_PARTNUMBER, a.INV_ALTPARTNUMBER, b.INVSUP_SUPPNUM, a.INV_DESCRIPTION1, a.INV_DESCRIPTION2, a.INV_LOCATIONID, a.INV_UOMID, a.INV_DEPTID, a.INV_STOCKONHAND, a.INV_COUNTEDDATE
FROM INVENTORY a
join INVENTORY_SUPPLIER b
on a.INV_ID = b.INVSUP_INVID
where a.INV_COUNTEDDATE < '01.10.2012, 00:00:00.001'
and a.inv_locationid = -1
and b.INVSUP_SUPPNUM = 10
As you can see I have joined a few things (in this instance I will be marking inventory items as deleted) I just cant for the life of me figure out how to do it! I know how to just simply delete something but not in a join and for this it must be done in a join.
Any and all help is very much welcomed! Thank you!