Hello
I have two questions
1.what is the where condtion for generating last months data .I don't want to hard code month instead on the first of the month it will generate data for previous month(of course i will cron)
2.i have orders table
orderid,createddate and client_id
currently i am spooling data for each client like this
----------
spool \u01\client123.txt
select * from orders where client_id=123;
spool off
-------------
everytime we add a client or clients , it's just pain to go and edit this sql file to spool
Is there way to automatically generates data into different file based on clientid automatically?
Thanks for your time and help