Method and system for rewriting a database query
The invention relates to a method and database system for rewriting a SQL query having at least one null sensitive expression (NSE) in a select list of the query, the query comprising at least one outer join command to be performed on at least two tables and involving a view or a Derived Table (DT)....
Saved in:
Main Authors | , , |
---|---|
Format | Patent |
Language | English |
Published |
02.02.2010
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention relates to a method and database system for rewriting a SQL query having at least one null sensitive expression (NSE) in a select list of the query, the query comprising at least one outer join command to be performed on at least two tables and involving a view or a Derived Table (DT). The method comprising the steps of: identifying at least one unmatching row belonging to the view or DT using non-nullable fields that belong to the outermost table in the view or DT; converting the NSE(s) from the at least one identified rows into a SQL case construct; and performing the at least one outer join. The database system comprising means for rewriting a SQL query having at least one null sensitive expression (NSE) in a select list of the query, the query comprising at least one outer join command to be performed on at least two tables and involving a view or a Derived Table (DT). The system comprises a device configured to identify at least one unmatching row belonging to the view or DT using non-nullable fields that belong to the outermost table in the view or DT; a device configured to convert the NSE(s) from the at least one identified rows into a SQL case construct; and a device configured to perform the at least one outer join. |
---|---|
Bibliography: | Application Number: US20060612019 |