If you work with traditional RDBMS and you recently come to NoSQL world you will quickly realize that most of NoSQL database including
.
But no worry we got you covered. We have implemented custom query parser which will do hard work for you so you don't have to spend time learning fetching various data based on conditions for Excel. Our query engine
will
-- Basic Query - Use of Order By, Alias, Comments
-- This example shows how to write a basic query to read data from excel. It support Comments, WHERE Clause, ORDER BY Clause, WITH Clause to specify options.
select
top 5 RowId, FName as [First Name], LastName as [Last Name], Age, BirthDate,Amount
from [Sheet- 1] where RowId < 6 and Amount is not null order by RowId desc with (FormattedColumns='BirthDate|Amount',RangeStartCell='C3',HeaderLess=false,SkipRows=0)
-- Limit rows (TOP N)
-- This example shows how to return TOP N rows only. When you use TOP clause it first applies WHERE clause and then apply TOP
select
top 10 * from [Sheet-1] where RowId < 6
-- Select, Alias, Column name with space
-- This example shows how to use alias for column names, how to use identifiers with space (Table or column name).
select
RowId, FName as [First Name], LastName as [Last Name] from [Sheet-1] where RowId < 6
-- Formatting Columns
-- This example shows how to output certain columns with formatting defined in excel. Use FormattedColumns='Column1|Column2|...' Syntax in the WITH clause. Separate each column by vertical bar.
select
RowId, FirstName, LastName, BirthDate, Amount from [Sheet-1] Where RowId < 6 with (FormattedColumns='BirthDate|Amount')
-- Query from named range
-- This example shows how to query named range just like a table. Use [NamedRange:YourNamedRange] as table name in the FROM clause.
select * from [NamedRange:MyRange]
-- Order By Clause
-- This example shows how order rows first by CompanyName in Ascending and then SalesAmount Descending order (Highest amount at the top).
select * from [Sheet-1] order by CompanyName asc, SalesAmount desc
-- Group By Clause (Not Supported)
-- WITH Clause Options
-- This example shows how to use various advanced options in the WITH clause.
select
* from [Sheet-1] Where RowId < 6 with (FormattedColumns= 'BirthDate|Amount', HeaderLess=false, SkipRows=0, RangeStartCell= 'A1', RangeEndCell='G500', FormatValues=false)
-- Keyword - IN
-- This example shows how to use IN keyword.
select
* from [Sheet-1] Where Country in ('US','UK','Canada')
-- Keyword - NOT IN
-- This example shows how to use NOT IN keyword.
select
* from [Sheet-1] Where Country not in ('US','UK','Canada')
-- Keyword - IS NULL
-- This example shows check for NULL values.
select
* from [Sheet-1] Where Country is null
-- Keyword - NOT NULL
-- This example shows check for Non-NULL values.
select
* from [Sheet-1] Where Country is not null
-- Keyword - LIKE
-- This example shows how use LIKE keyword for pattern search. Use % as wildcard pattern. Only % is supported.
select
* from [Sheet-1] Where CompanyName like 'Zappy%'
-- Keyword - NOT LIKE
-- This example shows how use NOT LIKE keyword for pattern search. Use % as wildcard pattern. Only % is supported.
select
* from [Sheet-1] Where CompanyName not like 'Zappy%'
-- Keyword - AND/OR
-- This example shows how use simple or nested conditions using AND/OR keyword.
select
* from [Sheet-1] Where (GroupNum= 1 OR GroupNum= 2) and Country IN ('US','BHARAT')
-- Regular Expression - Read Sheet(s) (single or multiple screens)
-- This example shows how use select Sheet(s) by doing pattern search (Regular Expression). Use regex pattern for Table name and suffix with --regex to indicate its a pattern search
select
* from [Sheet-(\d+)--regex] Where (GroupNum= 1 OR GroupNum= 2) and Country IN ('US','BHARAT')
-- Regular Expression - Read Named Range(s) (single or multiple ranges)
-- This example shows how use select data from named range(s) by doing pattern search (Regular Expression). Use regex pattern for Named range name and suffix with --regex to indicate its a pattern search
select
* from [NamedRange:MyRange(\d+)--regex] Where (GroupNum= 1 OR GroupNum= 2) and Country IN ('US','BHARAT')
-- Regular Expression - Dynamic sheets select based on the contact search (from single or multiple sheets)
-- This example shows how select sheet by doing data search inside sheet (Regular Expression Data Search). Use regex pattern for Table name and suffix with --regex to indicate its a pattern search
select
* from [Sheet(.*)--regex] Where (GroupNum= 1 OR GroupNum= 2) and Country IN ('US','BHARAT') WITH (SearchStringForTabSelect='SALES REPORT \d+--regex')