---
# System prepended metadata

title: 查詢找不到簡體字資料
tags: [SQL]

---

---
tags: SQL
authors: Anderson
---

###### tags: `SQL` `語系`
# 查詢找不到簡體字資料

## :memo: 問題
可參考
> [IST20210274](http://sciitjobtracking.sportscity.com.tw:8002/SubModules/Issue/FrmIssueDetail.aspx?SrcID=IST20210274)

## :memo: Solution
1. 在條件參數的部分使用@變數
   ex : Abb = @Abb
3. 在左單引號前加上<span style= color:red>N</span>
   ex : Abb = N'萧腾体育用品'

## :memo: Code
```sql=
select ID, Abb, IsSubconDBC
from TransRegion_Factory
inner join LocalSupp on LocalSupp.Region = TransRegion_Factory.Region
where TransRegion_Factory.FactoryID = 'HZG'
and LocalSupp.Junk = 0
and Abb = N'萧腾体育用品'

select * from LocalSupp where Abb = '萧腾体育用品'
```
## :memo: 結果
![](https://i.imgur.com/EJ1NMRU.png)
