Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dattu_reddy06
Starting Member
2 Posts |
Posted - 2010-07-18 : 03:12:18
|
| Hi AllI am not that much strong in SQL. Is there any chance i get the output in the way i desire.I have 3 Tables A, B, CTable AID(PK) Name Place1 Tom NJ2 Shaun NY3 Kim CTTable BID(PK,FK) OrderType(PK) Cost1 CASH 3001 cheque 50001 online transfer 30002 cash 5003 online transfer 7003 cheque 200Table CID(PK,FK) PlacesLived (PK) Days1 nj 3001 ny 2002 ct 502 ca 200i need the ouput like this..ID Name Place OrderType Cost PlacesLived Days1 Tom NJ CASH 300 nj 300null null null cheque 5000 ny 200null null null online transfer 3000 null null2 Shaun NY cash 500 ct 50null null null null null ca 2003 Kim CT online transfer 7000 null nullnull null null cheque 200 null nullCan we get like this.... or what is the query which can get output atleast nearer to this...i dont want values to repeat in columns like cost, ordertype repeated...If we cannot get like this.....Even if we get in CSV (below) .. i think it may help me... but priority is for the top shown output..ID Name Place OrderType-Cost PlacesLived - Days1 Tom NJ CASH-300,cheque-5000, nj -300,ny -200 onlinetransfer-3000 2 Shaun NY cash - 500 ct - 50,ca -2003 Kim CT online transfer-7000, null cheque -200Thanks in Advance..Waiting for the reply Guys.......Dattu |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-07-18 : 11:13:00
|
| Are you going to present the output in any report in front end ?I am here to learn from Masters and help new bees in learning. |
 |
|
|
dattu_reddy06
Starting Member
2 Posts |
Posted - 2010-07-18 : 16:22:33
|
| I want that to get in a table... so that i can bind that table to gridview and also show that table in an excel... i know how to convert datatable to excel in .netDattu |
 |
|
|
|
|
|