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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Change SQL query

Author  Topic 

bennofrancis
Starting Member

1 Post

Posted - 2011-02-13 : 02:55:10
Using SQL


BillNo Time Guests Code Name Qty
42135 1730 1 441 Ladu 60
42325 1745 110 10 White Rice 110
42325 1745 110 12 Thuvaram Paruppu + Ghee 110
42325 1745 110 14 Sambar - Meals 110
42325 1745 110 36 Rasam 110
42325 1745 110 46 Vadai - Meals 110
42325 1745 110 62 Butter Milk 110
42325 1745 110 71 Mango Pickle 110
42325 1745 110 75 Appalam 110
42325 1745 110 81 Thuvaiyal - Mint 110
42325 1745 110 185 Mix Veg Piratal 110
42325 1745 110 199 Cabbage Poriyal 110
42325 1745 110 286 Sambar Rice 90
42325 1745 110 297 Puri Small - 2 Pcs 110
42325 1745 110 383 Channa Masala 100
42325 1745 110 386 Puri Potato Curry 100
42325 1745 110 408 Gulab Jamun 110
42325 1745 110 470 Lemon Juice 110
42325 1745 110 501 Transport 1
42325 1745 110 550 Serving Spoons 1
42325 1745 110 554 Plate + Leaf 1
42325 1745 110 557 Fork+Spoon+Tissue 1
42325 1745 110 564 Food Station Skirting 1
42325 1745 110 577 Lemon Cup 1
42346 1730 40 229 Vadai - Medium 40
42346 1730 40 274 Mee Hoon (Indian) 40
42346 1730 40 297 Puri Small - 2 Pcs 40
42346 1730 40 322 Idly 80
42346 1730 40 383 Channa Masala 40
42346 1730 40 386 Puri Potato Curry 40
42346 1730 40 389 Sambar-Tiffen 80
42346 1730 40 390 Chutney - Coconut 80
42346 1730 40 392 Chutney - Tomato 80
42346 1730 40 426 Kesari 40
42346 1730 40 463 Coffee 40
42346 1730 40 501 Transport 1
42346 1730 40 550 Serving Spoons 1
42346 1730 40 553 Plate 1
42346 1730 40 557 Fork+Spoon+Tissue 1
42346 1730 40 576 Coffee Cup 1


I want like that


BillNo 42325 42346 42135
Time 1745 1730 1730
Guests

Name
Appalam 110
Butter Milk 110
Cabbage Poriyal 110
Channa Masala 100 40
Chutney - Coconut 80
Chutney - Tomato 80
Coffee 40
Coffee Cup 1
Food Station Skirting 1
Fork+Spoon+Tissue 1 1
Gulab Jamun 110
Idly 80
Kesari 40
Ladu 60
Lemon Cup 1
Lemon Juice 110
Mango Pickle 110
Mee Hoon (Indian) 40
Mix Veg Piratal 110
Plate 1
Plate + Leaf 1
Puri Potato Curry 100 40
Puri Small - 2 Pcs 110 40
Rasam 110
Sambar - Meals 110
Sambar Rice 90
Sambar-Tiffen 80
Serving Spoons 1 1
Thuvaiyal - Mint 110
Thuvaram Paruppu + Ghee 110
Transport 1 1
Vadai - Meals 110
Vadai - Medium 40
White Rice 110

how to write the sql query to change like this

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-02-13 : 04:05:29
What you want is a presentation issue.

Do the formatting and displaying of the data in the manner that you want in your application.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -