Results of 1 - 10 of about 41 for Matching (0.003 sec.)
- Pattern Matching 14003
- There are four separate approaches to pattern matching provided by DuckDB: the traditional SQL LIKE operator , the more recent SIMILAR TO operator (added in SQL:1999), a GLOB operator , and POSIX-style regular expressions . LIKE The LIKE ex
...nds for (matches) any single character; a percent sign ( % ) matches any sequence of zero or more characters. LIKE pattern matching always covers the entire string. Therefore, if it's desired to match a sequence anywhere within a string, the pattern must...- false SELECT 'abc' NOT SIMILAR TO 'abc'; -- false In PostgreSQL, the ~ and !~ operators perform POSIX regular expression matching, not SIMILAR TO matching. DuckDB follows the same partial-matching semantics by default, see the PostgreSQL compatibility...be used in place of the GLOB keyword. GLOB-style Symbolic-style GLOB ~~~ Glob Function to Find Filenames The glob pattern matching syntax can also be used to search for filenames using the glob table function. It accepts one parameter: the path to searc... - https://man.mtool.work/duckdb/2.0/sql/functions/pattern_matching.html
- Text Functions 11936
- Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a
...ively. Negative values are accepted. string LIKE target Returns true if the string matches the like specifier (see Pattern Matching ). string SIMILAR TO regex Returns true if the string matches the regex (see Pattern Matching ). string ^@ search_string A...ilike_escape(string, like_specifier, escape_character) Returns true if the string matches the like_specifier (see Pattern Matching ) using case-insensitive matching. escape_character is used to search for wildcard characters in the string . instr(string.... like_escape(string, like_specifier, escape_character) Returns true if the string matches the like_specifier (see Pattern Matching ) using case-sensitive matching. escape_character is used to search for wildcard characters in the string . lower(string)... - https://man.mtool.work/duckdb/2.0/sql/functions/text.html
- Star Expression 11346
- Syntax The * expression can be used in a SELECT statement to select all columns that are projected in the FROM clause. SELECT * FROM tbl; TABLE.* and STRUCT.* The * expression can be prepended by a table name to select only columns from tha
...rom the * expression. SELECT * EXCLUDE (col) FROM tbl; New As of DuckDB 2.0, EXCEPT is accepted as a synonym for EXCLUDE , matching the SQL-standard and BigQuery spelling. The two keywords are interchangeable and may be mixed in the same query. sql SELEC...ws you to replace specific columns. SELECT * RENAME (col1 AS height, col2 AS width) FROM tbl; Column Filtering via Pattern Matching Operators The pattern matching operators LIKE , GLOB , SIMILAR TO and their variants allow you to select columns by matchi...z); x y z 1 2 a 3 4 c Regular Expressions in a COLUMNS Expression COLUMNS expressions don't currently support the pattern matching operators, but they do support regular expression matching by simply passing a string constant in place of the star: SELEC... - https://man.mtool.work/duckdb/2.0/sql/expressions/star.html
- Regular Expressions 10351
- DuckDB offers pattern matching operators ( LIKE , SIMILAR TO , GLOB ), as well as support for regular expressions via functions. Regular Expression Syntax DuckDB uses the RE2 library as its regular expression engine. For the regular express
...se otherwise. regexp_replace(string, pattern, replacement[, options]) If string contains the regexp pattern , replaces the matching part with replacement . By default, only the first occurrence is replaced. A set of optional options , including the globa...gexp_replace(string, pattern, replacement[, options]) | Description | If string contains the regexp pattern , replaces the matching part with replacement . By default, only the first occurrence is replaced. A set of optional options , including the globa...for Regular Expression Functions The regex functions support the following options . Option Description 'c' Case-sensitive matching 'i' Case-insensitive matching 'l' Match literals instead of regular expression tokens 'm' , 'n' , 'p' Newline sensitive ma... - https://man.mtool.work/duckdb/2.0/sql/functions/regular_expressions.html
- PostgreSQL Compatibility 9962
- DuckDB's SQL dialect closely follows the conventions of the PostgreSQL dialect. The few exceptions to this are listed on this page. Floating-Point Arithmetic DuckDB and PostgreSQL handle floating-point arithmetic differently for division by
...CREATE TABLE MyTaBLe (x INTEGER); SELECT table_name FROM duckdb_tables(); table_name mytable However, the case insensitive matching in the system for identifiers cannot be turned off. Using Double Equality Sign for Comparison DuckDB supports both = and =...the GROUP BY ALL clause . Behavior of Regular Expression Match Operators PostgreSQL supports the POSIX regular expression matching operators ~ (case-sensitive partial regex matching) and ~* (case-insensitive partial regex matching) as well as their nega...!~ and !~* , respectively. By default, DuckDB follows the same semantics: ~ maps to regexp_matches (case-sensitive partial matching), ~* performs case-insensitive partial matching, and !~ and !~* are their negated variants. The results therefore match Po... - https://man.mtool.work/duckdb/2.0/sql/dialect/postgresql_compatibility.html
- Reading Multiple Files 8393
- DuckDB can read multiple files of different types (CSV, Parquet, JSON files) at the same time using either the glob syntax, or by providing a list of files to read. See the combining schemas page for tips on reading files with different sch
...quet files have the same schema. You can specify which Parquet files you want to read using a list parameter, glob pattern matching syntax, or a combination of both. Directory Paths The read_parquet function accepts a local directory path and recursively...y, even if they contain Parquet data. To read those files, supply their filenames explicitly. If the directory contains no matching files, the query raises an error. Directory paths do not change how schemas are combined. When files have different column...lready contains a filename column and you want to avoid a name collision. Glob Function to Find Filenames The glob pattern matching syntax can also be used to search for filenames using the glob table function. It accepts one parameter: the path to searc... - https://man.mtool.work/duckdb/2.0/data/multiple_files/overview.html
- SQL Introduction 8393
- This page provides an overview of how to perform simple operations in SQL. This tutorial is only intended to give you an introduction and is in no way a complete tutorial on SQL. This tutorial is adapted from the PostgreSQL tutorial . DuckD
...3.000 Observe two things about the result set: There is no result row for the city of Hayward. This is because there is no matching entry in the cities table for Hayward, so the join ignores the unmatched rows in the weather table. We will see shortly ho...an get the Hayward records back in. What we want the query to do is to scan the weather table and for each row to find the matching cities row(s). If no matching row is found we want some “empty values” to be substituted for the cities table's columns. T...San Francisco 46 Hayward 37 Which gives us one output row per city. Each aggregate result is computed over the table rows matching that city. We can filter these grouped rows using HAVING : SELECT city, max(temp_lo) FROM weather GROUP BY city HAVING max... - https://man.mtool.work/duckdb/2.0/sql/introduction.html
- Troubleshoot 7895
- Overview This page collects common issues encountered when using the DuckDB Rust client, together with their workarounds. If you run into a problem that is not covered here, search the client's issue tracker on GitHub. Linking against a Sys
...$DUCKDB_LIB_DIR export DYLD_FALLBACK_LIBRARY_PATH=$DUCKDB_LIB_DIR # LD_LIBRARY_PATH on Linux cargo build On Linux, use the matching duckdb-shared-libs-linux-amd64.tar.gz or duckdb-shared-libs-linux-arm64.tar.gz archive and set LD_LIBRARY_PATH instead. Le...t the Build Download a Library Set DUCKDB_DOWNLOAD_LIB=1 and the build script downloads the prebuilt DuckDB library matching the crate's version from GitHub Releases, caches it under target/ , and adds it to the linker search path. Leave DUCKDB_ST... - https://man.mtool.work/duckdb/2.0/clients/rust/troubleshoot.html
- UPDATE Statement 7895
- The UPDATE statement modifies the values of rows in a table. Examples For every row where i is NULL , set the value to 0 instead: UPDATE tbl SET i = 0 WHERE i IS NULL; Set all values of i to 1 and all values of j to 2: UPDATE tbl SET i = 1,
...CT new.value FROM new WHERE original.key = new.key ); SELECT * FROM original; key value 1 new value 2 new value 2 Multiple Matching Source Rows If a target row matches multiple rows in the FROM clause, the target row is updated only once, using the value...s of one of the matching source rows. Which source row is used is not specified. For example, the following query sets v to either 10 or 20 : CREAT... - https://man.mtool.work/duckdb/2.0/sql/statements/update.html
- Migrating to DuckDB 2.0 7802
- DuckDB 2.0.0 is packed with new features and performance improvements, including query optimization and asynchronous I/O. It also ships a small set of breaking changes, most notably a new default storage format, which DuckDB versions before
...ferently in v2.0.0, which can silently change query results: The ~ and !~ operators now perform partial regular expression matching , following PostgreSQL: 'abc' ~ 'b' now returns true (previously false ). The deprecated regex_match_operator_semantics se...tting restores full matching: SET regex_match_operator_semantics = 'full'; The factorial operator ! binds more tightly: 2 * 3! now returns 12 (previous...e expression, wrap it in TRY , e.g., TRY(1 // 0) . Regular division ( 1 / 0 ) still returns inf . MERGE INTO with Multiple Matching Source Rows A MERGE INTO statement that would update or delete the same target row more than once, because the row matches... - https://man.mtool.work/duckdb/2.0/operations_manual/migration.html
DuckDB 2.0 Documentation / man.mtool.work