Hi,
I have the following line in my ActiveX script in a DTS package, it keeps giving me compilation error. Can anyone tell me why?
MyStringPosition = InStr( 1 , v_fullfilename , 'ABC' , 1 )
Thanks,
mariayx
Hi all,
Is there any guru out there that can help? I could not figure out how to put a variable as file name at step Text File(Source) in a DTS package. The previous step in the package is an Active X script which defines the variable.
Appreciate any help!
-mariayx
Hi all,
My ActiveX script loops on file names in a file directory and passes file name in a parameter one at a time as input source file for process in DTS package instead of specifying a fixed file name. Can anyone tell me about the syntax on how to pass the parameter for the file name? Thanks...
In Oracle procedure, when you declare a variable for a column in a table, you do
variable_name tble_name.column_name%type;
The variable will inherit the data type/size of the column in the table. If you need to change the column type/size in the future, you don't need to change all the...
Hi Jay,
Here is what I did before I ran into a problem.
I mapped the FTP directory to my local drive. And ran the following commands in DTS(I was logged on to the remote SQL Server at that moment from my PC and ran the step from there), but LoadFiles.txt did not get created on my local machine...
Hi everyone,
I need to read file names in a directory on an FTP server one at a time, pass the file name as a source data file in a DTS package, then load it into SQL Server tables. Keep on doing that until all the files in the directory are read and processed.
My question lies with the file...
I use SUBSTRING(@data_string, 12, 17) to get a substring from the following whole string '140PTOHCO 2DTT707904 CCONTINENTAL AIRLINES 460120030822 N'
But instead of getting '2DTT707904', I got only '2DTT707'. Can someone help?
Thanks,
mariayx
In my case the substring could either be a null or a string of 'yyyymmdd' format. Error returned:Syntax error converting datetime from character string.
Here is part of the code.
set @l_Submit_Date = SUBSTRING(@data_string, 54, 8)
set @l_Date_Updated = SUBSTRING(@data_string, 62, 8)...
Thanks for your response.
I changed it to convert(datetime,SUBSTRING(@data_string, 54, 8)), the procedure got created with out errors.
So I ran the procedure with the case that the substring is a NULL there. It looks like this:
set @data_string = '383430473 E...
Hi all,
I need to parse a char(97) string using substring and convert it into a date. The following substring is either in 'yyyymmdd' format or a null.
SUBSTRING(@data_string, 54, 8)
I tried CAST to convert it to a date. But it said "Syntax error converting datetime from character...
Good to know that I am in the right direction. But one more thing I am not sure how to handle is that if you look at the data format, one V or B type record could have more than more one N01, N02, N03 records. I wonder whether you have handled something similar with this before and could give...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.