dbTalk Databases Forums  

any thoughts please?!

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss any thoughts please?! in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Totti
 
Posts: n/a

Default any thoughts please?! - 12-05-2007 , 01:36 AM






CREATE TABLE SQL_TABL (
ORD_DATE Date,
PROD_CODE Varchar2(10),
CUST_CODE Varchar2(10),
QTY Number(2),
UNIT_PRICE Number(5,2),
SHIP_DATE Date,
CARR_CODE Varchar2(12),
SHIP_COST Number(5,2),
PMT_DATE Date
);

insert into SQL_TABL values ('08-Jan-05', 'A-50-0013', 'Cu-08-143',
4,
181.79, '09-Jan-05', 'TransCo', 60.27, '15-Jan-05');
insert into SQL_TABL values ('15-Jan-05', 'A-25-0753', 'Cu-08-180',
13, 265.61, '23-Jan-05', 'Expedit', 278.36, '29-Jan-05');
insert into SQL_TABL values ('19-Jan-05', 'A-24-0101', 'Cu-08-133',
20, 120.18, '22-Jan-05', 'Expedit', 188.28, '29-Jan-05');
insert into SQL_ASSGN_2 values ('30-Jan-05', 'B-63-0023', 'Cu-4-078',
4,
280.88, '09-Feb-05', 'Expedit', 92.93, '04-Feb-05');


hi every one i have a a table like such and many things to do on it,
since i am new to sql and i know how important it is, i want you
please to help if you see me posting again and agian dont get bored
with me please, i ll be posting my attempts and whoever wants can
help me, as a first task i want to


A - Produce total sales per ratio of Delivery/Payment (ratio of
interval lengths)
and Group them in intervals of 0.2.
(for this A question i ahve no idea guys so if you want to help
please
explain me the procedure)


B - Produce total sales per Product Hyper group.
(A hyper group is a group of Product Group Codes. Group codes from 0
to 9 form Group0. Codes from 10 to 19 form Group10 etc.)


and here is my attempt which doesnt work because of 2 reasons i
suspect :
select (QTY*UNIT_PRICE), to_number(substr(PROD_CODE,3,2)) % 10 from
SQL_TABL
1st is because of the 2 inthe substr thing since it is not dynamic so
a group of one character wont be acceptable as i think , i am not
sure
at all and the second is that i am trying to use % for modulo, you
experts know,
NB for anybody who helps
first thanks and second please give me some details to know whats the
philosophy because i am here to improve my skills



Reply With Quote
  #2  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: any thoughts please?! (or, "If I post this enough times withenough different subjects maybe someone will respond") - 12-05-2007 , 10:57 AM






On Dec 5, 1:36 am, Totti <saliba.toufic.geo... (AT) gmail (DOT) com> wrote:

the same thing he posted in another thread on the same day and the
same thing he posted a week ago multiple times.

STOP posting multiple messages with the same content under different
subjects. It's annoying, it's rude, and it won't get you any faster
response (or any better response).


David Fitzjarrell

Reply With Quote
  #3  
Old   
Totti
 
Posts: n/a

Default Re: any thoughts please?! (or, "If I post this enough times withenough different subjects maybe someone will respond") - 12-05-2007 , 01:49 PM



i am sorry brother , i am new to news group.
be sure i won't
you could have told me so, more politely
but since you chose this way , it is up to you
sorry again


Reply With Quote
  #4  
Old   
Ken Denny
 
Posts: n/a

Default Re: any thoughts please?! - 12-06-2007 , 11:09 AM



On Dec 5, 2:36 am, Totti <saliba.toufic.geo... (AT) gmail (DOT) com> wrote:
Quote:
CREATE TABLE SQL_TABL (
ORD_DATE Date,
PROD_CODE Varchar2(10),
CUST_CODE Varchar2(10),
QTY Number(2),
UNIT_PRICE Number(5,2),
SHIP_DATE Date,
CARR_CODE Varchar2(12),
SHIP_COST Number(5,2),
PMT_DATE Date
);

insert into SQL_TABL values ('08-Jan-05', 'A-50-0013', 'Cu-08-143',
4,
181.79, '09-Jan-05', 'TransCo', 60.27, '15-Jan-05');
insert into SQL_TABL values ('15-Jan-05', 'A-25-0753', 'Cu-08-180',
13, 265.61, '23-Jan-05', 'Expedit', 278.36, '29-Jan-05');
insert into SQL_TABL values ('19-Jan-05', 'A-24-0101', 'Cu-08-133',
20, 120.18, '22-Jan-05', 'Expedit', 188.28, '29-Jan-05');
insert into SQL_ASSGN_2 values ('30-Jan-05', 'B-63-0023', 'Cu-4-078',
4,
280.88, '09-Feb-05', 'Expedit', 92.93, '04-Feb-05');

hi every one i have a a table like such and many things to do on it,
since i am new to sql and i know how important it is, i want you
please to help if you see me posting again and agian dont get bored
with me please, i ll be posting my attempts and whoever wants can
help me, as a first task i want to

A - Produce total sales per ratio of Delivery/Payment (ratio of
interval lengths)
and Group them in intervals of 0.2.
(for this A question i ahve no idea guys so if you want to help
please
explain me the procedure)

B - Produce total sales per Product Hyper group.
(A hyper group is a group of Product Group Codes. Group codes from 0
to 9 form Group0. Codes from 10 to 19 form Group10 etc.)

and here is my attempt which doesnt work because of 2 reasons i
suspect :
select (QTY*UNIT_PRICE), to_number(substr(PROD_CODE,3,2)) % 10 from
SQL_TABL
1st is because of the 2 inthe substr thing since it is not dynamic so
a group of one character wont be acceptable as i think , i am not
sure
at all and the second is that i am trying to use % for modulo, you
experts know,
NB for anybody who helps
first thanks and second please give me some details to know whats the
philosophy because i am here to improve my skills
To get the product group use
SUBSTR(prod_code,1,LENGTH(prod_code)-1)||'0'

This will strip off the last character of the prod_code and replace it
with a 0. That's what I understand you're trying to do.



Reply With Quote
  #5  
Old   
Ed Prochak
 
Posts: n/a

Default Re: any thoughts please?! (or, "If I post this enough times withenough different subjects maybe someone will respond") - 12-07-2007 , 01:13 PM



On Dec 5, 2:49 pm, Totti <saliba.toufic.geo... (AT) gmail (DOT) com> wrote:
Quote:
i am sorry brother , i am new to news group.
be sure i won't
you could have told me so, more politely
but since you chose this way , it is up to you
sorry again
This comment is directed more to other new readers than to you but you
should consider general politeness.

IOW, in real life you do not walk into a room interrupting
conversations by blurting out your questions rushing to the next room
doing the same and returning to previous rooms listening for an
answer. You would not expect polite responses for those present in
that case. What you do is enter one room and listen for a while. This
way you discover in that room are doctors but your question is on auto
mechanics. So you quietly leave and try another room. In the auto
mechanics room you listen for a while to make sure someone else has
not already asked the same question. If not you wait for a lull in
the conversations to change the topic to your questions.

There is a similar process in newsgroups. Sometimes in newsgroups,
even when you find an automechanics group, it may be one that
specializes in Saab autos and you need help with a nissan. Just be
polite. Remember the people answering your questions are not paid to
do so. We do occasionally get crabby when we see the same mistakes
made over and over again.

here's a good article to read

Emily Postnews Answers Your Questions on Netiquette
http://www.clari.net/brad/emily.html

have a good day.
Ed



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.