Click here to Skip to main content
15,890,336 members
Home / Discussions / Database
   

Database

 
GeneralSELECT COUNT into a variable Pin
Luis Alonso Ramos2-May-05 8:10
Luis Alonso Ramos2-May-05 8:10 
GeneralRe: SELECT COUNT into a variable Pin
Christian Graus2-May-05 14:07
protectorChristian Graus2-May-05 14:07 
GeneralRe: SELECT COUNT into a variable Pin
Luis Alonso Ramos2-May-05 14:15
Luis Alonso Ramos2-May-05 14:15 
GeneralRe: SELECT COUNT into a variable Pin
Colin Angus Mackay2-May-05 20:03
Colin Angus Mackay2-May-05 20:03 
GeneralRe: SELECT COUNT into a variable Pin
Luis Alonso Ramos2-May-05 20:52
Luis Alonso Ramos2-May-05 20:52 
GeneralRe: SELECT COUNT into a variable Pin
Colin Angus Mackay2-May-05 22:32
Colin Angus Mackay2-May-05 22:32 
Generalinstall mysql Pin
Anonymous2-May-05 5:52
Anonymous2-May-05 5:52 
GeneralSimple JOIN in Access 2002 Pin
Larsenal1-May-05 13:30
Larsenal1-May-05 13:30 
I have three tables:
- Article
- Album
- linkArticleAlbum

I want get a list of all the albums and also have some way of determining whether it is linked to the currently selected article.

What I WANT to do is something like

SELECT 
linkArticleAlbum.Article,
Album.ID,
Album.Title
FROM Album LEFT JOIN linkArticleAlbum ON linkArticleAlbum.Album = Album.ID
WHERE linkArticleAlbum.Article = 7 OR linkArticleAlbum.Article IS NULL


Here's what my sample data looks like

Album
------
| ID |
   1
   2
   3

Article
-------
| ID |
   7
   8
   9

linkArticleAlbum
------------------
| Article | Album
    7        1
    8        1
    9        2


As you can see, I won't get a record with Album 2 since my WHERE clause eliminates it.

I'm stuck. Advise anything, including a redesign of my DB. I've apparently done something stupid and my murky brain can't figure it out right now.

········ to die is gain ········
GeneralRe: Simple JOIN in Access 2002 Pin
turbochimp2-May-05 2:35
turbochimp2-May-05 2:35 
GeneralRe: Simple JOIN in Access 2002 Pin
Larsenal2-May-05 8:00
Larsenal2-May-05 8:00 
QuestionHow to compare time Pin
Leelanga30-Apr-05 22:13
Leelanga30-Apr-05 22:13 
AnswerRe: How to compare time Pin
Alexey A Abramov3-May-05 9:09
Alexey A Abramov3-May-05 9:09 
GeneralRe: How to compare time Pin
Leelanga4-May-05 5:49
Leelanga4-May-05 5:49 
QuestionPossible to pass table as parametr to stored procedure??? Pin
_J_30-Apr-05 8:28
_J_30-Apr-05 8:28 
AnswerRe: Possible to pass table as parametr to stored procedure??? Pin
NewSilence30-Apr-05 18:52
NewSilence30-Apr-05 18:52 
GeneralRe: Possible to pass table as parametr to stored procedure??? Pin
_J_30-Apr-05 22:02
_J_30-Apr-05 22:02 
Questionhow to efficiently use dataset in large database? Pin
feyang30-Apr-05 2:24
feyang30-Apr-05 2:24 
AnswerRe: how to efficiently use dataset in large database? Pin
Colin Angus Mackay30-Apr-05 10:27
Colin Angus Mackay30-Apr-05 10:27 
GeneralBegineer 's questions:using ADO Pin
brilliant10129-Apr-05 20:40
brilliant10129-Apr-05 20:40 
GeneralSQL Query Problem. Pin
Asim N.29-Apr-05 16:23
Asim N.29-Apr-05 16:23 
GeneralRe: SQL Query Problem. Pin
Colin Angus Mackay30-Apr-05 0:48
Colin Angus Mackay30-Apr-05 0:48 
GeneralField change data type after detach and attach database to sql server Pin
Mekong River28-Apr-05 23:54
Mekong River28-Apr-05 23:54 
GeneralRe: Field change data type after detach and attach database to sql server Pin
Albert Pascual30-Apr-05 4:57
sitebuilderAlbert Pascual30-Apr-05 4:57 
GeneralRe: Field change data type after detach and attach database to sql server Pin
Mekong River30-Apr-05 19:40
Mekong River30-Apr-05 19:40 
GeneralInner Datagrid, date format Pin
mansir 12328-Apr-05 23:36
mansir 12328-Apr-05 23:36 

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.