Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by DanC

  1. DanC

    Help using RegExp in a column Transformation

    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.
  2. DanC

    Help using RegExp in a column Transformation

    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...
  3. DanC

    Another Hierarchy question

    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...
  4. DanC

    Another Hierarchy question

    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.
  5. DanC

    Another Hierarchy question

    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...
  6. DanC

    Excel worksheet into global variable for dynamic connection

    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...
  7. DanC

    Using a wildcard in an activeX script task to copy files

    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 =...
  8. DanC

    Help importing a test file

    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...
  9. DanC

    Table Design and primary key suggestions

    no jumping going on here. We were just debating about how the structure would be set up.
  10. DanC

    Table Design and primary key suggestions

    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
  11. DanC

    Table Design and primary key suggestions

    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...
  12. DanC

    Help with parsing a comma delimited field

    sorry, the set @list = '1,2,3' should read set @type = '1,2,3'
  13. DanC

    Help with parsing a comma delimited field

    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...
  14. DanC

    Help with parsing a comma delimited field

    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...
  15. DanC

    Help with parsing a comma delimited field

    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...

Part and Inventory Search

Back
Top