TAILIEUCHUNG - Use Wildcards and Ranges of Values in a SQL Query

Sử dụng các kí hiệu và các Phạm vi của các giá trị trong một SQL Query tôi cần để có thể hoặc là tìm kiếm cho một loạt các giá trị, hoặc ít nhất là có thể sử dụng thẻ hoang dã với truy vấn của tôi. Làm thế nào để làm điều này bằng cách sử dụng T-SQL? Kỹ thuật này là một trong những người khá đơn giản nhưng cần thiết như thế nào-TOS | Use Wildcards and Ranges of Values in a SQL Query I need to be able to either search for a range of values or at least be able to use wild cards with my query. How do I do this using T-SQL Technique This is one of those fairly simple but necessary How-Tos. You will learn how to use a combination of both wild cards and a range of values. Here is the T-SQL routine that you will use for this How-To SELECT FROM Orders INNER JOIN Customers ON WHERE LIKE A AND BETWEEN 11 01 1996 AND 12 01 1996 Note The literal values have been used here rather than the text box values that will be used in the How-To. Using Wild Cards Fairly similar to the wild cards of the old DOS days wild cards in T-SQL are fairly straightforward to use. It is just a matter of knowing which one to use for which task. When using wild cards you will use the LIKE operator as seen in the SQL string for this How-To. You can see where the LIKE operator is used with A . The is used to specify anything after the given letter. In this case it s used for anything starting with the letter A. This operator will of course have to have the OrderDate fall between the dates specified but we ll talk about this in a moment. You can use other wild cards as well such as the following Percent sign . You use this to specify any given group of characters. If used before a letter or group of letters you are then specifying that you want values ending with those letters. For instance if you specify ing you get skiing flying and so on. _ Underscore . You use this to specify a single character. For instance if you type _ake then you would get four-letters words such as lake bake and sake. Square brackets This is a range or group of characters to compare against. For example if you type B-D ake you would get bake and cake. Another way to use it with a group of letters would be to type BF ake. In .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.