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.
| Author |
Topic |
|
sungoltens
Starting Member
3 Posts |
Posted - 2009-07-21 : 05:18:54
|
| Below is a query I have written to retrieve Sales Value by Region from the View Containing Individual Sales DetailsBut its takes almost 2 minutes to retieve the records. Please note that I am only fetching records for one month (YYYYMM='200906') having only about 431 records.Is there anyway I can speed up the query.SELECT REGION,to_CHAR(ROUND(SUM(DEBIT),0),'999,999,999,990.00') SALES FROM CUST_COU_CR_SALES_BY_YEAR_VIEW WHERE YYYYMM='200906' GROUP BY REGION ORDER BY SALES DESC |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-07-21 : 05:22:23
|
| to_char.......... r u using MS Sql server ? |
 |
|
|
Mangal Pardeshi
Posting Yak Master
110 Posts |
Posted - 2009-07-21 : 05:23:07
|
| It looks like a Oracle question. This is a SQL Server forum.Try here - http://forums.oracle.com/forums/main.jspa;jsessionid=8d92079f30d666395860b5df4df78551ca3e5f46cdee.e3mSaNmQc3j0ax4NchmOahuPc40?categoryID=84Mangal Pardeshihttp://mangalpardeshi.blogspot.com |
 |
|
|
sungoltens
Starting Member
3 Posts |
Posted - 2009-07-21 : 05:24:13
|
| I AM ACTUALLY USING TOAD TO WRITE SQL COMMANDS FOR RETRIEVING DATA FROM ORACLE DATABASE |
 |
|
|
Mangal Pardeshi
Posting Yak Master
110 Posts |
Posted - 2009-07-21 : 05:28:31
|
| Post your question on link given by me in previous post.These forums are for Microsoft SQL Server.Mangal Pardeshihttp://mangalpardeshi.blogspot.com |
 |
|
|
sungoltens
Starting Member
3 Posts |
Posted - 2009-07-21 : 05:37:58
|
Thanks Mangal..I have done that now....quote: Originally posted by Mangal Pardeshi Post your question on link given by me in previous post.These forums are for Microsoft SQL Server.Mangal Pardeshihttp://mangalpardeshi.blogspot.com
|
 |
|
|
krishmallela
Starting Member
2 Posts |
Posted - 2009-07-22 : 06:34:28
|
| Hi i have a field "planprice" and which is of type "Money".... when i query it like SELECT planprice from rateplan it displays 6.9900but i want to display it like 6.99 then how can i achive it .... could you please suggest...Thankskrishnaparasad |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-07-22 : 06:36:41
|
| use round function and try to post a new query |
 |
|
|
|
|
|