Syntax Problem
From: Wayne Wengert (wayneDONTWANTSPAM_at_wengert.com)
Date: 06/21/04
- Next message: Paul: "Re: Please help: Assign results to variables"
- Previous message: Mauro Masucci: "Never Mind"
- Next in thread: Aaron [SQL Server MVP]: "Re: Syntax Problem"
- Reply: Aaron [SQL Server MVP]: "Re: Syntax Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Jun 2004 08:36:41 -0600
I am trying to put the result of a select statement into a new table. The
statement I am trying to use is below - it fails with a complaint about the
parens. I can't seem to figure out the correct way to write this
==========================================
select
*
into
Test1
from
(SELECT DISTINCT tmpMailList.NamesID, Names.FirstName, Names.LastName,
Names.Addr1, Names.Addr2,
Names.City, Names.StateProv, Names.ZIP, Names.Country, Names.DayPhone,
Names.Email, Units.FullName,
Units.HomeCity, Units.HomeState, Units.HomeCountry, Units.CG, Units.Class
FROM (tmpMailList INNER JOIN [Names] ON tmpMailList.NamesID = Names.NameID)
Inner Join Units On Names.NameID = Units.Contact
WHERE tmpMailList.NamesID IN (45895, 44900, 775, 49225, 49199, 2116, 2436,
2834, 2898, 44169, 3236,
3256, 3907, 4003, 49057, 49511, 5480, 46270, 6917, 7409, 8914, 9288, 49393,
10062, 10737, 47017, 11142,
11378, 11569, 11661, 34186, 14998, 15177, 47266, 48973, 16920, 17085, 46833,
18120, 18961, 19691))
- Next message: Paul: "Re: Please help: Assign results to variables"
- Previous message: Mauro Masucci: "Never Mind"
- Next in thread: Aaron [SQL Server MVP]: "Re: Syntax Problem"
- Reply: Aaron [SQL Server MVP]: "Re: Syntax Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|