Thanks for your reply. It doesn't appear to be a sytax issue, as I can run the same code in a DTS ACtiveX script task and replace the column transformations with MsgBox's and have it work successfully.
I'm still in learning mode with regular expressions and am attempting a few things during a Trasformation task from one table to another. Basically what I'm trying to to is this: during the copy/import from one table to another, I'm trying to somewhat validate an email field. When it returns...
well, I found one solution:
/* variable for input subNo */
declare @usrSub int
set @usrSub = 1
declare myCursor INSENSITIVE CURSOR FOR
select subNo
From subsetMaster
where parent = @usrSub
open myCursor
-- Create the local variables needed
declare @subNo varchar(50)
declare @sub...
sorry, I guess it would have helped if I explained that part of it. If I pass in a 2, with 2 being the top level for this example, I need a result set consisting of 2, any subNo's with a parent = 2, any subNo's with a parent whose parent = 2 and so on.
I've got a table as follows:
subNo subName parent
1 National 1
2 VA 1
3 MD 1
4 Fairfax 2
5 Alexandria 2
6 Baltimore 3
I'm trying to create a query/procedure that will take an input variable (subNo) and then return all child subNo's in a temp table or table variable. I can't...
I'm trying to get the worksheet name from an excel workbook to pass into a global variable to be used to dynamically change the import task for importing the sheet. I can get the filename and path using the File System Object, but I can't seem to be able to get the first worksheet's name...
I'm trying to take a file that has a name of agtpacxxxxxx.txt where 'xxxxxx' can be almost anything, and copy it to a new file called agent.txt. I keep getting a path not found error when trying to use the following script:
Function Main()
Dim fso, sourceFile, destFile
Set fso =...
I've got a text file that is being a complete pain in the arse about importing. It's delimited, but doesn't seem to have a row delimiter, which is what's throwing everything off. I can specify no delimiter in a dts import, but it doesn't let me actually move the delimiter to the end of the...
thanks for the advice. This is exactly what my opinion on the matter was, I was having a debate with a programmer who wanted the additional column. My thinking is that a primary key that doesn't link to anything, isn't much of a primary key at all.
Thanks again
-Dan
If this is the wrong forum, please move this thread.
I've got two tables:
email_table
columns are emailNo, JobNo, emailBody, etc.
and
email_attachments
columns (right now) are EmailNo and AttachmentPath
There is a one to many relationship from email_table to email_attachments.
Primary key on...
well, the replace didn't quite work either, but I managed to figure it out:
declare @type varchar(20)
declare @newtype varchar(20)
declare @t1 varchar(2)
set @list = '1,2,3'
while charindex(',', @type)>0
begin
set @t1=(SELECT left(@type,charindex(',',@type)-1))
set...
thanks for the quick reply, #3 is definately the best answer, unfortunately this is an older version of our software on which development has essentially been halted. The problem has been resolved in our newer databases.
#1 doesnt' work due to the fact that it's a varchar field that I'm...
I tried searching and couldn't really find an answer to what I needed, so here goes:
I've got a field called type_list that is being passed into a cursor. This field is varchar and can contain single values or unlimited values seperated by a comma, like this: 1,2,3 . I then need to be able...
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.