Click here to Skip to main content
15,910,009 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to join two tables [modified] Pin
Krish - KP4-Jul-07 18:49
Krish - KP4-Jul-07 18:49 
AnswerRe: how to join two tables Pin
Michael Sync4-Jul-07 18:49
Michael Sync4-Jul-07 18:49 
QuestionHow can I call a DB2 system procedure GET_DBSIZE_INFO by .net? Pin
Jameson_cn4-Jul-07 17:54
Jameson_cn4-Jul-07 17:54 
Questionproblem with GetChanges [modified] Pin
goldoche4-Jul-07 9:14
goldoche4-Jul-07 9:14 
AnswerRe: problem with GetChanges Pin
goldoche4-Jul-07 10:38
goldoche4-Jul-07 10:38 
QuestionUsing a DataSet to insert data in a table througth a sproc Pin
Le centriste4-Jul-07 4:35
Le centriste4-Jul-07 4:35 
AnswerRe: Using a DataSet to insert data in a table througth a sproc Pin
goldoche4-Jul-07 9:46
goldoche4-Jul-07 9:46 
QuestionSQL query... need help Pin
Diana18114-Jul-07 4:02
Diana18114-Jul-07 4:02 
Hey guys,
I'm trying to figure something out with this query I'm writing up.
The schema of the research DB is as follows:

Department(DeptNum, Descrip, Instname, DeptName, State, Postcode)
Academic(AcNum, DeptNum, FamName, GiveName, Initials, Title)
Paper(PaNum, Title)
Author(*PaNum, *AcNum)
Field(FieldNum, ID, Title)
Interest(*FieldNum, *AcNum, Descrip)

Basically the question I'm trying to answer is:
Which academics have published a paper with at least one academic from Tasmania? Return their academic number, given name, family name, and department number.

(Hints: Use LIKE '%Tas%' to build the query in stages. If a paper is published by one academic and he (she) is from Tasmanian, do not output the academic for this reason. If a paper is published by two or more academics and at least one of them are from Tas, then output them.)

And so far after one week of doing my head in I have this:

select acnum,deptnum,famname,givename
from academic
where deptnum = any (select DeptNum
from department
where State LIKE '%Tas%'
or State LIKE '%TAS%');

I'm trying to select all the books with authors > 1 then elminiate all that have no tasmanians but I'm not sure how to write it up in sql. I was hoping someone can help me.

I also wanted to know which word or sign to use for "same" like if i want to search for authors with the same family name.
Thanks in advance Smile | :)
AnswerRe: SQL query... need help Pin
andyharman4-Jul-07 9:00
professionalandyharman4-Jul-07 9:00 
GeneralRe: SQL query... need help Pin
Diana18114-Jul-07 17:28
Diana18114-Jul-07 17:28 
GeneralRe: SQL query... need help Pin
Pete O'Hanlon4-Jul-07 22:29
mvePete O'Hanlon4-Jul-07 22:29 
AnswerRe: SQL query... need help Pin
andyharman4-Jul-07 22:46
professionalandyharman4-Jul-07 22:46 
GeneralRe: SQL query... need help Pin
Diana18116-Jul-07 0:39
Diana18116-Jul-07 0:39 
GeneralFunny with SELECT ... INTO Pin
Brady Kelly3-Jul-07 23:58
Brady Kelly3-Jul-07 23:58 
GeneralRe: Funny with SELECT ... INTO Pin
andyharman4-Jul-07 1:22
professionalandyharman4-Jul-07 1:22 
GeneralRe: Funny with SELECT ... INTO Pin
Mike Dimmick4-Jul-07 3:31
Mike Dimmick4-Jul-07 3:31 
QuestionRunning a SQL Script file using C# Pin
wasife3-Jul-07 19:25
wasife3-Jul-07 19:25 
AnswerRe: Running a SQL Script file using C# Pin
Colin Angus Mackay3-Jul-07 22:44
Colin Angus Mackay3-Jul-07 22:44 
GeneralRe: Running a SQL Script file using C# Pin
N a v a n e e t h4-Jul-07 3:33
N a v a n e e t h4-Jul-07 3:33 
GeneralRe: Running a SQL Script file using C# Pin
Colin Angus Mackay4-Jul-07 7:00
Colin Angus Mackay4-Jul-07 7:00 
GeneralRe: Running a SQL Script file using C# Pin
N a v a n e e t h4-Jul-07 18:20
N a v a n e e t h4-Jul-07 18:20 
GeneralRe: Running a SQL Script file using C# Pin
Colin Angus Mackay4-Jul-07 21:26
Colin Angus Mackay4-Jul-07 21:26 
QuestionColumn info in SQL Server 2005 Pin
I.explore.code3-Jul-07 18:39
I.explore.code3-Jul-07 18:39 
AnswerRe: Column info in SQL Server 2005 Pin
Tirthadip3-Jul-07 20:43
Tirthadip3-Jul-07 20:43 
QuestionDataTable Question using VB.NET Pin
HurricaneDan3-Jul-07 9:14
HurricaneDan3-Jul-07 9:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.