Home » SQL & PL/SQL » SQL & PL/SQL » Oracle 9i (merged) (minutes)
Oracle 9i (merged) [message #431094] Sat, 14 November 2009 23:56 Go to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
how can we find weekly total for the following data,
please give me the SQL query

Amount Sales_Date
100 01-01-2009
200 05-01-2009
300 10-01-2009
400 15-01-2009
500 18-01-2009
600 05-02-2009
700 07-02-2009
800 03-03-2009
900 09-03-2009
1000 04-04-2009
1500 22-04-2009
1200 25-04-2009
1000 09-05-2009
500 21-05-2009
2000 15-07-2009
300 20-07-2009
800 25-08-2009
900 30-09-2009

I want total amountweekly wise
Please help me it's very urgent thanks in advance

Oracle9i [message #431095 is a reply to message #431094] Sat, 14 November 2009 23:59 Go to previous messageGo to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
How can we convert Hours and Minutes to Only Minutes

HH MI
15:10

I Want minutes for this time
Re: Oracle 9i [message #431096 is a reply to message #431094] Sun, 15 November 2009 00:00 Go to previous messageGo to next message
BlackSwan
Messages: 24912
Registered: January 2009
Senior Member
>Please help me it's very urgent
Why is it urgent for ME to solve this problem for you?

>I want total amountweekly wise
When does week start/end?

[Updated on: Sun, 15 November 2009 00:08]

Report message to a moderator

Re: Oracle9i [message #431097 is a reply to message #431095] Sun, 15 November 2009 00:03 Go to previous messageGo to next message
BlackSwan
Messages: 24912
Registered: January 2009
Senior Member
>I Want minutes for this time
How many minutes are in one hour?
Re: Oracle9i [message #431098 is a reply to message #431097] Sun, 15 November 2009 00:23 Go to previous messageGo to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
I want to display in minutes
Re: Oracle9i [message #431099 is a reply to message #431098] Sun, 15 November 2009 00:27 Go to previous messageGo to next message
BlackSwan
Messages: 24912
Registered: January 2009
Senior Member
>I want to display in minutes
How many minutes in an hour?
Re: Oracle 9i (merged) [message #431100 is a reply to message #431094] Sun, 15 November 2009 00:32 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If it is very urgent, follow the guide you will have faster answer:
- post a woring test case...
- post formatted
- post full version number
- give meaningful titles

Regards
Michel
Re: Oracle9i [message #431101 is a reply to message #431098] Sun, 15 November 2009 00:32 Go to previous messageGo to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
For example the following table contains time data

Create table t1( itm_time varchar2(Cool);

Insert into ta values('11:15');
Insert into ta values('20:15');
Insert into ta values('06:15');

Select * fro t1;

11:15
20:15
06:15

I want to display tuis data only in minutes


Re: Oracle9i [message #431102 is a reply to message #431101] Sun, 15 November 2009 00:36 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Are you kidding?

1/ Not formatted
2/ "create table t1", "insert into ta"
3/ "Select * fro t1;"

The answer is "select minutes fro ta;"

Regards
Michel
Re: Oracle9i [message #431103 is a reply to message #431101] Sun, 15 November 2009 00:41 Go to previous messageGo to next message
BlackSwan
Messages: 24912
Registered: January 2009
Senior Member
>Insert into ta values('11:15');
Insert into ta values('abcde');
How many minutes in STRING in line above?
Re: Oracle9i [message #431119 is a reply to message #431101] Sun, 15 November 2009 08:33 Go to previous message
ThomasG
Messages: 3185
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
ramesh55.sse wrote on Sun, 15 November 2009 07:32
For example the following table contains time data

Create table t1( itm_time varchar2(Cool);


That table doesn't contain time data, it contains varchars.
Previous Topic: Triggers (merged)
Next Topic: how to rewrite the query the sub query.
Goto Forum:
  


Current Time: Fri Sep 30 00:31:02 CDT 2016

Total time taken to generate the page: 0.23336 seconds