>>the script runs without errors , but some of the results are incorrect .
Not a lot to go on here, save for guesswork...
Examples and some sample qvw/source files would help.
>>Sometimes people pass a second parameter in the interval match , when do i need to do that?
This is usually for slowly changing dimensions (SCD), where the range is specific to the extra field(s) in the interval match. For more information on SCDs: