Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, Here r my problems: I

Status
Not open for further replies.

garfield11

IS-IT--Management
Jul 4, 2002
44
SG
Hi all,

Here r my problems:

I want to display Contact Date, Company Name n Consultant Name from database table "Contact" which BizInitiative= 2002 Insight GOLDTM.

This's my query:

SELECT Contact.Contact_ID,
Contact.Company_ID,
Contact.Consultant_ID,
Contact.ContactDate,
Contact.BizInitiative,
Company.Company_ID,
Company.CompanyName,
Consultants.Consultant_ID,
Consultants.ConsultantName
FROM Contact
LEFT JOIN Company ON Contact.Company_ID = Company.Company_ID
LEFT JOIN Consultants ON Contact.Consultant_ID = Consultants.Consultant_ID
WHERE Contact.BizInitiative = '2020 Insight GOLDTM'

Now I do a SELECT BizInitiative FROM Contact

Results: -
Contact_ID BizInitiative
1 Diversity Culture
2 C.R.E.S.T.Plus
3 OTsoft
4 DiSC Online
5 2020 Insight GOLDTM
6 2020 Insight GOLDTM, Balanced Scorecard, C.A.R.E Accreditation
7 Career Development Systems

Results shows 2 contact report(id 5 & 6) with 2020 Insight GOLDTM but it only display id 5 info n not both.

Can anyone please advise?

Thanks.

Love_Garfield
 
alter your SQL statement like this and try it:
Code:
...
WHERE Contact.BizInitiative LIKE '2020 Insight GOLDTM'
Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Hi.

Thanks for your reply.

Hmm... it doesn't seems to work either [sad] or :-(

Hmm... is it because "2020 Insight GOLDTM, Balanced Scorecard, C.A.R.E Accreditation" consider 1 string thats y? If yes, how can I split them out into separate stirngs like "2002 Insight GOLDTM", "Balanced Scorecard", "C.A.R.E Accreditation"?

Thanks.

Love_Garfield
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top