Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2004, 05:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default Merging Data

Hello all, I am trying to merge two sets of data, that will, most likely, be done daily however, I am not sure how to do it. It was suggested to me that it be done with a DTC script (which I have never used before) or I was thinking of a stored procedure. I am not sure how to write either one.

Here is what I need to accomplish:

What I need is a way take any of the records in the IIM_NHOsetupSheets table that have a 6 digit, numeric only value in Iprod and concatenate the IDesc field (and add a space) and the IDSCE field and write the result into the ToolDesc field of T_Tooling. Any records that exist in T_Tooling should be overwritten, any records that do not exist should be created.

I would also like to generate a log file that reports changes performed, but not absolutely necessary.

I can either connect to the original table located in the Data Warehouse, or I can connect to an instance that could be kept current with a MS-DTC process that can be located within the PM-Data database (my central database where T_Tooling is located). My data admin is pushing for the latter.


Table: IIM_nhosetupsheets

Fields:
      Name Type Length
      IPROD Char 15
      IDESC Char 30
      IDSCE Char 30
===============================
Table: T_Tooling

Fields:
      Name Type Length
      ToolID nvarchar 25
      ToolDesc nvarchar 25
================================

I have worked with stored procedures before, that use Case...When logic, but nothing that would be this complex I think.

Any help is welcome.
__________________
Mitch





Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Data in a Field MichelleArmstrong Access 2 November 21st, 2007 07:48 AM
Grouping/Merging Jens Rudolph XSLT 2 June 6th, 2007 02:50 AM
Merging files ajindal General .NET 2 January 10th, 2007 06:42 AM
Merging data from separate forms SParisi Infopath 0 January 9th, 2006 02:58 PM
merging data from web form to excel spreadsheet fmh002 Classic ASP Basics 1 June 30th, 2003 04:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.