SQL help needed
-
Hi everybody, I hava a table like this: Table Name- TmpTbl id PD_Id Remark 1 1 Good 2 2 Bad 3 2 fair 4 3 Bad 5 3 Good In this i want the select query for the result like this: id PD_Id Remark 1 1 Good 2 2 Bad 4 3 Bad Can you help me? Regards, Jegastar D.
-
Hi everybody, I hava a table like this: Table Name- TmpTbl id PD_Id Remark 1 1 Good 2 2 Bad 3 2 fair 4 3 Bad 5 3 Good In this i want the select query for the result like this: id PD_Id Remark 1 1 Good 2 2 Bad 4 3 Bad Can you help me? Regards, Jegastar D.
In your example, just select where id = 1, 2 or 4. If you are looking for more complex behaviour, then you need to specify what it is that you are looking for, as we can't divine it from your example.
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 everybody, I hava a table like this: Table Name- TmpTbl id PD_Id Remark 1 1 Good 2 2 Bad 3 2 fair 4 3 Bad 5 3 Good In this i want the select query for the result like this: id PD_Id Remark 1 1 Good 2 2 Bad 4 3 Bad Can you help me? Regards, Jegastar D.
-
Acctuly this is my table id PD_Id Remark 1 1 Good 2 2 Bad 3 2 fair 4 3 Bad 5 3 Good In this i want the select query for the following result id PD_Id Remark 1 1 Good 2 2 Bad 4 3 Bad
-
Acctuly this is my table id PD_Id Remark 1 1 Good 2 2 Bad 3 2 fair 4 3 Bad 5 3 Good In this i want the select query for the following result id PD_Id Remark 1 1 Good 2 2 Bad 4 3 Bad
There is (almost) nothing consistent or special about your desired result set (no specific visible relationship between the value of remark, id , PD_ID). The resultset can be produced with "select top 3 id,pd_Id,remark from table where Remark in ('Good','Bad') order by PD_Id ASC" But that does not seem particularly useful.