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

Database

 
GeneralRe: Pivot? Pin
Andy_L_J27-Mar-11 23:47
Andy_L_J27-Mar-11 23:47 
QuestionWhat are solutions for a way-too-big database? Pin
bobbi200426-Mar-11 7:23
bobbi200426-Mar-11 7:23 
AnswerRe: What are solutions for a way-too-big database? Pin
Wendelius26-Mar-11 7:41
mentorWendelius26-Mar-11 7:41 
GeneralRe: What are solutions for a way-too-big database? Pin
bobbi200426-Mar-11 16:20
bobbi200426-Mar-11 16:20 
AnswerRe: What are solutions for a way-too-big database? Pin
PIEBALDconsult26-Mar-11 17:21
mvePIEBALDconsult26-Mar-11 17:21 
GeneralRe: What are solutions for a way-too-big database? Pin
bobbi200427-Mar-11 6:53
bobbi200427-Mar-11 6:53 
AnswerRe: What are solutions for a way-too-big database? Pin
Klaus-Werner Konrad31-Mar-11 8:42
Klaus-Werner Konrad31-Mar-11 8:42 
QuestionMultiple selection from the same table Pin
CodingLover25-Mar-11 19:43
CodingLover25-Mar-11 19:43 
Hi all,

I'm stuck with selecting multiple conditions in same table. I'll explain in this way. I've a table called tblPackages as follows.

package id value code
------- ---- ------ ------
pak 1 | 1 | 0 | 58
pak 2 | 3 | 0 | 58
pak 3 | 4 | 0 | 58
pak 1 | 3 | 10 | 31
pak 2 | 2 | 100 | 31
pak 3 | 3 | 8 | 31

so I want to find all the package details that id = 1 / code = 58 and id = 3 / code = 31. So the package should be 'pak 1'


I can explain the same like this. Say I execute the following query

select * from tblPackages where id = 1 and code = 58, the result is

package id value code
------- ---- ------ ------
pak 1 | 1 | 0 | 58

and then I execute the following query,

select * from tblPackages where id = 3 and code = 31, the result is

package id value code
------- ---- ------ ------
pak 1 | 3 | 10 | 31
pak 3 | 3 | 8 | 31


so the common result is,

package id value code
------- ---- ------ ------
pak 1 | 1 | 0 | 58
pak 1 | 3 | 10 | 31

That's what I want to get. From that later I want to get either code of 58 data or code of 31 data.

Can anyone of you comment on me. I've try to get data separately and merge manually, but it's not easy as i though.

thanks
I appreciate your help all the time...
CodingLover Smile | :)

AnswerRe: Multiple selection from the same table Pin
Аslam Iqbal26-Mar-11 0:14
professionalАslam Iqbal26-Mar-11 0:14 
AnswerRe: Multiple selection from the same table Pin
Wendelius26-Mar-11 0:53
mentorWendelius26-Mar-11 0:53 
AnswerRe: Multiple selection from the same table Pin
Luc Pattyn26-Mar-11 7:27
sitebuilderLuc Pattyn26-Mar-11 7:27 
GeneralRe: Multiple selection from the same table Pin
Wendelius26-Mar-11 7:45
mentorWendelius26-Mar-11 7:45 
GeneralRe: Multiple selection from the same table Pin
Luc Pattyn26-Mar-11 8:05
sitebuilderLuc Pattyn26-Mar-11 8:05 
GeneralRe: Multiple selection from the same table Pin
Wendelius26-Mar-11 8:07
mentorWendelius26-Mar-11 8:07 
Questiondynamically change column name Pin
amit sahu2025-Mar-11 1:16
amit sahu2025-Mar-11 1:16 
AnswerRe: dynamically change column name Pin
Simon_Whale25-Mar-11 1:31
Simon_Whale25-Mar-11 1:31 
AnswerRe: dynamically change column name Pin
Eddy Vluggen25-Mar-11 1:32
professionalEddy Vluggen25-Mar-11 1:32 
GeneralRe: dynamically change column name Pin
PIEBALDconsult25-Mar-11 3:03
mvePIEBALDconsult25-Mar-11 3:03 
GeneralRe: dynamically change column name Pin
Eddy Vluggen25-Mar-11 5:22
professionalEddy Vluggen25-Mar-11 5:22 
GeneralRe: dynamically change column name Pin
PIEBALDconsult25-Mar-11 16:00
mvePIEBALDconsult25-Mar-11 16:00 
GeneralRe: dynamically change column name Pin
Eddy Vluggen26-Mar-11 1:52
professionalEddy Vluggen26-Mar-11 1:52 
GeneralRe: dynamically change column name Pin
jschell25-Mar-11 8:29
jschell25-Mar-11 8:29 
GeneralRe: dynamically change column name Pin
PIEBALDconsult25-Mar-11 16:16
mvePIEBALDconsult25-Mar-11 16:16 
GeneralRe: dynamically change column name Pin
Eddy Vluggen26-Mar-11 2:04
professionalEddy Vluggen26-Mar-11 2:04 
GeneralRe: dynamically change column name Pin
jschell26-Mar-11 6:08
jschell26-Mar-11 6:08 

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.