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...
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...
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...
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...
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...
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]...
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...
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...
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...
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]')...
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...
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...
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...
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...
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...
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'...
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.