Skip to main content
Hi, I would like to write a query to get the values < 365 from an excel table. The name of the column is "Days in Process". I am unable to give the where condition.

Could you please share the sample of the excel file header with 1 record value? I will try to create the query for this.

 


Select * from [sheetname$] where Days in Process <365


QuickTip: Connect to an Excel Spreadsheet As a Database


Please share the an error description here


Hi @Adityaganesh Srinivasan​ ,

 

Are you using excel as a database or directly fetching data from excel?


So, I have to loop the excel and then put it in a database, then use the query?


The query like a

 

Select col1],,col2] from sheetname$] where col1] <365


 

 

Below is the excel file, I want to get the values for "days in Process" < 365

image


you can use if conditions with required column name <365.

 

 


yeah but that takes a lot of time since I have 10,000 rows. I connected the excel to the database and tried to fetch the data but its not working.


while fetching the data, the row values are stored in the record. so you can specify the By Name or Index

 

The index always starts with 0

For your cases, Days in Process - index number

 

For Example- Days in Process is the 1st column that should be 0

image


I wrote the query like SELECT * From [Table name$$] where Days in Process < 365. That threw an error


I am fetching data from excel

 


Reply