QUERY WRITING - Database Discussions
This is a discussion on QUERY WRITING - Database Discussions ; Segun wrote: > Hi all, > I have a table with data as shown below > > PRODUCT ENGLAND USA FRANCE IRELAND > Orange 100 101 100 90 > Mango 110 110 110 80 > Pawpaw 100 120 112 100 ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#31
| |||
| |||
| > Hi all, > I have a table with data as shown below > > PRODUCT ENGLAND USA FRANCE IRELAND > Orange 100 101 100 90 > Mango 110 110 110 80 > Pawpaw 100 120 112 100 > Grape 105 130 124 115 > Banana 115 140 100 150 > > Can someone please help generate a code to produce an output as shown below > > PRODUCT QUANTITY > Orange 391 > Mango 410 > Pawpaw 432 > Grape 474 > Banana 505 > > Thanks all, while expecting the reply urgently. > > Olu Your problem is that your data is nor normalized. Normalize the data by restructuring the table and then write your own query. In short ... we don't do other people's homework for them. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace 'x' with 'u' to respond) |
|
#32
| |||
| |||
|
Mladen Gogala > of course: TRUNCATE TABLE will give you the expected results. > If your table is called MYTABLE you should execute the following: > TRUNCATE TABLE MYTABLE; > AS SELECT PRODUCT, ENGLANd+GERMANY+FRANCE+USA > / > > Don't forget the semicolon at the end of the 1st line or the > statement will not work. You don't have to thank me. Man, that's harsh... |
|
#33
| |||
| |||
|
Mladen Gogala > of course: TRUNCATE TABLE will give you the expected results. > If your table is called MYTABLE you should execute the following: > TRUNCATE TABLE MYTABLE; > AS SELECT PRODUCT, ENGLANd+GERMANY+FRANCE+USA > / > > Don't forget the semicolon at the end of the 1st line or the > statement will not work. You don't have to thank me. Man, that's harsh... |
|
#34
| |||
| |||
|
Mladen Gogala > of course: TRUNCATE TABLE will give you the expected results. > If your table is called MYTABLE you should execute the following: > TRUNCATE TABLE MYTABLE; > AS SELECT PRODUCT, ENGLANd+GERMANY+FRANCE+USA > / > > Don't forget the semicolon at the end of the 1st line or the > statement will not work. You don't have to thank me. Man, that's harsh... |
|
#35
| |||
| |||
|
Mladen Gogala > of course: TRUNCATE TABLE will give you the expected results. > If your table is called MYTABLE you should execute the following: > TRUNCATE TABLE MYTABLE; > AS SELECT PRODUCT, ENGLANd+GERMANY+FRANCE+USA > / > > Don't forget the semicolon at the end of the 1st line or the > statement will not work. You don't have to thank me. Man, that's harsh... |
|
#36
| |||
| |||
|
Mladen Gogala > of course: TRUNCATE TABLE will give you the expected results. > If your table is called MYTABLE you should execute the following: > TRUNCATE TABLE MYTABLE; > AS SELECT PRODUCT, ENGLANd+GERMANY+FRANCE+USA > / > > Don't forget the semicolon at the end of the 1st line or the > statement will not work. You don't have to thank me. Man, that's harsh... |
|
#37
| |||
| |||
|
Mladen Gogala > of course: TRUNCATE TABLE will give you the expected results. > If your table is called MYTABLE you should execute the following: > TRUNCATE TABLE MYTABLE; > AS SELECT PRODUCT, ENGLANd+GERMANY+FRANCE+USA > / > > Don't forget the semicolon at the end of the 1st line or the > statement will not work. You don't have to thank me. Man, that's harsh... |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 12:46 PM.




Linear Mode