Home » SQL & PL/SQL » SQL & PL/SQL » VERY VERY COMPLEX QUERY
VERY VERY COMPLEX QUERY [message #315749] Tue, 22 April 2008 10:53 Go to next message
DRASTANT
Messages: 21
Registered: July 2007
Location: KENYA
Junior Member
HI ALL I HAVE AN EXCEL SHEET WITH FOLLOWING COLUMNS
ITEM, QTY SOLD, DATE,STORE

I WANT A QUERY TO EXTRACT FOR ME SOMETHING LIKE THIS
ITEM, QTY IN OCTOBERM, QTY IN NOVEMBER

I WANT TO ADD THE QTY STORE WISE FIRST AND THEN TO DISPLAY AS STATED ABOVE IT IS BEYOND MY SCOPE

PLEASE HELP
Re: VERY VERY COMPLEX QUERY [message #315757 is a reply to message #315749] Tue, 22 April 2008 11:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ read and follow OraFAQ Forum Guide
2/ Don't post in UPPER CASE
3/ Post in Expert forum ONLY if you answer YES to the 3 questions in Not an EXPERT? Post in the NEWBIES forum, NOT here

Regards
Michel
Re: VERY VERY COMPLEX QUERY [message #316039 is a reply to message #315757] Wed, 23 April 2008 09:57 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
And besided, are you sure you're on the right forum (this is all about Oracle, not Excel)?
Re: VERY VERY COMPLEX QUERY [message #316120 is a reply to message #316039] Wed, 23 April 2008 16:30 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's, actually, nothing "very, very complex" in this assignment.

Save Excel file as a CSV file and use it as an external table (or load into Oracle database using SQL*Loader). Once data is in an Oracle table, query is really a simple one; for example
-- quantity in November

SELECT quantitry 
FROM this_table
WHERE to_char(month_column, 'mm') = '11';
Previous Topic: sql to group by schema
Next Topic: Transpose Multiple Rows into Columns
Goto Forum:
  


Current Time: Fri Dec 09 00:13:11 CST 2016

Total time taken to generate the page: 0.08139 seconds