久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

轉義括號 [ 在 CONTAINS() 子句中?

Escaping Bracket [ in a CONTAINS() clause?(轉義括號 [ 在 CONTAINS() 子句中?)
本文介紹了轉義括號 [ 在 CONTAINS() 子句中?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

如何在全文 SQL Server contains() 查詢中轉義括號?我已經嘗試了以下所有方法,沒有有效:

How can I escape a bracket in a full-text SQL Server contains() query? I've tried all the following, none of which work:

CONTAINS(crev.RawText, 'arg[0]')
CONTAINS(crev.RawText, 'arg[[0]]')
CONTAINS(crev.RawText, 'arg\[0\]')

使用雙引號確實有效,但它強制整個搜索成為一個詞組,這是多詞查詢的一個亮點.

Using double quotes does work, but it forces the entire search to be a phrase, which is a showstopper for multiple word queries.

CONTAINS(crev.RawText, '"arg[0]"')

我真正想做的就是擺脫括號,但我似乎無法做到..

All I really want to do is escape the bracket, but I can't seem to do that..

推薦答案

您不必轉義 [,因為它在全文搜索中沒有特殊含義.但是,如果您確實需要搜索完全匹配項,則可以使用 "" 標記.

You don't have to escape the [ as it has no special meaning in Full Text Search. If you do need to search for an exact match though, you can use "" marks.

此外,您可以在單引號內使用多個":

Further, you can use multiple "" inside the single quotes:

CONTAINS('"word1" or "word2" or "word3"')

這也有效:

CONTAINS('"word1" and "word2" and "word3"')

雙引號內的任何內容都被視為精確文本.因此,如果我要搜索 AdventureWorks 中 Production.ProductDescription 表的 Description 字段,我可以使用

Anything put inside the double quotes is treated as exact text. Thus if I were to do a search of the Description field of the Production.ProductDescription table in AdventureWorks, I could use

CONTAINS('shifting and "on or off-road"') 

并且它會找到與on or off-road"這個詞組匹配的詞 shift.

and it would find matches for the word shifting that also had the phrase "on or off-road".

唯一的特殊符號是 ~,它可以用來代替 NEAR 命令.

The only special symbol is the ~, it can be used in place of the NEAR command.

CONTAINS('shifting ~ smooth')

CONTAINS('shifting NEAR smooth')

and 將找到單詞 shift 和 smooth 彼此靠近的匹配項.

and will find matches where the words shifting and smooth are near each other.

這篇關于轉義括號 [ 在 CONTAINS() 子句中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

SQL trigger on Truncate(截斷時的 SQL 觸發器)
sql search query with multiple optional search parameters(具有多個可選搜索參數的 sql 搜索查詢)
SQL Efficiency: WHERE IN Subquery vs. JOIN then GROUP(SQL 效率:WHERE IN 子查詢 vs. JOIN 然后 GROUP)
Retrieving XML element name using t-SQL(使用 t-SQL 檢索 XML 元素名稱)
Insert double quotes into SQL output(在 SQL 輸出中插入雙引號)
Delete rows from CTE in SQL SERVER(從 SQL SERVER 中的 CTE 中刪除行)
主站蜘蛛池模板: 天天拍天天操 | 中国一级特黄真人毛片 | 日韩中出| 国产精品一区二区精品 | 特级黄一级播放 | 国产精品一区一区三区 | 国产999精品久久久久久 | 91高清视频在线观看 | 一区二区国产精品 | 欧美视频二区 | 亚洲精品视频一区二区三区 | 精品视频在线观看 | 亚洲欧美男人天堂 | 午夜黄色影院 | 日韩欧美在线免费观看 | 欧美日韩一 | 免费国产视频在线观看 | 亚洲精品一区二区三区蜜桃久 | 久久国产精品视频观看 | 精品综合在线 | 亚洲精品国产电影 | 久久aⅴ乱码一区二区三区 亚洲欧美综合精品另类天天更新 | 一区二区三区在线播放 | 久操伊人 | 午夜一级黄色片 | 日韩视频免费看 | 91精品国产综合久久久久久丝袜 | 久久久久国产精品午夜一区 | 国产精品人人做人人爽 | 亚洲av毛片| 国产99久久精品一区二区永久免费 | 日韩中文字幕区 | 中文字幕一区二区三区四区五区 | 国产高清精品一区二区三区 | 欧美一区2区三区4区公司 | 欧美成人黄色小说 | 美女天天操 | 日韩欧美一区二区三区免费观看 | 91久久精品国产免费一区 | 午夜精品久久久久久久久久久久久 | 艹逼网 |