473,410 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

comma deliminited coloumn

I have two tables. One table (Table 1) has a column containing comma
delaminated email addresses. The other table (Table 2) has a column
with just one email address in it. I need to perform a query that
joins the comma delaminated table (Table 1) to Table 2, when the single
email address in Table 2, is contained in the list of email addresses
in (Table 1).

I hope this isn't too cryptic, and I know comma delaminated lists are
bad, but I can't do anything about that.

I need a select statement that can perform this task. Anyone have any
suggestions?

Mar 1 '06 #1
4 1716
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Set the WHERE clause like this:

WHERE table1.columnA like '%' + table2.columnA + '%'

BTW, it's "delimited" not "delaminated." Delaminated means to remove
the lamination (thin layers of some material) from a surface.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRAYMHoechKqOuFEgEQLfUgCgiFts2PFVLGIgVtIozCwnTc AinqsAoOIg
GOmdcAyO5uy641wMCQWwt4Sj
=3bUQ
-----END PGP SIGNATURE-----
ch******@gmail.com wrote:
I have two tables. One table (Table 1) has a column containing comma
delaminated email addresses. The other table (Table 2) has a column
with just one email address in it. I need to perform a query that
joins the comma delaminated table (Table 1) to Table 2, when the single
email address in Table 2, is contained in the list of email addresses
in (Table 1).

I hope this isn't too cryptic, and I know comma delaminated lists are
bad, but I can't do anything about that.

I need a select statement that can perform this task. Anyone have any
suggestions?

Mar 1 '06 #2
Thank you for the reply.

still doesn't work...

Sorry about the lamination, I kinda flew through the spell checker

Mar 1 '06 #3
(ch******@gmail.com) writes:
Thank you for the reply.

still doesn't work...


MGFosters looks good to me at a glance. Maybe you could be more specfic
to what does not work? Even better, provide CREATE TABLE statments and
INSERT statements with sample data. Then you can get a tested solution.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 1 '06 #4
This design seems to suck. You need some procedural routines to scrub
data, You need to look at Melisa data's website.

Mar 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Alberto Vera | last post by:
Hello: I have the next structure: How Can I make it using Python? How Can I update the value of 6?
4
by: Arne | last post by:
From: "Arne de Booij" <a_de_booij@hotmail.com> Subject: Comma delimited array into DB problems Date: 9. februar 2004 10:39 Hi, I have an asp page that takes input from a form on the previous...
5
by: Derek | last post by:
I came upon the idea of writting a logging class that uses a Python-ish syntax that's easy on the eyes (IMO): int x = 1; double y = 2.5; std::string z = "result"; debug = "Results:", x, y,...
2
by: benben | last post by:
I am looking for a good example of overloading operator , (operator comma) Any suggestions? Ben
3
by: SteelDetailer | last post by:
Thnaks in advance for considering this post. It's probably very simple, but..... I have an old VB6 application that allows me to create, save and edit a "project information file" that is a...
11
by: Shawn Odekirk | last post by:
Some code I have inherited contains a macro like the following: #define setState(state, newstate) \ (state >= newstate) ? \ (fprintf(stderr, "Illegal...
2
by: YMPN | last post by:
Hello Guys, I have a datetime coloumn, i want to extract time only this coloumn and save this time only to another coloumn in the same table. I am new to asp.net.. thanks..
15
by: Lighter | last post by:
In 5.3.3.4 of the standard, the standard provides that "The lvalue-to- rvalue(4.1), array-to-pointer(4.2),and function-to-pointer(4.3) standard conversions are not applied to the operand of...
3
by: supermen | last post by:
to all, how to split a column into 5 coloumn. e.g column= 1 2 1 3 4 into colomn1 = 1 colomn2 = 2 colomn3 = 1 colomn4 = 3 colomn5 = 4
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.