query to split table and make new one

Shawn
Shawn used Ask the Experts™
on
I have a table where I want to do a query to only have 2 colums.

I wnat to take this table:
PageURL      FriendlyPage      FriendlyPageFrench      PageURLFrench
home.whyus      why-us      francais/pourquoi-nous      home.whyus&language=french
home.cover      welcome      francais/bienvenue      home.cover&language=french

and display it like this:
PageURL                  FriendlyPag
home.whyus                  why-us      
home.cover                  welcome
home.whyus&language=french      francais/pourquoi-nous
home.cover&language=french      francais/bienvenue


right now I have this:
SELECT     tblSiteMetaData.PageURL, tblSiteMetaData.FriendlyPage, 'francais/' + tblSiteMetaData_1.FriendlyPageFrench AS FriendlyPage, 
                      tblSiteMetaData_1.PageURL + '&language=french' AS FrenchPageURL
FROM         tblSiteMetaData INNER JOIN
                      tblSiteMetaData AS tblSiteMetaData_1 ON tblSiteMetaData.MetaDataID = tblSiteMetaData_1.MetaDataID
WHERE     (NOT (tblSiteMetaData.FriendlyPage IS NULL))

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Consultant
Top Expert 2009
Commented:
SELECT PageURL ,     FriendlyPage      
FROM TableName
UNION
SELECT PageURLFrench, FriendlyPageFrench      
FROM yourTableName

Author

Commented:
thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial