Solved

Replace the column.

Posted on 2011-03-14
2
361 Views
Last Modified: 2013-11-10
I am trying to create a SSIS package where i have 2 txt files and be loaded into SQL.


txt file1 (10k records)                                                                txtfile 2(one record)
    empid  ename t1date                                                                t2date

I have the first text file with columns (empid,ename,t1date) with some 10k records and now i want this date column be replaced with date column of second text file(t2date). this second txt file contains only one record and one column. can I replace this one recrd with all 10k records?
I want to replace all these 10k records of t1date column with t2date record.

Hope am clear
Any suggestions is higly appreciated.
0
Comment
Question by:parpaa
2 Comments
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
Comment Utility
You're describing your problem both ways - which of the following situations are you trying to accomplish:

You have two text files, and you'd like to output the contents of file 1, but with the date in file1 replaced with the date from the single row in file2 (for all records)
You'd like to fill file2 with the contents of file1
You'd like to update file1, replacing the data in every row with the date from file2

Please clarify your question and I can help provide a solution to get this accomplished.
0
 

Author Comment

by:parpaa
Comment Utility
I have two text files, and you'd like to output the contents of file 1, but with the date in file1 replaced with the date from the single row in file2 (for all records)

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now