Solved

Fulltext-search with field as searchvalue

Posted on 2013-06-20
1
200 Views
Last Modified: 2013-06-20
Hi
I have the following code:
SELECT *,
(SELECT TOP 1 Datum FROM foOfferte_M1 B 
WHERE Kundennummer = 5 and B.Baustelle = A.Baustelle 
ORDER BY datum DESC) AS DatumOfferte
FROM foBaustellen_M1 A WHERE KundenLaufnummer = 5

Open in new window


It works but it is very slow. The field Baustelle is NTEXT-datatype. I tried to create a fulltextindex but this doesn't speed up the query.

is there another way to speed up or do query that data?
Thanks, Peter
0
Comment
Question by:formi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
Louis01 earned 500 total points
ID: 39262180
Try this?

SELECT A.col1
     , A.col2
     , A.col3
     , MAX(Datum) as Datum
  FROM foBaustellen_M1 A 
        LEFT OUTER JOIN foOfferte_M1 B 
    ON B.Baustelle = A.Baustelle 
   AND B.Kundennummer = 5 
 WHERE A.KundenLaufnummer = 5
 GROUP BY A.col1
        , A.col2
        , A.col3

Open in new window

0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question