How can I fix this select without using subquery?
Hi guys is there any way to do the where below (in bold) without using an aggregate query before?
select
SUM(NET_AMOUNT)
as net,
SUM(TAX_AMOUNT)
as tax,
SUM(NET_AMOUNT)+
SUM(TAX_AMOUNT)
as total from ledger left join alloc on ledger.trxid=alloc.trxid where
(SUM(NET_AMOUNT)+
SUM(TAX_AMOUNT))
> allocated
net and tax are in the ledger and allocated is in the alloc table. Sometimes the total of the amount (net+tax) is greater than the allocated so I need to retrieve all the rows where allocated is null or tot is greater than allocated.
It's possible without CTE?
Thanks
Resolved.
SUM(NET_AMOUNT)
as net,
SUM(TAX_AMOUNT)
as tax,
SUM(NET_AMOUNT)+
SUM(TAX_AMOUNT)
as total from ledger left join alloc on ledger.trxid=alloc.trxid ....group by....
having ((SUM(NET_AMOUNT)+
SUM(TAX_AMOUNT))
> allocated)
Sometimes I need to post the issue in the forum just to remember how do the things.
Thanks and sorry
Similar Messages
-
I purchased PhotoshopCS5 Sept 2010 and still use the same MAC. I invertly deleted the font section but everything else works. How can I fixed this because I use fonts all the time? I don't want to purchase another one since this cost me $699:(
Which version of mac os x are you using?
Could you clarify what you mean by "I invertly deleted the font section" -
Firewall stops Firefox from loading any websites... had to switch off security to send this message... How can I fix this? Am using Symantec Client Firewall
This forum is only for discussions on the forums themselves. You should post your question in the apropriate product forum,
http://forums.adobe.com/community/shockwave
if your ptoblem is with Shockwave, or
http://forums.adobe.com/community/flashplayer
if it affects Flash Player. -
How can i construct this query without using CASE statement?
I've a following code. I'm using this script in Hibernet. So, i cannot use CASE there. Because, hibernet doesn't support case in select statement. How can i construct the same thing which will give me the same result without using CASE?
SELECT ofc.FLT_LCL_ORIG_DT
, ofc.CARR_IATA_CD
, ofc.FLT_NBR
, ofc.ORIG_ARPT_CD
, ofc.DEST_ARPT_CD
, sum( ofc.CNCT_PSGR_CNT) AS BOOKED_CNCT_PSGR_CNT
, sum( CASE WHEN o.fsdr_mrkt_cd = 'D' AND d.fsdr_mrkt_cd = 'D' THEN '0'
ELSE to_char(ofc.CNCT_PSGR_CNT,'99') END ) AS BOOKED_INTL_CNCT_PSGR_CNT
, sum(CASE WHEN o.fsdr_mrkt_cd||d.fsdr_mrkt_cd = 'DD'
THEN '0'
ELSE to_char(ofc.CNCT_PSGR_CNT,'99')
END) AS NEW_BCNT
FROM OPS_FLT_CNCT ofc
, STN o
, STN d
WHERE ofc.CNCT_ORIG_ARPT_CD = o.STN_CD
AND ofc.CNCT_DEST_ARPT_CD = d.STN_CD
-- AND TRUNC(ofc.FLT_LCL_ORIG_DT) = trunc(to_date('22-MAY-2007','DD-MON-YYYY'))
AND ofc.CARR_IATA_CD = 'UA'
AND ofc.FLT_NBR = '1218'
AND ofc.ORIG_ARPT_CD = upper('DEN') AND ofc.DEST_ARPT_CD = upper('IAD') GROUP BY ofc.FLT_LCL_ORIG_DT
, ofc.CARR_IATA_CD
, ofc.FLT_NBR
, ofc.ORIG_ARPT_CD
, ofc.DEST_ARPT_CD ;And, the output look like this --
FLT_LCL_O CARR FLT_N ORI DES BOOKED_CNCT_PSGR_CNT BOOKED_INTL_CNCT_PSGR_CNT NEW_BCNT
22-MAY-07 UA 1218 DEN IAD 9 0 0
23-MAY-07 UA 1218 DEN IAD 1 0 0
24-MAY-07 UA 1218 DEN IAD 2 1 1
25-MAY-07 UA 1218 DEN IAD 1 0 0Thnaks in advance for reply.
Regards.
Satyaki De.
#####2 ideas:
1. Inline function to perform the CASE funcionaltity for you
2. Piplelined function to generate the entire dataset
Both will be slower than just using CASE in a query, but we're working around big constraints -
The airport time capsule 2TB is only connecting to the web when performing a backup, it just started doing this how do I fix it?
That is a weird one.. never heard of it drop out except doing backups.
Reset the TC to factory settings.
The Factory Reset universal
Unplug your TC/AE. Hold in reset. and power the TC/AE back on.. all without releasing reset and keep holding in for about 10sec. The time is not important.. it is the front LED rapid flashing that indicates you are in factory mode.
Release reset.
If it doesn’t flash rapidly you have released reset at some point and try again.
Be Gentle! Feel the switch click on. It has a positive feel.. add no more pressure after that.
TC/AE will reboot after a couple of minutes with default factory settings and will wipe out previous configurations.
No files are deleted on the hard disk.. No reset of the TC deletes files.. to do that you use erase from the airport utility.
Redo the setup with all short names no spaces and pure alphanumeric.
It should then work fine.. but I need more info if you still have problems.
What modem? Is it a router?
How is the TC connected?
Is the computer running Mavericks? -
can somebody explain to me why my itunes library wont recognize my ipod anymore. and can somebody help me fix it without having to delete all 951 of my files and resyncing it?
Connect the iPod to your computer and look at the storage used by the various categories as shown in the colored bargarph in iTunes.
Come back with the results.
An "other" larger than about 1 1/2 GB indicates corrupted files.
What is the Other on my iPhone and How to Remove It
What is "Other" and What Can I Do About It?
Also, go to Settings>General>Usage>Manage Storage and see what is using the storage -
The left side of my mini ipad is unresponsive. Is there a fix for this hardware issue without costing me an arm and a leg?
If it's in warranty and a defect then it's covered under your warranty. If it was the result of user negligence, then it will not be covered. In that case see below:
If your iPod Touch, iPhone, or iPad is Broken
Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5 and 5C. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
You will find respective repair costs in the appropriate link:
iPod Service Support and Costs
iPhone Service Support and Costs
iPad Service Support and Costs
There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task:
1. iResq or Google for others.
2. Buy and replace screen yourself: iFixit -
I have imported my music from my musical CD's to the itune library but now, the iPod cannot import the music to the iPod due to the
above indicated problem.Type "apple mobile device service" into the search bar at the top of this page by "Support"
-
A few times, I have gotten Firefox to open.
Try changing firefox to the default browser: [http://kb.mozillazine.org/Setting_Your_Default_Browser]. That will probably get firefox to open when you dial up.
I'm not sure what you mean by "the meter accelerating the web page". Can you explain that?
Thank you -
PDF files are no longer viewable in Safari. How can I fix this?
I can no longer view pdf files in Safari. How can I fix this? I use OSX 10.8.4 and Safari version 6.0.5
Please advise!Hi Linc:
These are the plug-ins I have installed:
Adobe Acrobat and Reader Plug-in
Adobe Acrobat and Reader Plug-in for Web Browsers, Version 7.0.9 — from file “AdobePDFViewer.plugin”.
application/pdf
Acrobat Portable Document Format
pdf
application/vnd.adobe.xdp+xml
XML Data Package
xdp
application/vnd.adobe.xfd+xml
FormFlow99 Data File
xfd
application/vnd.adobe.xfdf
Acrobat Forms Data Format in XML
xfdf
application/vnd.fdf
Acrobat Forms Data Format
fdf
Adobe Acrobat NPAPI Plug-in, Version 11.0.03
Adobe® Acrobat® Plug-in for Web Browsers, Version 11.0.03 — from file “AdobePDFViewerNPAPI.plugin”.
application/pdf
Acrobat Portable Document Format
pdf
application/vnd.adobe.pdf
Acrobat Portable Document Format (Interim)
pdf
application/vnd.adobe.pdfxml
Acrobat XML Portable Document Format
pdfxml
application/vnd.adobe.x-mars
Acrobat XML Portable Document Format (Interim)
mars
application/vnd.adobe.xdp+xml
XML Data Package
xdp
application/vnd.adobe.xfd+xml
FormFlow99 Data File
xfd
application/vnd.adobe.xfdf
Acrobat Forms Data Format in XML
xfdf
application/vnd.fdf
Acrobat Forms Data Format
fdf
Citrix Online Web Deployment Plugin 1.0.0.79
Plugin that detects installed Citrix Online products (visit www.citrixonline.com). — from file “CitrixOnlineWebDeploymentPlugin.plugin”.
application/x-col-application-detector
Citrix Online Application Detector
ebrary Reader Plug-In
ebrary Reader for NSAPI browsers on Mac OS X — from file “ebrary Reader.plugin”.
application/x-edf
ebrary EDF Documents
edf
Flip4Mac Windows Media Plugin
The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime. — from file “Flip4Mac WMV Plugin.plugin”.
application/asx
Windows Media Plugin
application/x-mplayer2
Windows Media Plugin
application/x-ms-wmp
Windows Media Plugin
audio/x-ms-wax
Windows Media Playlist
wax
audio/x-ms-wma
Windows Media Audio
wma
video/x-ms-asf
Windows Media Video
asf
video/x-ms-asf-plugin
Windows Media Plugin
video/x-ms-asx
Windows Media Playlist
asx
video/x-ms-wm
Windows Media Video
wm
video/x-ms-wmp
Windows Media Video
wmp
video/x-ms-wmv
Windows Media Video
wmv
video/x-ms-wmx
Windows Media Playlist
wmx
video/x-ms-wvx
Windows Media Playlist
wvx
Garmin Communicator Plug-in Version 4.0.4.0
Garmin Communicator Plug-in Version 4.0.4.0 — from file “GarminGpsControl.plugin”.
application/vnd-garmin.mygarmin
Garmin GPS Control
mygarmin
iPhotoPhotocast
iPhoto6 — from file “iPhotoPhotocast.plugin”.
application/photo
iPhoto 700
Java Applet Plug-in
Displays Java applet content, or a placeholder if Java is not installed. — from file “JavaAppletPlugin.plugin”.
application/x-java-applet
Basic Java Applets
javaapplet
application/x-java-applet;deploy=10.25.2
Java applet
application/x-java-applet;javafx=2.2.25
Java applet
application/x-java-applet;jpi-version=1.7.0_25
Java applet
application/x-java-applet;version=1.1
Java applet
application/x-java-applet;version=1.1.1
Java applet
application/x-java-applet;version=1.1.2
Java applet
application/x-java-applet;version=1.1.3
Java applet
application/x-java-applet;version=1.2
Java applet
application/x-java-applet;version=1.2.1
Java applet
application/x-java-applet;version=1.2.2
Java applet
application/x-java-applet;version=1.3
Java applet
application/x-java-applet;version=1.3.1
Java applet
application/x-java-applet;version=1.4
Java applet
application/x-java-applet;version=1.4.1
Java applet
application/x-java-applet;version=1.4.2
Java applet
application/x-java-applet;version=1.5
Java applet
application/x-java-applet;version=1.6
Java applet
application/x-java-applet;version=1.7
Java applet
application/x-java-vm
Java applet
application/x-java-vm-npruntime
Java applet
MoveNetworks Quantum Media Player
npmnqmp 07076003 — from file “Move_Media_Player.plugin”.
application/x-vnd.movenetworks.qm
MoveNetworks Move Media Player Plug-In
qmx
application/x-vnd.moveplay1.qm
MoveNetworks Move Media Player Plug-In
qmx
Musicnotes
Musicnotes Viewer plugin 1.16.13 http://www.musicnotes.com — from file “Musicnotes.plugin”.
application/x-musicnotes
Musicnotes
mtd
QuickTime Plug-in 7.7.1
The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site. — from file “QuickTime Plugin.plugin”.
application/sdp
SDP stream descriptor
sdp
application/x-mpeg
AMC media
amc
application/x-rtsp
RTSP stream descriptor
rtsp,rts
application/x-sdp
SDP stream descriptor
sdp
audio/3gpp
3GPP media
3gp,3gpp
audio/3gpp2
3GPP2 media
3g2,3gp2
audio/aac
AAC audio
aac,adts
audio/ac3
AC3 audio
ac3
audio/aiff
AIFF audio
aiff,aif,aifc,cdda
audio/amr
AMR audio
amr
audio/basic
uLaw/AU audio
au,snd,ulw
audio/mp3
MP3 audio
mp3,swa
audio/mp4
MPEG-4 media
mp4
audio/mpeg
MPEG audio
mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a,mp3,swa
audio/mpeg3
MP3 audio
mp3,swa
audio/vnd.qcelp
QUALCOMM PureVoice audio
qcp,qcp
audio/wav
WAVE audio
wav,bwf
audio/x-aac
AAC audio
aac,adts
audio/x-ac3
AC3 audio
ac3
audio/x-aiff
AIFF audio
aiff,aif,aifc,cdda
audio/x-caf
CAF audio
caf
audio/x-gsm
GSM audio
gsm
audio/x-m4a
AAC audio
m4a
audio/x-m4b
AAC audio book
m4b
audio/x-m4p
AAC audio (protected)
m4p
audio/x-mp3
MP3 audio
mp3,swa
audio/x-mpeg
MPEG audio
mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a,mp3,swa
audio/x-mpeg3
MP3 audio
mp3,swa
audio/x-wav
WAVE audio
wav,bwf
video/3gpp
3GPP media
3gp,3gpp
video/3gpp2
3GPP2 media
3g2,3gp2
video/avi
Video For Windows (AVI)
avi,vfw
video/mp4
MPEG-4 media
mp4
video/mpeg
MPEG media
mpeg,mpg,m1s,m1v,m1a,m75,m15,mp2,mpm,mpv,mpa -
I forgot my password on my touchscreen how can i fix this problem?
my little sisters though it would be funny to set a passcode on my itouch n sadly they forgot it! i need to find out how can i fix this issue without eraseing my music and apps! or if i cant do dat how can i reset the i touch?
You will have to do as the manual says and restore.
-
My daughter in law keeps getting my texts on her phone she is on my iTunes account how can I fix this problem without turning off my iMessage?
her iPhone is probably also signed in with your Apple ID (iTunes account) for iMessage. Have her check Settings>Messages>Send & Receive on her iPhone. I'd also have her check Settings>FaceTime. If your ID is there have her sign out.
see http://support.apple.com/kb/HT5538 -
My macbook crashed and I am trying to install my adobe programs again but I can't because he is used earlier by myself. How can I fix this without buying a whole new packet?
Hannahdb1 what specific Adobe applications are you attempting to reinstall? Do you receive any specific error messages? Finally what version of Mac OS are you using?
-
How to burn an iMovie to DVD without losing quality? I have iMovie 10.0.5 and iMac 10.9.4 mountain lion. I do not have iDVD. After iMovie goes through the encoding process, quality is horrible. How can I fix this problem? I have tried the apps BURN and DVD Creator for MAC. I need to finish this DVD asap and becoming more and more frustrated. Why would Apple give us iMovie and not provide us an app to burn it to a DVD and / or take away the iDVD?
Alicia McGinnisWhy is there no iDVD on my new Mac? How do I get it and how do I install it?
https://discussions.apple.com/docs/DOC-3673
To burn a DVD with iDVD from the latest version of iMovie, you have to export the movie using the Export button and select 480p as the size. Open iDVD and start a new project, then drag that exported movie file into the iDVD menu window, avoiding any drop zones you see. -
My Outlook/iCloud calendar invites to others appear to work on my end and sync with my PC and mobile, but when other people "accept" the invite, it will not populate/add in to their calendar. How can I fix this without turning off iCloud?
I am at a new office that uses Outlook (not Outlook Exchange) which does not sync with my mobile... I just got iCloud set up on my PC to sync my contacts, calendar, reminders, etc... The sync worked (not without flaws, but the other issues seem solvable... I think), so that i can now see all my appointments on both my phone and on my PC. The problem I am having is that iCloud moved all of my calendar items from Outlook into iCloud calendar and now when I send out meeting/calendar invites the recipients may accept them, but the meeting does not get added to their calendar. This is a huge problem and may mean that i need to turn off iCloud.
Does anyone know how to fix this?
Thanks!I am replying to my own post here as I seem to have fixed the problem.
I do have some calendars that are shared. Some of those are shared with users who have time zone support turned on. So i activated time zone support on my iphone, then deleted my icloud subscription. I then signed in to icloud again and voila... problem solved.
It is a weird one as the other calendar views were always fine and when you opened an event that appeared in the wrong day (on list view), the correct date of the event was shown in the information...
one more bug in a complicated system I guess
Maybe you are looking for
-
I am using a Macbook Pro 15" late 2013 model, and it works great. However, when I use Adobe Premiere Pro (which is a lot as I am studying editing) it occasionally freezes for a second then reboots itself. I got the details of the error and pasted the
-
A report showing all release refused purchase orders
Dear SAP Gurus Please assist, I need to run a report showing a list of release refused purchase orders. CN
-
Multiple customer statement in one spool file
Hi Experts, I am using f.27 to create a monthly customer statement. I would like to process all the customer in one time, which is able to create an spool request, but my requirement is to generate different pdf files from one spool file. Please help
-
I've followed all of the instructions but none of my photos (jpeg) will stay in the drop zone where it says "drag photos here" . I can drag them there but then they just pop back over...HELP I'm getting really frustrated.
-
I am trying to learn DVD SP and finding it very difficult. Has anyone tried authoring the DVD menu in iDVD and exporting the menu as a disk image to Compressor for compressing and burning? iDVD makes the process so much easier. Thanks Kent