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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: DanC
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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 =...
  5. 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...
  6. 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...
  7. 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...
  8. DanC

    xp_cmdshell problem

    I've had a dts package scheduled for about 2 months that runs every day with no problem. All of the sudden, it errors out today. In the job history, this is what's displayed: The job failed. Unable to determine if the owner (LLC\dan) of job automated_clientv7_daily_pull has server access...
  9. DanC

    Constraint / primary key question

    Hopefully I can explain this clearly. I've come in on the tail-end of a development cycle of a database and I'm trying to figure out how to enforce integrity across some of the tables. The tables I'm dealing with right now are: CREATE TABLE [ppl_tab] ( [pplNo] [int] NOT NULL , [objNo] [int]...
  10. DanC

    dynamically creating a table

    I'm working on trying to somewhat denormalize a table so that it's easier for some of the people to work with. I've got a table set up like this: CREATE TABLE [def_tab] ( [defNo] [int] NOT NULL , [objNo] [int] NULL , [typeNo] [int] NULL , [defName] varchar(50) null ) where defNo is...
  11. DanC

    advice on how to delete a large recordset

    I've got a client database with several tables in in. I have an additional table of about 5 million records with a unique member ID that I need to link to the existing tables and delete the existing records based on that ID. I'm mainly concerned with 4 tables: address, individual...
  12. DanC

    need help with a possible coalesce query

    I'm in need of some help here. Below is an example of what I am trying to do: table ex. company_name registered date amount company1 VA 1/1/2003 5 company2 GA 4/3/2002 10 company1 MD 7/25/2002 4 company1 NC 8/2/2001 9 company3 CA 9/19/2000 25 company3 TX...
  13. DanC

    Copying a stored procedure to multiple databases

    I'm trying to copy a stored procedure to several client databases using the sp_MSforeachdb but am having some trouble. the command i'm trying to run is: EXEC sp_MSforeachdb @command1 = 'Use ? ; if not exists (select [name] from dbo.sysobjects where id = object_id(N'[dbo].[mystoredprocedure]')...
  14. DanC

    Update all databases on a server

    I need to add a column to an existing table in almost every database on our server (80+ db's) Not every database has the table, only about 75% of them. Is there any way using the sysdatabases table in the master db to cycle through the databases checking for the existence of the table, and if...
  15. DanC

    database maintenance error

    Hi all, I'm getting an error when trying to execute a database maintenance plan. I'm not doing any backup functions, just the optimizations and integrity check portion. These jobs used to work, but now they are not. The error I get in the text report is: Microsoft (R) SQLMaint Utility...
  16. DanC

    Export error in XP

    When try to export a table from SQL2k (about 600,000 records) to foxpro III, I get an error "Error at Destination for row number 340221. Errors encountered so far in this task : 1. Could not update; currently locked." This particular database isn't being accessed in any way, shape...
  17. DanC

    quick charindex question

    I have a phone number field that is varchar(50) that includes extensions. The extensions are designated by an 'x' as in 703 987-9878 x5543. The extension length varies. I can pull the extension part out into another column using: select right(wphone,len(wphone)-charindex('x',wphone)) from...
  18. DanC

    trigger help

    ok, first time working with triggers and, go figure, I ran into a problem. We have an application that allows clients to add new personnel records to a database through a web front-end. The client will add name, phone, address info which is written to two tables on SQL: individual1 and...
  19. DanC

    Fairly difficult question (at least for me)

    I'm trying to figure out the best way to get the results I want: mytable tabid distid colid cnt 1 Dist 1 0 189 1 Dist 1 1 433 1 Dist 1 2 8 1 Dist 2 0 55 1 Dist 2 1 2 1 Dist 2 2...
  20. DanC

    passing a parameter into a view

    Is there any way to pass a parameter into a view? What I'm trying to do is create a view based on a certain state. DECLARE @state VARCHAR(2) SET @state = 'CA' SELECT * FROM tier2v2 WHERE tier2v2.STATE = @state works fine, but when I try this: DECLARE @state VARCHAR(2) SET @state = 'CA'...

Part and Inventory Search

Back
Top