kalyan_g
(kalyan g)
1
Hello Everyone,
I have one datatable that contains employee ID, name, and salary.
I want to write this datatable using excel as database approach.
I used below query in “Run command” activity but it is throwing syntax error in ‘create table statement’
"Create table [Sheet2$] as Select [Employee ID], [Employee Name], Salary from [Sheet1$] where Salary > 500000 "
Please help me to resolve this error and write the datatable to sheet2.
Thanks,
Kalyan
Hi @kalyan_g ,
Could you provide us the Error Screenshot ?
We would like to know what is the exact error message stated.
kalyan_g
(kalyan g)
3
Hi Arpan,
I have uploaded the screenshot,
Thanks,
Kalyan
Hi @kalyan_g ,
Apologies for the late response, Could you try the below modified Query if you have not found a solution yet :
Create table [Sheet2$] as (Select [Employee ID], [Employee Name], Salary from [Sheet1$] where Salary > 500000)
Let us know if it still doesn’t work or if you have found the solution already please post it.
kalyan_g
(kalyan g)
5
Thank you Arpan,
I will try and will let you know,
Kalyan
postwick
(Paul Ostwick)
6
I’m curious why you want to do it this way instead of just using Write Range which is very simple.
kalyan_g
(kalyan g)
7
Hi Postwick,
Yes, as you mentioned using write range is simple and quick, I also used that to solve the problem after some hours I started the thread
But I am curious to know if there is a possibility using SQL query.
1 Like