SQL help needed
-
Hi All, I have 2 tables Table name: Property_Master Pm_id | Remarks 1 | Good 2 | Bad 3 | fair Table Name: Property_Details PD_id | Pd_Pm_Id | Price 1 | 1 | 2000 2 | 1 | 2100 3 | 2 | 5000 4 | 2 | 5500 5 | 3 | 2500 I want following result PM_Id | Pd_Pm_Id | Price | Remarks 1 | 1 | 2000 | Good 2 | 2 | 5000 | Bad 3 | 3 | 2500 | Fair How to write SQL query for it. How it is possible. Please help me. Jegastar
-
Hi All, I have 2 tables Table name: Property_Master Pm_id | Remarks 1 | Good 2 | Bad 3 | fair Table Name: Property_Details PD_id | Pd_Pm_Id | Price 1 | 1 | 2000 2 | 1 | 2100 3 | 2 | 5000 4 | 2 | 5500 5 | 3 | 2500 I want following result PM_Id | Pd_Pm_Id | Price | Remarks 1 | 1 | 2000 | Good 2 | 2 | 5000 | Bad 3 | 3 | 2500 | Fair How to write SQL query for it. How it is possible. Please help me. Jegastar
See the answers that we gave to you yesterday. It looks like you need to use a join. BTW - this also looks suspiciously like homework, so don't expect people on this site to do it for you.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.
-
See the answers that we gave to you yesterday. It looks like you need to use a join. BTW - this also looks suspiciously like homework, so don't expect people on this site to do it for you.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.
-
I already gave you a hint. If you've got two tables and you need the results out of both, use a JOIN. Google it.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.
-
Hi All, I have 2 tables Table name: Property_Master Pm_id | Remarks 1 | Good 2 | Bad 3 | fair Table Name: Property_Details PD_id | Pd_Pm_Id | Price 1 | 1 | 2000 2 | 1 | 2100 3 | 2 | 5000 4 | 2 | 5500 5 | 3 | 2500 I want following result PM_Id | Pd_Pm_Id | Price | Remarks 1 | 1 | 2000 | Good 2 | 2 | 5000 | Bad 3 | 3 | 2500 | Fair How to write SQL query for it. How it is possible. Please help me. Jegastar
-
I already gave you a hint. If you've got two tables and you need the results out of both, use a JOIN. Google it.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.
I realise that you are trying to help mate, but if you have the time to give him a hint, you also have the time to explain to him what a Join is. You don't have to give him the answer, but your attitude should be more like a supportive teacher than a guy who tells people to 'Google it' and leave you alone. If everyone simply googles everything, then there is no need for this website is there? Your hints are appreciated and helpful, especially when I get them, but for all newbies including myself, it's the attitude that bites. Don't take this the wrong way. I would like to see positive and supportive attitude on forums like this as I'm am sure many people would. EDIT: Don't make sweeping statements that people on this site "won't do his homework for him" because regardless of whether it is homework, we all need help with our work. It's what this site is for.. go figure..
-
I realise that you are trying to help mate, but if you have the time to give him a hint, you also have the time to explain to him what a Join is. You don't have to give him the answer, but your attitude should be more like a supportive teacher than a guy who tells people to 'Google it' and leave you alone. If everyone simply googles everything, then there is no need for this website is there? Your hints are appreciated and helpful, especially when I get them, but for all newbies including myself, it's the attitude that bites. Don't take this the wrong way. I would like to see positive and supportive attitude on forums like this as I'm am sure many people would. EDIT: Don't make sweeping statements that people on this site "won't do his homework for him" because regardless of whether it is homework, we all need help with our work. It's what this site is for.. go figure..
Thanks for the insight, especially as I spend a lot of my time answering questions for people. However, you will find that there are a lot of times when it looks as though people want you to do their homework for them, and the best thing that you can do for them is to give them a hint and see how they go from their. I spend a large amount of my time helping people here, giving something back to the CP community.
Dayekh wrote:
EDIT: Don't make sweeping statements that people on this site "won't do his homework for him" because regardless of whether it is homework, we all need help with our work. It's what this site is for.. go figure..
Errm actually, the site isn't for homework (and you will find that a lot of people on this site will answer you in precisely the same way that I did - not a sweeping statement, but the fact that I have used this site for a long time). I don't think that teachers would appreciate us doing the homework for somebody. That doesn't help them - and I speak as somebody who used to be a teacher. Give them a hint certainly, point them in the general direction, but don't give them the answer. If you do this, then you sell them short because they have not answered things for themselves - and missed the sense of achievement that they will get from this.
Dayekh wrote:
If everyone simply googles everything, then there is no need for this website is there? Your hints are appreciated and helpful, especially when I get them, but for all newbies including myself, it's the attitude that bites. Don't take this the wrong way. I would like to see positive and supportive attitude on forums like this as I'm am sure many people would.
As soon as somebody says something like this, I automatically take it the wrong way. If I didn't want to be bothered, I wouldn't have answered the post. What I do want is for you to learn something when I answer, and that means that I will often give you hints to point you in the right direction. That way, you learn something on your own and it sticks. If I give you the answer then you don't learn anything. You won't remember it. If you don't like my attitude, then mate, that is your problem and not mine. I'm not going to change the way that I answer just for you. If I can help, I will. If I think that you need a specific answer, I will give you one. If I think that you can undertake a personal journey and learn something on your own, I w
-
Thanks for the insight, especially as I spend a lot of my time answering questions for people. However, you will find that there are a lot of times when it looks as though people want you to do their homework for them, and the best thing that you can do for them is to give them a hint and see how they go from their. I spend a large amount of my time helping people here, giving something back to the CP community.
Dayekh wrote:
EDIT: Don't make sweeping statements that people on this site "won't do his homework for him" because regardless of whether it is homework, we all need help with our work. It's what this site is for.. go figure..
Errm actually, the site isn't for homework (and you will find that a lot of people on this site will answer you in precisely the same way that I did - not a sweeping statement, but the fact that I have used this site for a long time). I don't think that teachers would appreciate us doing the homework for somebody. That doesn't help them - and I speak as somebody who used to be a teacher. Give them a hint certainly, point them in the general direction, but don't give them the answer. If you do this, then you sell them short because they have not answered things for themselves - and missed the sense of achievement that they will get from this.
Dayekh wrote:
If everyone simply googles everything, then there is no need for this website is there? Your hints are appreciated and helpful, especially when I get them, but for all newbies including myself, it's the attitude that bites. Don't take this the wrong way. I would like to see positive and supportive attitude on forums like this as I'm am sure many people would.
As soon as somebody says something like this, I automatically take it the wrong way. If I didn't want to be bothered, I wouldn't have answered the post. What I do want is for you to learn something when I answer, and that means that I will often give you hints to point you in the right direction. That way, you learn something on your own and it sticks. If I give you the answer then you don't learn anything. You won't remember it. If you don't like my attitude, then mate, that is your problem and not mine. I'm not going to change the way that I answer just for you. If I can help, I will. If I think that you need a specific answer, I will give you one. If I think that you can undertake a personal journey and learn something on your own, I w
I am very happy with your reply mate. :-D You have replied in a very intellectual manner and did not flame me. People with such responses are ones who deserve posting on this site. :cool:
Pete O`Hanlon wrote:
if you had followed the threads of my conversation with this guy, you would see that I had attempted to help him before.
I do not know much about this guy, but something about your second response what like you were attempting to shoo him off. That was the statement I didn't like.
Pete O`Hanlon wrote:
Errm actually, the site isn't for homework (and you will find that a lot of people on this site will answer you in precisely the same way that I did - not a sweeping statement, but the fact that I have used this site for a long time). I don't think that teachers would appreciate us doing the homework for somebody. That doesn't help them - and I speak as somebody who used to be a teacher. Give them a hint certainly, point them in the general direction, but don't give them the answer. If you do this, then you sell them short because they have not answered things for themselves - and missed the sense of achievement that they will get from this.
About the Homework factor.. I cannot completely agree with you, simply because work is work at the end of the day. It is the response which counts. As I have said in my post, you don't need to give them the answers. I was only talking about the attitude. It was not hostile, but distant. That's all. :| When you tell someone to google something, just explain to him why you are not giving the answer. Many people do not know that the best way to learn is to 'teach him how to fish' so to speak. They will just assume that you are unhelpful, which is not the case. :doh: In anycase, I suppose everyone helps in their own way. What can I say. And indeed the best way to help is to 'teach a man to fish' as they say.
Pete O`Hanlon wrote:
Thanks for the insight, especially as I spend a lot of my time answering questions for people.
Every member of this site is a contribution, whether they ask questions or reply to them. We all supply this large FAQ with puzzles and solutions.. somewhat. And for that, they are a credit to such a community. And for that, I hope none of this ramble has affected the professional relationship between coders such as yourself and I. Take care, and be gentle ;P
-
I am very happy with your reply mate. :-D You have replied in a very intellectual manner and did not flame me. People with such responses are ones who deserve posting on this site. :cool:
Pete O`Hanlon wrote:
if you had followed the threads of my conversation with this guy, you would see that I had attempted to help him before.
I do not know much about this guy, but something about your second response what like you were attempting to shoo him off. That was the statement I didn't like.
Pete O`Hanlon wrote:
Errm actually, the site isn't for homework (and you will find that a lot of people on this site will answer you in precisely the same way that I did - not a sweeping statement, but the fact that I have used this site for a long time). I don't think that teachers would appreciate us doing the homework for somebody. That doesn't help them - and I speak as somebody who used to be a teacher. Give them a hint certainly, point them in the general direction, but don't give them the answer. If you do this, then you sell them short because they have not answered things for themselves - and missed the sense of achievement that they will get from this.
About the Homework factor.. I cannot completely agree with you, simply because work is work at the end of the day. It is the response which counts. As I have said in my post, you don't need to give them the answers. I was only talking about the attitude. It was not hostile, but distant. That's all. :| When you tell someone to google something, just explain to him why you are not giving the answer. Many people do not know that the best way to learn is to 'teach him how to fish' so to speak. They will just assume that you are unhelpful, which is not the case. :doh: In anycase, I suppose everyone helps in their own way. What can I say. And indeed the best way to help is to 'teach a man to fish' as they say.
Pete O`Hanlon wrote:
Thanks for the insight, especially as I spend a lot of my time answering questions for people.
Every member of this site is a contribution, whether they ask questions or reply to them. We all supply this large FAQ with puzzles and solutions.. somewhat. And for that, they are a credit to such a community. And for that, I hope none of this ramble has affected the professional relationship between coders such as yourself and I. Take care, and be gentle ;P
Don't worry about it, and I must apologise about my rambling response last night - that's what happens when you answer emails immediately after putting the kids to bed. Seriously though, I honestly don't mind if you disagree with me or not. If I can answer your questions then I will, and as I stated earlier, if I think there's room for a little personal journey there, I will post a hint. If the hint takes you nowhere, I'm always available for clarifications - that's the beauty about being the boss, I get to set my priorities:-D.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.