dbTalk Databases Forums  

Table Question

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Table Question in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Py
 
Posts: n/a

Default Table Question - 11-10-2003 , 04:53 PM







I have one table that combines the last and first name in a field. I
used DTS to import a table from another database that has the same first
and last names but in seperate fields. The name data is the only common
thing between the tables. How do I combine data from the 2 tables? Help
appreciated. Thanks

Frank


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Table Question - 11-10-2003 , 06:45 PM






Combine them how? Do you need to query on the two? Do you
need data from both tables into another table? Do you need
the imported table data to update the existing full name
table? Do you need to insert data from the imported table to
the existing full name table? Or do you just need to take
the imported data and insert that data into the full name
table data? There are a lot of ways to interpret your
request. If it's an import or insert issue, you can likely
accomplish what you need by concatenating the fields in a
query - e.g. select FirstName + ' ' + LastName As FullName
from SomeTable.
You may want to consider keeping the first name and last
name separate. Combining the two for a full name is
generally more of a display issue and can be handled by
client applications or using a query as noted above. They
really are separate attributes. Combining them can also lead
to other problems and limitations.

-Sue

On Mon, 10 Nov 2003 14:53:54 -0800, Frank Py
<fpy (AT) proactnet (DOT) com> wrote:

Quote:
I have one table that combines the last and first name in a field. I
used DTS to import a table from another database that has the same first
and last names but in seperate fields. The name data is the only common
thing between the tables. How do I combine data from the 2 tables? Help
appreciated. Thanks

Frank


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #3  
Old   
Frank Py
 
Posts: n/a

Default Re: Table Question - 11-11-2003 , 10:08 AM




Sorry, I should have been more descript with my intentions. I am trying
to create a table or view from 2 tables. One table I imported from
another database on the same server.

I am using this table or view to form a single record source for a mail
merge in Excel or Crystal Reports. Table 1 has separate last and first
name fields and addresses. Table 2 has username and passwords I need for
the mailings.

Help appreciated. Thanks.
Frank


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Table Question - 11-11-2003 , 01:33 PM



And table two has the FullName? You could try to join these
by using the FullName field and the concatenatation of the
FirstName and LastName although it will be slow and could be
prone to data related errors with table 2 using full names.
But with the names being the only thing in common between
the two, that's likely all you can do. And hope you never
have two names that are the same. It's the design that is
causing the problems and you will likely end up in similar
situations, problems.

-Sue

On Tue, 11 Nov 2003 08:08:04 -0800, Frank Py
<fpy (AT) proactnet (DOT) com> wrote:

Quote:
Sorry, I should have been more descript with my intentions. I am trying
to create a table or view from 2 tables. One table I imported from
another database on the same server.

I am using this table or view to form a single record source for a mail
merge in Excel or Crystal Reports. Table 1 has separate last and first
name fields and addresses. Table 2 has username and passwords I need for
the mailings.

Help appreciated. Thanks.
Frank


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #5  
Old   
Frank Py
 
Posts: n/a

Default Re: Table Question - 11-11-2003 , 03:09 PM




That worked, Thanks. Lucky I only have a little over 100 unique records
for these tables.

Sincerely,
Frank


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #6  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: Table Question - 11-11-2003 , 07:43 PM



Thanks for posting back your results...glad it worked for
you. Hope the size stays small and the records stay unique!

-Sue

On Tue, 11 Nov 2003 13:09:48 -0800, Frank Py
<fpy (AT) proactnet (DOT) com> wrote:

Quote:
That worked, Thanks. Lucky I only have a little over 100 unique records
for these tables.

Sincerely,
Frank


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.