Click here to Skip to main content
15,895,084 members
Home / Discussions / Database
   

Database

 
AnswerRe: Saving hashtable to sqlexpress database...Is is possible Pin
Scott Serl21-Sep-06 7:56
Scott Serl21-Sep-06 7:56 
QuestionSQL Query help Pin
picazo20-Sep-06 12:20
picazo20-Sep-06 12:20 
Hi,

I have tables:

Fruits:
FruitID | FruitName
====================
1       | Apple
2       | Orange
3       | Pear


Baskets:
Basket | FruitID | Amount
========================
Bask1  | 1       | 3
Bask2  | 1       | 5
Bask3  | 1       | 2
Bask1  | 1       | 1
Bask2  | 1       | 2
Bask1  | 3       | 2
Bask3  | 3       | 4


What query can I use to get the following table:

Basket | Apple | Orange| Pear
=============================
Bask1  | 3     | 1     | 2
Bask2  | 5     | 2     | NULL
Bask3  | 2     | NULL  | 4


Thanks in advance,

-----------------
Genaro

AnswerRe: SQL Query help Pin
albCode20-Sep-06 20:48
albCode20-Sep-06 20:48 
AnswerRe: SQL Query help Pin
Khawar Abbas120-Sep-06 23:49
Khawar Abbas120-Sep-06 23:49 
AnswerRe: SQL Query help Pin
i.j.russell21-Sep-06 2:22
i.j.russell21-Sep-06 2:22 
AnswerRe: SQL Query help Pin
Eric Dahlvang21-Sep-06 4:03
Eric Dahlvang21-Sep-06 4:03 
QuestionOracle Question Pin
Ennis Ray Lynch, Jr.20-Sep-06 8:14
Ennis Ray Lynch, Jr.20-Sep-06 8:14 
AnswerRe: Oracle Question Pin
Farhan Noor Qureshi20-Sep-06 11:03
Farhan Noor Qureshi20-Sep-06 11:03 
GeneralNot really Pin
Ennis Ray Lynch, Jr.20-Sep-06 11:24
Ennis Ray Lynch, Jr.20-Sep-06 11:24 
AnswerRe: Oracle Question Pin
Eric Dahlvang20-Sep-06 12:09
Eric Dahlvang20-Sep-06 12:09 
GeneralRe: Oracle Question Pin
Ennis Ray Lynch, Jr.20-Sep-06 14:57
Ennis Ray Lynch, Jr.20-Sep-06 14:57 
QuestionDatatables, rows and columns Pin
TheJudeDude20-Sep-06 8:11
TheJudeDude20-Sep-06 8:11 
AnswerRe: Datatables, rows and columns Pin
albCode20-Sep-06 20:56
albCode20-Sep-06 20:56 
GeneralRe: Datatables, rows and columns Pin
TheJudeDude21-Sep-06 2:26
TheJudeDude21-Sep-06 2:26 
QuestionSqlException - 'Login failed for user (user)' Pin
nlindley720-Sep-06 6:55
nlindley720-Sep-06 6:55 
AnswerRe: SqlException - 'Login failed for user (user)' Pin
Colin Angus Mackay20-Sep-06 22:31
Colin Angus Mackay20-Sep-06 22:31 
GeneralRe: SqlException - 'Login failed for user (user)' Pin
nlindley721-Sep-06 7:07
nlindley721-Sep-06 7:07 
Questiongetting Server ip using vb.net Pin
GabrielVarun20-Sep-06 3:54
GabrielVarun20-Sep-06 3:54 
QuestionSQL Server Pin
Bravoone_200619-Sep-06 22:38
Bravoone_200619-Sep-06 22:38 
AnswerRe: SQL Server Pin
Colin Angus Mackay20-Sep-06 2:31
Colin Angus Mackay20-Sep-06 2:31 
QuestionI cannot retrive the field value Pin
vicky0000019-Sep-06 21:56
vicky0000019-Sep-06 21:56 
QuestionSql to Excel Pin
minniemooo19-Sep-06 21:31
minniemooo19-Sep-06 21:31 
AnswerRe: Sql to Excel Pin
_AK_19-Sep-06 21:39
_AK_19-Sep-06 21:39 
Questionright alignment of data Pin
kodulkar_nilesh19-Sep-06 20:58
kodulkar_nilesh19-Sep-06 20:58 
QuestionSQL Server Query Help (Trying to compare two tables and display the nonmatching records Pin
choorakkuttyil19-Sep-06 20:12
choorakkuttyil19-Sep-06 20:12 

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.