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?--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--
cholmqui@.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?|||Thank you for the reply.
still doesn't work...
Sorry about the lamination, I kinda flew through the spell checker|||(cholmqui@.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, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||This design seems to suck. You need some procedural routines to scrub
data, You need to look at Melisa data's website.
No comments:
Post a Comment