Solved

SSIS Compare TEXT Fields

Posted on 2013-12-19
3
412 Views
Last Modified: 2016-02-10
I need to compare two TEXT Fields from two tables to identify the changed records using SSIS 2005. How do I compare TEXT fields? can you please suggest any approach?
0
Comment
Question by:MRPT
3 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 39729631
We can suggest any approach as long as you can clearly define what you wish to do.

Spell out for us the table design of these two tables and which columns you wish to comapre.
Also spell out for us the movement of data so we know what is 'old' and 'new'.
0
 

Author Comment

by:MRPT
ID: 39729908
I have a Stage table which has new and updated  data
STAGE TABLE
CREATE TABLE [dbo].[StageData](
      ID int NOT NULL,
      Date datetime NULL,
      Name VARCHAR(50) NULL,
      NOTES TEXT NULL
)

This stage table columns needs to be compared to the another table (dbo.FinalTable- which has old data) to determine if any column value has changed, If changed, then update the value in the Final Table with the new value from stage table

CREATE TABLE [dbo].[FinalTable](
      ID int NOT NULL,
      Date datetime NULL,
      Name VARCHAR(50) NULL,
      NOTES TEXT NULL
)

I use CozyRoc to determine new and updated records. It works fine for all columns expect TEXT field Column

How can I compare TEXT Fields column to determine if the value as changed?
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 39733189
How can I compare TEXT Fields column to determine if the value as changed?
Answer: Don't use text data types use varchar(MAX) instead.

Text data types have been deprecated for over 8 years and should not be used any more.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can i use WITH CTE for checking exist value? 3 33
sql server computed columns 11 31
Tsql query 6 21
SQL Query Help Top 1 and Distinct? 6 23
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

770 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