# XÓA BỎ DÒNG KHÔNG PHÁT SINH

## YÊU CẦU

* Nếu danh mục không phát sinh thì xóa bỏ

## HƯỚNG DẪN

* Code mặc định 1 danh mục muốn xử lý

<pre class="language-sql"><code class="lang-sql">-- chạy select  kiểm tra
-- okie thì comment select, mở delete
select  t1.ma,t1.ten,t1.VuViec as id_danhmuc, t2.vuviec
<strong>-- delete T1
</strong>from
(select * from vuviec where vuviec&#x3C;>0 and cap=0)T1 left join
(
	select vuviec 
	from dulieuketoan 
	where vuviec&#x3C;>0
	group by vuviec 
)T2 on t1.VuViec = t2.VuViec
where t2.VuViec is null
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kythuat.dtechvn.com/danh-muc/xoa-b-dong-khong-phat-sinh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
