Browse Prior Art Database

Method and System for Executing Structured Query Language (SQL) Queries with Aliases to a Table Name in a Markup Language

IP.com Disclosure Number: IPCOM000202328D
Publication Date: 2010-Dec-14
Document File: 3 page(s) / 73K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system for executing Structured Query Language (SQL) queries with aliases to a table name in a markup language is disclosed.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 54% of the total text.

Page 01 of 3

Method and System for Executing Structured Query Language (SQL) Queries with Aliases to a Table Name in a Markup Language

Disclosed is a method and system for executing Structured Query Language (SQL) queries with aliases to a table name in a markup language. The changes are made to Adaptive Server Enterprise (ASE*) layer to allow usage of alias to the table name. If the markup language does not have a library function to handle aliases for the table name, a SQL query is build by putting an alias directly after the table name in a FROM clause.

Figure illustrates a flowchart depicting an execution flow of queries that refers to multiple tables. A single query statement may be executed unlike multiple statements and the query operations may be performed in any other programming languages.

1


Page 02 of 3

Start

 Query requires usage of multiple tables?

Query has "$"?

 Construct a SQLSELECT or SQLSELECTINT O query and send it to ASE layer

No

Yes

Construct a SQLSELECT or SQLSELECTINTO query by prepending the alias name with the "$" and send it to ASE Layer

No

Yes

Do not prepend database qualifier for alias

Scan for table names and prepend with database qualifier name

Execute query

Stop

Figure

Initially, each subselect or an inner query is executed and the result of the execution is stored in a variable. The variable that contains the result set is then passed as a parameter to an outermost query. In a scenario, if the inner query has more than one subquery, this process may be repeated until t...