Skip to content

Commit e5b968e

Browse files
committed
Some updates
1 parent 7686296 commit e5b968e

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

articles/storage/blobs/query-acceleration-sql-reference.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,28 @@ The query acceleration SQL language supports only a tiny subset of the data type
9191

9292
The query acceleration SQL language supports the following standard SQL string functions:
9393

94-
``LIKE``, ``CHAR_LENGTH``, ``LOWER``, ``UPPER``, ``SUBSTRING``, ``TRIM``, ``LEADING``, ``TRAILING``.
94+
``LIKE``, ``CHAR_LENGTH``, ``CHARACTER_LENGTH``, ``LOWER``, ``UPPER``, ``SUBSTRING``, ``TRIM``, ``LEADING``, ``TRAILING``.
95+
96+
Here's a few examples:
97+
98+
|Function|Example|Result|
99+
|---|---|---|
100+
|CHARACTER_LENGTH|``SELECT CHARACTER_LENGTH('abcdefg') from BlobStorage`` |``7``|
101+
|CHAR_LENGTH|``SELECT CHAR_LENGTH(_1) from BlobStorage``|``1``|
102+
|LOWER|``SELECT LOWER('AbCdEfG') from BlobStorage``|``abcdefg``|
103+
|UPPER|``SELECT UPPER('AbCdEfG') from BlobStorage``|``ABCDEFG``|
104+
|SUBSTRING|``SUBSTRING('123456789', 1, 5)``|``23456``|
105+
|TRIM|``TRIM(BOTH '123' FROM '1112211Microsoft22211122')``|``Microsoft``|
106+
107+
The [LIKE](https://docs.microsoft.com/sql/t-sql/language-elements/like-transact-sql?view=sql-server-ver15) function helps you to search for a pattern. Here's a few examples that use the [LIKE](https://docs.microsoft.com/sql/t-sql/language-elements/like-transact-sql?view=sql-server-ver15) function to search the data string ``abc,abd,cd\ntest,test2,test3\na_bc,xc%d^e,gh[i ``
108+
109+
|Query|Example|
110+
|--|--|
111+
|``SELECT _1, _2, _3 from BlobStorage where _2 LIKE 'a%'``|``abc,abd,cd\n``|
112+
|``SELECT * from BlobStorage where _1 LIKE 'a[bcd]c``|``abc,abd,cd\n``|
113+
|``SELECT _1 from BlobStorage where _2 LIKE '[^xyz]%'``|``abc\ntest\n``|
114+
|``SELECT * from BlobStorage where _1 LIKE 'a_``|``abc,abd,cd\n``|
115+
|``SELECT _2,_3 from BlobStorage where _3 LIKE '[g-h]_![[a-j]' Escape '!'``|``xc%d^e,gh[i\n``|
95116

96117
### Date functions
97118

@@ -280,17 +301,17 @@ SELECT weight,warehouses[0].longitude,id,tags[1] FROM BlobStorage[*]
280301

281302
## Sys.Split
282303

283-
This is a special form of the SELECT statement, which is only available for CSV-formatted data.
304+
This is a special form of the SELECT statement, which is available only for CSV-formatted data.
284305

285306
```sql
286307
SELECT sys.split(split_size)FROM BlobStorage
287308
```
288309

289-
Use this statement to get batches of data records from a CSV file. That way you can process records in parallel instead of having to download them all at one time.
310+
Use this statement to return data records in batches of a specific size. That way you can process records in parallel instead of having to download them all at one time.
290311

291-
Use the *split_size* parameter to specify the number of bytes that you want the statement to return. For example, if you want to process only 10 MB of data, you're statement would look like this: `SELECT sys.split(10485760)FROM BlobStorage` because 10 MB is equal to 10,485,760 bytes. This statement returns as many records as can fit into those 10 MB.
312+
Use the *split_size* parameter to specify the number of bytes that you want each batch to contain. For example, if you want to process only 10 MB of data at a time, you're statement would look like this: `SELECT sys.split(10485760)FROM BlobStorage` because 10 MB is equal to 10,485,760 bytes. Each batch will contain as many records as can fit into those 10 MB.
292313

293-
In most cases, the total bytes returned will be slightly higher than the number that you specify. That's because the **sys.split** function returns complete records only, and a record might start just before the threshold that you specify.
314+
In most cases, the total bytes contained in each batch will be slightly higher than the number that you specify. That's because the **sys.split** function returns complete records only, and a record might start just before the threshold that you specify.
294315

295316
>[!NOTE]
296317
> The split_size must be at least 10 MB (10485760).

0 commit comments

Comments
 (0)