-
sqlloader
Hi Friends,
Can you help me please with some dos programming in win98 using
sqlloader?
I have sales files with date attached to it in my sales folder.
The file names look like this.
sales03012003.dat
The file content format (columns) are
store_no, total_items_sold,total_sales_amnt
001, 200, 1200.00
002, 250, 1500.00
.
.
.
separated by comma, corresponding to my daily_sales_table
store_no, total_items_sold, total_total_amnt, sales_date.
001 200 1200.00 03012003
002 250 1500.00 03012003
The input data does not contain sales_date, but it is to be taken
from the date attached to the file name. In unix I can capture the
date using the "cut" command and store it in a variable. But in
windows I do not know how.
Can you share me your knowledge in windows batch programming please?, on how to handle this problem. Or can you give me site where I could
learn batch programming in windows.
Thank you all in advance for your support.
-
write small VB script to get file name(the sub string u wanted)...
Invoke this VB script in batch pgm and in VB script pass back the value to a param in batch pgm....
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Hi
You can say date /T
You can also download and install cygwin..which allows you to run all unix commands on windows ;-)
You can also look here
http://www.tldp.org/LDP/abs/html/dosbatch.html#VIEWDAT
regards
Hrishy
Last edited by hrishy; 03-28-2003 at 07:42 AM.
-
Originally posted by hrishy
Hi
You can say date /T
regards
Hrishy
Hrishy:
if i am not wrong he wanted the date in the file & not necessarly it should be equal to current system date.
and mor over system date on dos gives u "DAY Date" which again needs some code to get only date part.
You can also download and install cygwin..which allows you to run all unix commands on windows ;-)
this is Kewl....
where can we get it?
is it free?
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
Hi
Abhay yes it is free..you can go to http://www.cygwin.com/ for downloading..open source just like linux..if you want the commercial which is slightly better then you can download the MKS toolkit
www.mks.com
well i assumed he wanted the current date..i should have asked :-)
regards
Hrishy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|