Skip to main content
Question

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.


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.

13 replies

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

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

 


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

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


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

Please share the an error description here


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

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?


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

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


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

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.


Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • February 7, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings