[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

Delete query

Getting msg Specify table you want to delete records from

DELETE Account_Num
FROM DSNB_Sp INNER JOIN LTR_3A_Status ON DSNB_Sp.Account_Num = LTR_3A_Status.F1
WHERE LTR_3A_Status.f2 = "C"

Thanx,
Trudye
0
Trudye
Asked:
Trudye
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
any better with this?
DELETE LTR_3A_Status.*
FROM DSNB_Sp INNER JOIN LTR_3A_Status ON DSNB_Sp.Account_Num = LTR_3A_Status.F1
WHERE LTR_3A_Status.f2 = "C"

Open in new window

0
 
divyeshhdoshiCommented:
DELETE FROM DSNB_Sp d1
where d1.Account_Num in
                 (select  LTR_3A_Status.F1 from LTR_3A_Status WHERE LTR_3A_Status.f2 = "C"
                   )
0
 
openshacCommented:
or just
DELETE
FROM DSNB_Sp INNER JOIN LTR_3A_Status ON DSNB_Sp.Account_Num = LTR_3A_Status.F1
WHERE LTR_3A_Status.f2 = "C"

Open in new window

0
 
TrudyeAuthor Commented:
Thanks Guys for responding, sorry it took me soooo very long to get back to you, but I have been crazy busy.

Angel your solution did not work, I had errors, I put them aside to provide feedback but can't remember where I put them.
Divyeshdoshi, your solution worked like a charm.
Openshac, I just saw your solution so I'll have to pass on it. I am pretty sure that this solution requires a subquery.

Thanx again,
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now