Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
johhnyfrench
Starting Member
1 Post |
Posted - 2009-05-08 : 10:11:12
|
| Hi,I have a very difficult query to perform i dont know if its event possible. I basically have 3 tables.tblText---ID, Title, Summary, TexttblPanels--------PageID, PanelID, XMLDatatblPages---------PageID, Title, IsLiveI want a search which will search the tblText table and match on any words in Title, Summary or Text..so something like SELECT * FROM tblText where Title LIKE '% string passed in '% etc..I want this to return the ID for all rows it finds. I then want to use this ID to do a XPATH statement on the XMLData in the tblPanels table. The XmlData looks like<head><data><Textid>1</Textid><type>text area</type></data></head>so it would xpath to ID node ..if i matches ID to the Textid node then I want to return that row from the tblData table so i get the PageID...then finally I want to use the PageID to query the tblPages table to return the Title. In my search results I want to returnTitle = from tblPagesalso a nice to have would be to return the body of text found +- 200 chars..is this query even possible?...its a tough onethanks for your time though |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|