x

Who of the consultant is not certified, show their names and id.

CONSULTANT

C_ID    C_LAST  C_FIRST C_MI    C_ADD   C_CITY  C_STATE C_ZIP   C_PHONE C_EMAIL
100 Myers   Mark    F   10 Sky Blvd.    Orlando FL  32825   4075551212  mm@xx.com
101 Hernandez   Sheila  R   33 Left Cr. Orlando FL  32811   4071115555  sh@yyx.com
102 ZHANG   Brian       89 SE Ave.  Tampa   FL  32822   3211515555  bz@mm.org
103 Carlson Sarah   J   22 NW Pl.   Orlando FL  32825   4075111111  sc@uu.gov
104 Courtland   Paul    R   91 Water St.    Orlando FL  32800   4075151155  pc@pp.net
105 Park    Janet   S   15 High Rd. Miami   FL  32816   9541115555  jp@hr.net

CONSULTANTS _SKILL

C_ID SKILL_ID CERTIFICATION 100 1 Y 100 3 N 100 6 Y 101 4 N 101 5 N 102 7 Y 103 1 Y 103 6 Y 103 8 Y 103 9 Y 104 8 N 104 9 Y 105 2 N 105 3 N 105 4 Y 
more ▼

asked Mar 26, 2010 at 11:17 AM in Default

Michael 4 gravatar image

Michael 4
9 9 9 9

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

The easy solution would be to do these for you but aside from making my eyes bleed these look like simple join queries to me.

May I suggest you learn a bit about the join syntax in T-SQL through this great article here. Once you understand it a bit better you might be able to see how these queries and others you posted on here can be answered.

This could be more valuable in terms of personal development than just getting the answer.

more ▼

answered Mar 26, 2010 at 11:20 AM

Ian Roke gravatar image

Ian Roke
1.7k 30 33 34

Would the Answer look like this Select C_ID,Certification,C_last,C_first from consultant, Consultant_skill where C__ID=Certification And C_ID=101, Hernandez,Shelia And Certification=N
Mar 26, 2010 at 08:27 PM Michael 4
(comments are locked)
10|1200 characters needed characters left

You have provided nothing more than a query. You need to provide some detail and what your actual question is.

more ▼

answered Mar 26, 2010 at 02:57 PM

CirqueDeSQLeil gravatar image

CirqueDeSQLeil
4.8k 10 11 15

(comments are locked)
10|1200 characters needed characters left

Michael, use INNER JOIN and here is the general syntax

SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name

So based on the above syntax; for your specific question try something like this..

Select CONSULTANT.C_id, CONSULTANT.C_last, CONSULTANT.C.First
From CONSULTANT 
     INNER JOIN CONSULTANTS_SKILL 
     ON CONSULTANT.C_id = CONSULTANTS_SKILL.C_id

Good Luck!

more ▼

answered Mar 26, 2010 at 09:20 PM

DaniSQL gravatar image

DaniSQL
4.9k 33 35 39

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x375
x76

asked: Mar 26, 2010 at 11:17 AM

Seen: 1425 times

Last Updated: Mar 26, 2010 at 04:10 PM