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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 query for multiple tables

Author  Topic 

vidhya
Posting Yak Master

108 Posts

Posted - 2008-04-17 : 07:36:38
hi friends,

I m using pubs database. without using contains keyword i m getting result. if i use contains keyword i m not getting result.

select j.job_desc,e.fname,e.lname from jobs j,employee e where j.job_id=e.job_id and fname='Victoria'

This query displays as

desc fname lname
Managing Editor Victoria Ashworth



Below query displays as empty value
desc fname lname

select j.job_desc,e.fname,e.lname from jobs j,employee e where CONTAINS (e.fname, ' "Victoria" ')

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-17 : 07:38:36
Do you have FULLTEXT installed?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

vidhya
Posting Yak Master

108 Posts

Posted - 2008-04-17 : 07:48:31
hi pespo,

s i installed fulltext. while i m using single table with single database, i m getting result. If i use more than one table with single database , i m not getting result.
Go to Top of Page

gayoosoftware
Starting Member

8 Posts

Posted - 2008-04-21 : 00:20:20
try this

select j.job_desc,e.fname,e.lname from jobs j,employee e where CONTAINS (e.fname, 'Victoria')
Go to Top of Page

vinoth86
Starting Member

27 Posts

Posted - 2008-04-21 : 03:03:07
Hi Vidya,
If you working in SQL Server..
I am new to SQL Server..Can you help me for a while.

My Previous experience is in Oracle.Lets we be a friends..

Thanks,
Go to Top of Page
   

- Advertisement -