|
Thanks for replay.
but this is just my misspelling and nothings changed on result. my show result table table is correct.
I want to get sum of column VISIT_FEE
|
|
|
|
|
All you need to do is to use [SUM()](https://www.techonthenet.com/oracle/functions/sum.php) - one of [aggragate functions](https://docs.oracle.com/database/121/SQLRF/functions003.htm#SQLRF20035):
SELECT SUM(VISIT_FEE) AS FEE,
EXTRACT(YEAR FROM VISIT_DATE) AS YEAR_,
EXTRACT(MONTH FROM VISIT_DATE) AS MONTH_,
EXTRACT(DAY FROM VISIT_DATE) AS DAY_
FROM MZS_VISIT_REQUEST
WHERE IS_PAY = 1
GROUP BY EXTRACT(YEAR FROM VISIT_DATE),
EXTRACT(MONTH FROM VISIT_DATE) ,
EXTRACT(DAY FROM VISIT_DATE)
Good luck
|
|
|
|
|
Thanks.
But it's not what i want.
I want sum of each month like:
FEE YEAR_ MONTH_
300000 1396 1
3010000 1396 2
Sum of Fee column if MONTH_ is equal. like above table.
|
|
|
|
|
SELECT
sum(VISIT_FEE) AS VISIT_FEE,
EXTRACT(YEAR FROM VISIT_DATE) AS YEAR_,
EXTRACT(MONTH FROM VISIT_DATE) AS MONTH_,
FROM
MZS_VISIT_REQUEST
WHERE
IS_PAY = 1
GROUP by
EXTRACT(YEAR FROM VISIT_DATE) AS YEAR_,
EXTRACT(MONTH FROM VISIT_DATE) AS MONTH_
Please try this one
|
|
|
|
|
Thanks.
But when running i get below error:
Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS AYEAR_,<br />
EXTRACT(MONTH FROM VISIT_DATE) AS BMONTH_' at line 10
When i delete last part(ORDER BY), query without any error with below result
FEE YEAR_ MONTH_
3310000 1396 1
is this any things we can do like -->
<br />
SELECT<br />
SUM(VISIT_FEE) AS FEE,<br />
EXTRACT(YEAR FROM VISIT_DATE) AS YEAR_,<br />
EXTRACT(MONTH FROM VISIT_DATE) AS MONTH_<br />
FROM<br />
MZS_VISIT_REQUEST<br />
WHERE<br />
IS_PAY = 1 AND DISTINCT MONTH_<br /> ???
|
|
|
|
|
Hi Team
I am new to SSRS and exploring it for my organizational reporting requirements. After configuring dev instance, I am able to login into Report Manager and Report Server via IE using windows os users. But I am unable to understand below items in SSRS
1. Why logout button is not given in Report Server and how user will logout after access report.
2. If business users wants to access reports from outside(not in network) over internet and if I configured instance on public ip, will that work and how they will logout from session.
3.Do I need to create each business user in windows or users configured in Active Directory will work to access reports from outside over internet.
4.Is there any other way to maintain business users in different repository to avoid OS user and active directory.
Please guide me here.
Thanks
BuntyR
|
|
|
|
|
|
Hi
have you found a solution for this issue?
|
|
|
|
|
anyone can guide me that how to read & write data in queue in sql server.
do i need to create queue first like table ?
queue is persistent object in db like table ?
please post a small example for read & write data in queue in sql server.
tbhattacharjee
|
|
|
|
|
|
The member is question seems to have a pathological aversion to using Google for themselves.
|
|
|
|
|
Good Morning Sir,
I am willing to install oracle database on my computer. So I have downloaded the database from here Oracle Database Software Downloads | Oracle Technology Network | Oracle[^] I found 12c is the latest database and I have downloaded it. Mine is a Windows 10 64 bit Operating System based on x-64 processor so the database will work in my computer since Microsoft Windows x64 (64-bit) is only present.
I created the oracle account and started installing the database, there were few steps prompted to me before installing the database, I've chosen the default settings and moved on. But I got this error,
Failed to add VISWESWARAN\Visweswaran install user to %2% group
I have searched the internet for this error and referred this Configuring Users, Groups and Environments for Oracle Database[^] thread but I found nothing.
Sir, could you please help me
Thank you for your time sir.
|
|
|
|
|
Have a look at Oracle 12c Install on Windows
It is for Windows 7, but I guess, the installation process on Windows 10 should not differ too much.
|
|
|
|
|
Thank you sir for your kind reply. But I have tried that and I see the same error message
|
|
|
|
|
Can you elaborate on this one
I created the oracle account and started installing the database, there were few steps prompted to me before installing the database, I've chosen the default settings and moved on
|
|
|
|
|
Sir,
I mean the initial steps for installing the database like
[radio-button] [selected] Install and configure database
[radio-button] Install database
[Back] [Next]
here Install and configure is the default selected option, all I did is clicked next. since I am a beginner in Oracle database, I've selected the default options without modifying various values.
No, sir there is no guest user account in my computer, I have only one account in my PC which is admin
Thank you sir for your time and kind help
|
|
|
|
|
I believe that you are installing the software as an Administrator. Right?
|
|
|
|
|
After you have registered all the required data show me this message
|
|
|
|
|
These are not the data you are looking for... move along.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Member 13161516 wrote: After you have registered all the required data show me this message |
- Could you post the exact message?
- Could you explain what and how you did?
- Was it in MS SQL Server or in some other DBMS?
|
|
|
|
|
give me code to how to get metadata of table from database in php.
naveen kumar
|
|
|
|
|
We do not provide free code or projects. You should help yourself and try to find the code from here. You are most likely to get a project sample, and work for that.
Try searching, "mysql data definition sql php" on the top right corner.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Member 13143024 wrote: give me No.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I want to avoid dynamic sql but my Table name varies for different run, is there any better way to avoid the dynamic sql in this situation?
I am trying my best, searching, asking and implementing different approaches etc, if anybody can give me some suggestion, link or even code snippet that would very helpful.
Hi,
I have a table (Table123) that has Columns ColA, ColB, ColC, ColD, ColE, ColF, ColG, I have many rows entered in the same table but want to check for two rows RowA, RowB, if for example I have three columns that are different in these two rows, I want to select those Column Names, like if ColA, ColC and ColE are changed then my query should return me as below
TableName, ChangedColumnName, OldValue, NewValue
Table123 , ColA, 123 Greetings 123 New Greetings
Table123 , ColC, 123 World 123 Hello World
Table123 , ColE, 123 Test World 123 New World
etc.
Is there anyway I can do it, but without using dynamic sql any help would be greatly helpful, thanks in advance.
Thanks in advance
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 17-Apr-17 16:04pm.
|
|
|
|