# INSERT BANK FROM KHACHHANG CONVERT

## Mô tả bài toán

* Khi convert dữ liệu cũ, thường sẽ khai báo ngân hàng trong danh mục khách hàng
* muốn chuyển vào danh mục bank thì làm thế nào

## Hướng dẫn

* Convert khách hàng lên đúng như bản cũ
* Sử dụng lệnh insert bank from select khachhang

```sql
-- gán dữ liệu ngân hàng từ bảng khách hàng sang bảng bank
insert BankAccount (SoTaiKhoan,ten,khachhang,donvi)
select tkNganhang,tenNganhang,khachhang,1
from khachhang
where tkNganhang<>''
```


---

# 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/insert-bank-from-khachhang-convert.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.
