Hi,
I have a value stoed in a file , it is a datetime value of prevoius run's mac date. now i want to use this value in the extraction query which is in an ODBC stage . Is there anyway to do this thing. please h elp me
use of Variables in the query part of ODBC stage
Moderators: chulett, rschirm, roy
use of Variables in the query part of ODBC stage
Regards,
Sajid KP
Sajid KP
Re: use of Variables in the query part of ODBC stage
Use a job sequence, and call your job using a job activity.
Write a routine/script to get the value from the file, use a user variable/or command activity before the job activity calling your job. Pass the user variable, which is your date time stored in file, to a job parameter (say DTTM). now you can use this parameter i your ODBC stage as #DTTM#.
Write a routine/script to get the value from the file, use a user variable/or command activity before the job activity calling your job. Pass the user variable, which is your date time stored in file, to a job parameter (say DTTM). now you can use this parameter i your ODBC stage as #DTTM#.
Regards
Palas
Palas
Re: use of Variables in the query part of ODBC stage
thanx alot Palas..Rubu wrote:Use a job sequence, and call your job using a job activity.
Write a routine/script to get the value from the file, use a user variable/or command activity before the job activity calling your job. Pass the user variable, which is your date time stored in file, to a job parameter (say DTTM). now you can use this parameter i your ODBC stage as #DTTM#.
i will do that .. but i dont know how exactly routine has to write as i am new to DS. There should be some simple way for this, as its a common requirement right??.. Anyways thanx alot for your quick reply..
i will be thankfull if you can post a code for routine for reading from a file ...
Regards,
Sajid KP
Sajid KP
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
if there are only dates in that file, just use a command stage in the sequence and run cat command with the <path>/<filename> as parameter. the command output will be the value you want.
Pass the command output as value after removing the fiels marks.
Pass the command output as value after removing the fiels marks.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
Thanx alot Priyadarshi Kunalpriyadarshikunal wrote:if there are only dates in that file, just use a command stage in the sequence and run cat command with the <path>/<filename> as parameter. the command output will be the value you want.
Pass the command output as value after removing the fiels marks.
i have done this way . its working .. The forum and your comments was very usefull .. thanx alot
Regards,
Sajid KP
Sajid KP