Pls help me in writing a query for my problem !
I have to find out the amount(LAmt) for members who lie btw diff age groups, below are the table structures:
table1
DOB ID
12/24/1986 F125
06/05/1988 F223
05/04/1987 F589
07/07/2001 F856
table2
LAmt ID LDate
$56 F125 01/01/2011
$45 F223 08/22/2005
$87 F589 09/24/2004
$87 F856 10/10/2000
$87 F587 09/09/2002
Query:
1) I have to find the age group for the members who lie between 1 to 5 & 6 to 10 and so on, Also find the the no. of days since they have been registered(Using LDate-Current Date) , also the LAmt for those members.
Hi,
836810 wrote:
SELECT -- To calculate Listed Amount of members btw age group 0 to 4
COUNT(DateOfBirth) as Nopresent,
DATEDIFF (yyyy,DateOfBirth,GETDATE()) as age,
SUM(RPTInvHosp.AccountListAmount) as ListedAmt,
COUNT(DateOfBirth) * SUM(RPTInvHosp.AccountListAmount) as [Calc]
FROM RPTInv1st,RPTInvHosp
WHERE
DATEDIFF (yyyy,DateOfBirth,GETDATE()) >= 0 and
DATEDIFF (yyyy,DateOfBirth,GETDATE()) < 5 and
RPTInv1st.PASDebtorID=RPTInvHosp.PASDebtorID
Group by DATEDIFF (yyyy,DateOfBirth,GETDATE())
I want to get members btw the particular age group JOIN with the no of days they have been opened an account & their amount.In Oracle, use double-quotes (or nothing) instead of square brackets around aliases:
COUNT(DateOfBirth) * SUM(RPTInvHosp.AccountListAmount) as "Calc"The double-quotes are only necessary if you want the alias not to conform to the normal naming conventions; they are optional around normal names, such as CALC.
There are no built-in functions called GETDATE or DATEDIFF in Oracle.
In Oracle, SYSDATE returns the current DATE (on the database server).
There's nothing very convenient in Oracle for getting the difference between two DATEs in units of a year. The best way is to use MONTHS_BETWEEN to get the difference in months, and then divide that number by 12, like this:
WHERE FLOOR ( MONTHS_BETWEEN ( SYSDATE
, DateOfBirth
/ 12
) BETWEEN 0
AND 4Do you need help about how to do a join?
It's not at all clear what you want here.
Whenever you have a question, post CREATE TABLE and INSERT statements for your sample data, and post the exact results you want from that data. Explain, with specific examples, how you get those results from that data.
Always say what version of Oracle (or other software) you're using.
Similar Messages
-
Pls help me to modify the query for performance improvement
Hi,
I have the below initialization
DECLARE @Active bit =1 ;
Declare @id int
SELECT @Active=CASE WHEN id=@id and [Rank] ='Good' then 0 else 1 END FROM dbo.Students
I have to change this query in such a way that the conditions id=@id and [Rank] ='Good' should go to the where condition of the query. In that case, how can i use Case statement to retrieve 1 or 0? Can you please help me to modify this initialization?I dont understand your query...May be below? or provide us sample data and your output...
SELECT * FROM dbo.students
where @Active=CASE
WHEN id=@id and rank ='Good' then 0 else 1 END
But, I doubt you will have performance improvement here?
Do you have index on id?
If you are looking for getting the data for @ID with rank ='Good' then use the below:Make sure, you have index on id,rank combination.
SELECT * FROM dbo.students
where id=@id
and rank ='Good' -
Need help writing a query for following scenario
Hi all, I need some help writing a query for the following case:
One Table : My_Table
Row Count: App 5000
Columns of Interest: AA and BB
Scenario: AA contains some names of which BB contains the corresponding ID. Some
names are appearing more than once with different IDs. For example,
AA BB
Dummy 10
Me 20
Me 30
Me 40
You 70
Me 50
Output needed: I need to write a query that will display only all the repeating names with their corresponding IDs excluding all other records.
I would appreciate any input. ThanksIs it possible to have a records with the same values for AA and BB? Are you interested in these rows or do you only care about rows with the same value of AA and different BB?
With a slight modification of a previous posting you can only select those rows that have distinct values of BB for the same value of AA
WITH t AS (
SELECT 'me' aa, 10 bb FROM dual
UNION ALL
SELECT 'me' aa, 20 bb FROM dual
UNION ALL
SELECT 'you' aa, 30 bb FROM dual
UNION ALL
SELECT 'you' aa, 30 bb FROM dual
SELECT DISTINCT aa, bb
FROM (SELECT aa, bb, COUNT(DISTINCT bb) OVER(PARTITION BY aa) cnt FROM t)
WHERE cnt > 1; -
Pls help me in sending sequential responses for the different commands.
Hi all
pls help me in sending sequential responses for the different commands. For example,i have to send the response1 for command1 then again host wll send the some other command ,say command 2 after receiving response 1,then again i have to respond to the corresponding command.i m using the pci-6221 card not tradition DAQcard.
regards,
nitinHi,
you need to be more specific. What is your setup?
Obviously, what you need is a command parser. Look this article for the basics. I know it is meant for RT but the concept is there.
Not sure it will help with so few infos: http://zone.ni.com/devzone/conceptd.nsf/webmain/CD63FD0F746B17A686256F090065F572
Dai
Dai
LV 7.1 - WIN XP - RT - FP -
Help needed in writing a Query/Procedure
Hello All,
Need all ur help in writing a query or procedure
Lets say the Table name is DEMO
There i have one column like num it has values
1
2
3
4
5
8
9
10
my query output should be
1-5
8-10
i,e .. if the diff between two rows is greater than 1 then it result should be in a separate group
I need a query/Procedure for this. Kindly help
Regards,
ChandraTried obtaining the output using SQL and the result is as follows:
SQL> WITH T AS
2 (
3 SELECT 1 COL1 FROM DUAL
4 UNION
5 SELECT 2 COL1 FROM DUAL
6 UNION
7 SELECT 3 COL1 FROM DUAL
8 UNION
9 SELECT 4 COL1 FROM DUAL
10 UNION
11 SELECT 5 COL1 FROM DUAL
12 UNION
13 SELECT 8 COL1 FROM DUAL
14 UNION
15 SELECT 9 COL1 FROM DUAL
16 UNION
17 SELECT 10 COL1 FROM DUAL
18 UNION
19 SELECT 13 COL1 FROM DUAL
20 UNION
21 SELECT 14 COL1 FROM DUAL
22 UNION
23 SELECT 15 COL1 FROM DUAL
24 UNION
25 SELECT 16 COL1 FROM DUAL
26 UNION
27 SELECT 23 COL1 FROM DUAL
28 UNION
29 SELECT 24 COL1 FROM DUAL
30 )
31 SELECT OUTPUT FROM
32 (
33 SELECT DECODE(COL3,NULL,COL1, COL2) || '-' || LEAD(DECODE(COL3,NULL,COL3, COL1)) OVER (ORDER BY DECODE(COL3,NULL,COL1, COL2)) OUTPUT FROM
34 (
35 SELECT COL1, LEAD(COL1) OVER (ORDER BY COL1) COL2, LAG(COL1) OVER (ORDER BY COL1) COL3 FROM T
36 )
37 WHERE
38 (COL2 - COL1 > 1 OR COL2 IS NULL OR COL3 IS NULL)
39 )
40 WHERE OUTPUT != '-';
OUTPUT
1-5
8-10
13-16
23-24 -
Hs_err_pid3108 error pls help me its really been there for a year now =(
Here is the complete error file:
# An unexpected error has been detected by Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x2309cfa0, pid=3108, tid=2896
# Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)
# Problematic frame:
# C 0x2309cfa0
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
--------------- T H R E A D ---------------
Current thread (0x07c48000): JavaThread "Thread-10" daemon [_thread_in_Java, id=2896]
siginfo: ExceptionCode=0xc0000005, writing address 0x385d0800
Registers:
EAX=0x001f0900, EBX=0x00000109, ECX=0x2309cf98, EDX=0x0000dc00
ESP=0x0a33ebb0, EBP=0x0a33f008, ESI=0x0000dc00, EDI=0x00000135
EIP=0x2309cfa0, EFLAGS=0x00210246
Top of Stack: (sp=0x0a33ebb0)
0x0a33ebb0: 00000000 00000000 00000135 00000135
0x0a33ebc0: 001f0900 001f0900 0000013d 10c50000
0x0a33ebd0: 01590005 00730000 0000006e ffff6187
0x0a33ebe0: 000030c3 ffff6187 00000083 ffff5e51
0x0a33ebf0: 000006bc ffff5e51 ffff8000 0001c000
0x0a33ec00: ffff8000 00000073 00000071 0f460000
0x0a33ec10: 017c3332 01480000 01480000 0b0f8000
0x0a33ec20: 0b0f8000 00000000 0b0f8000 00000002
Instructions: (pc=0x2309cfa0)
0x2309cf90: 01 00 00 00 ac 0a 00 00 01 00 00 00 88 e3 72 2b
0x2309cfa0: 01 9c 02 00 23 3d 38 00 23 3d 38 00 23 3d 38 00
Stack: [0x0a240000,0x0a340000), sp=0x0a33ebb0, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x2309cfa0
J ea.k(I)V
J ea.a(ZZI)V
J ea.a(IIIIIIIII)V
J qb.a(Lse;Z)V
J qb.a(IIIIII)V
J pf.a(I)V
J lb.b(B)V
J client.a(I)V
J v.g(I)V
J v.run()V
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0aad9400 JavaThread "Thread-16" daemon [_thread_blocked, id=2004]
0x08994800 JavaThread "Thread-15" daemon [_thread_blocked, id=3856]
0x089ae400 JavaThread "Thread-14" daemon [_thread_blocked, id=3464]
0x08964000 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=3760]
0x0899e000 JavaThread "Thread-11" daemon [_thread_blocked, id=404]
=>0x07c48000 JavaThread "Thread-10" daemon [_thread_in_Java, id=2896]
0x08adbc00 JavaThread "Thread-9" daemon [_thread_blocked, id=1592]
0x0894bc00 JavaThread "AWT-EventQueue-2" [_thread_in_native, id=3192]
0x08ae5c00 JavaThread "thread applet-loader.class" [_thread_blocked, id=3276]
0x0894ac00 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=3256]
0x08946400 JavaThread "AWT-Shutdown" [_thread_blocked, id=2888]
0x08940400 JavaThread "CacheCleanUpThread" daemon [_thread_blocked, id=3004]
0x07d32c00 JavaThread "traceMsgQueueThread" daemon [_thread_blocked, id=3712]
0x07d26400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3568]
0x07d24400 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3092]
0x07c70400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3348]
0x07c6b800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3596]
0x07c6a400 JavaThread "Attach Listener" daemon [_thread_blocked, id=2756]
0x07c69400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2764]
0x07c65000 JavaThread "Finalizer" daemon [_thread_blocked, id=2460]
0x07c60800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3616]
0x02949c00 JavaThread "main" [_thread_in_native, id=2308]
Other Threads:
0x07c57400 VMThread [id=3600]
0x07c8ac00 WatcherThread [id=1144]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 6080K, used 4552K [0x20960000, 0x20ff0000, 0x210c0000)
eden space 5440K, 73% used [0x20960000, 0x20d442e8, 0x20eb0000)
from space 640K, 88% used [0x20f50000, 0x20fde068, 0x20ff0000)
to space 640K, 0% used [0x20eb0000, 0x20eb0000, 0x20f50000)
tenured generation total 80140K, used 69910K [0x210c0000, 0x25f03000, 0x26960000)
the space 80140K, 87% used [0x210c0000, 0x25505930, 0x25505a00, 0x25f03000)
compacting perm gen total 12288K, used 4386K [0x26960000, 0x27560000, 0x2a960000)
the space 12288K, 35% used [0x26960000, 0x26da8998, 0x26da8a00, 0x27560000)
ro space 8192K, 62% used [0x2a960000, 0x2ae5e4e8, 0x2ae5e600, 0x2b160000)
rw space 12288K, 52% used [0x2b160000, 0x2b7a0e78, 0x2b7a1000, 0x2bd60000)
Dynamic libraries:
0x00400000 - 0x0049a000 C:\Program Files\Internet Explorer\iexplore.exe
0x7c900000 - 0x7c9b6000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8fe000 C:\WINDOWS\system32\kernel32.dll
0x77f40000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll
0x77da0000 - 0x77e31000 C:\WINDOWS\system32\RPCRT4.dll
0x77e40000 - 0x77e87000 C:\WINDOWS\system32\GDI32.dll
0x7e390000 - 0x7e420000 C:\WINDOWS\system32\USER32.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll
0x00330000 - 0x003a6000 C:\WINDOWS\system32\SHLWAPI.dll
0x7c9c0000 - 0x7d1e0000 C:\WINDOWS\system32\SHELL32.dll
0x774a0000 - 0x775dd000 C:\WINDOWS\system32\ole32.dll
0x61410000 - 0x61531000 C:\WINDOWS\system32\urlmon.dll
0x770e0000 - 0x7716c000 C:\WINDOWS\system32\OLEAUT32.dll
0x5dca0000 - 0x5dce4000 C:\WINDOWS\system32\iertutil.dll
0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
0x76330000 - 0x7634d000 C:\WINDOWS\system32\IMM32.DLL
0x77390000 - 0x77493000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
0x5d4e0000 - 0x5d57a000 C:\WINDOWS\system32\comctl32.dll
0x00a40000 - 0x00fe6000 C:\WINDOWS\system32\IEFRAME.dll
0x76bb0000 - 0x76bbb000 C:\WINDOWS\system32\PSAPI.DLL
0x771b0000 - 0x7727c000 C:\WINDOWS\system32\WININET.dll
0x009a0000 - 0x009a9000 C:\WINDOWS\system32\Normaliz.dll
0x5b190000 - 0x5b1c8000 C:\WINDOWS\system32\UxTheme.dll
0x754d0000 - 0x75578000 C:\WINDOWS\system32\RASDLG.dll
0x76d00000 - 0x76d18000 C:\WINDOWS\system32\MPRAPI.dll
0x77c90000 - 0x77cc2000 C:\WINDOWS\system32\ACTIVEDS.dll
0x76dd0000 - 0x76df5000 C:\WINDOWS\system32\adsldpc.dll
0x6ff20000 - 0x6ff74000 C:\WINDOWS\system32\NETAPI32.dll
0x76f20000 - 0x76f4d000 C:\WINDOWS\system32\WLDAP32.dll
0x76ad0000 - 0x76ae1000 C:\WINDOWS\system32\ATL.DLL
0x76e40000 - 0x76e4e000 C:\WINDOWS\system32\rtutils.dll
0x71b80000 - 0x71b93000 C:\WINDOWS\system32\SAMLIB.dll
0x778e0000 - 0x779d7000 C:\WINDOWS\system32\SETUPAPI.dll
0x76ea0000 - 0x76edc000 C:\WINDOWS\system32\RASAPI32.dll
0x76e50000 - 0x76e62000 C:\WINDOWS\system32\rasman.dll
0x71a30000 - 0x71a47000 C:\WINDOWS\system32\WS2_32.dll
0x71a20000 - 0x71a28000 C:\WINDOWS\system32\WS2HELP.dll
0x76e70000 - 0x76e9f000 C:\WINDOWS\system32\TAPI32.dll
0x76af0000 - 0x76b1e000 C:\WINDOWS\system32\WINMM.dll
0x746a0000 - 0x746eb000 C:\WINDOWS\system32\MSCTF.dll
0x20000000 - 0x202d5000 C:\WINDOWS\system32\xpsp2res.dll
0x77b00000 - 0x77b22000 C:\WINDOWS\system32\apphelp.dll
0x75250000 - 0x7527e000 C:\WINDOWS\system32\msctfime.ime
0x5dff0000 - 0x5e01e000 C:\WINDOWS\system32\IEUI.dll
0x76320000 - 0x76325000 C:\WINDOWS\system32\MSIMG32.dll
0x4eb80000 - 0x4ed23000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\gdiplus.dll
0x47060000 - 0x47081000 C:\WINDOWS\system32\xmllite.dll
0x76f90000 - 0x7700f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77010000 - 0x770dd000 C:\WINDOWS\system32\COMRes.dll
0x74670000 - 0x7469a000 C:\WINDOWS\System32\msimtf.dll
0x77f10000 - 0x77f21000 C:\WINDOWS\system32\Secur32.dll
0x60a30000 - 0x60a39000 C:\WINDOWS\system32\mslbui.dll
0x779e0000 - 0x77a36000 C:\WINDOWS\System32\cscui.dll
0x765a0000 - 0x765bd000 C:\WINDOWS\System32\CSCDLL.dll
0x325c0000 - 0x325d2000 C:\Program Files\Microsoft Office\OFFICE11\msohev.dll
0x61930000 - 0x61979000 C:\Program Files\Internet Explorer\ieproxy.dll
0x7d1f0000 - 0x7d4ae000 C:\WINDOWS\system32\msi.dll
0x75e30000 - 0x75ee0000 C:\WINDOWS\system32\SXS.DLL
0x75d40000 - 0x75dd1000 C:\WINDOWS\system32\MLANG.dll
0x10000000 - 0x1000e000 C:\Program Files\Adobe\Acrobat 7.0\ActiveX\AcroIEHelper.dll
0x7c340000 - 0x7c396000 C:\WINDOWS\system32\MSVCR71.dll
0x02950000 - 0x0296b000 C:\WINDOWS\system32\dla\tfswshx.dll
0x02970000 - 0x0297f000 C:\WINDOWS\system32\tfswapi.dll
0x029e0000 - 0x02a7b000 C:\WINDOWS\system32\dla\tfswcres.dll
0x6d7c0000 - 0x6d839000 C:\Program Files\Java\jre1.6.0_01\bin\ssv.dll
0x719d0000 - 0x71a10000 C:\WINDOWS\system32\mswsock.dll
0x61200000 - 0x61259000 C:\WINDOWS\system32\hnetcfg.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\System32\wshtcpip.dll
0x76970000 - 0x76a24000 C:\WINDOWS\system32\USERENV.dll
0x77c40000 - 0x77c63000 C:\WINDOWS\system32\msv1_0.dll
0x76d20000 - 0x76d39000 C:\WINDOWS\system32\iphlpapi.dll
0x71cd0000 - 0x71cec000 C:\WINDOWS\system32\actxprxy.dll
0x72240000 - 0x72245000 C:\WINDOWS\system32\sensapi.dll
0x76f80000 - 0x76f86000 C:\WINDOWS\system32\rasadhlp.dll
0x76ee0000 - 0x76f07000 C:\WINDOWS\system32\DNSAPI.dll
0x7e830000 - 0x7eb8c000 C:\WINDOWS\system32\mshtml.dll
0x03000000 - 0x03029000 C:\WINDOWS\system32\msls31.dll
0x72ea0000 - 0x72f00000 C:\WINDOWS\system32\ieapfltr.dll
0x76bf0000 - 0x76c1e000 C:\WINDOWS\system32\WINTRUST.dll
0x77a40000 - 0x77ad5000 C:\WINDOWS\system32\CRYPT32.dll
0x77ae0000 - 0x77af2000 C:\WINDOWS\system32\MSASN1.dll
0x76c50000 - 0x76c78000 C:\WINDOWS\system32\IMAGEHLP.dll
0x77650000 - 0x77671000 C:\WINDOWS\system32\NTMARTA.DLL
0x63380000 - 0x633f7000 C:\WINDOWS\System32\jscript.dll
0x58760000 - 0x58792000 C:\WINDOWS\system32\iepeers.dll
0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV
0x76200000 - 0x76276000 C:\WINDOWS\system32\mshtmled.dll
0x1b000000 - 0x1b00c000 C:\WINDOWS\system32\ImgUtil.dll
0x1b060000 - 0x1b06e000 C:\WINDOWS\system32\pngfilt.dll
0x72c90000 - 0x72c99000 C:\WINDOWS\system32\wdmaud.drv
0x72c80000 - 0x72c88000 C:\WINDOWS\system32\msacm32.drv
0x77bb0000 - 0x77bc5000 C:\WINDOWS\system32\MSACM32.dll
0x77ba0000 - 0x77ba7000 C:\WINDOWS\system32\midimap.dll
0x74900000 - 0x74a0e000 C:\WINDOWS\System32\msxml3.dll
0x767a0000 - 0x767c7000 C:\WINDOWS\system32\schannel.dll
0x0ffd0000 - 0x0fff8000 C:\WINDOWS\system32\rsaenh.dll
0x68100000 - 0x68124000 C:\WINDOWS\system32\dssenh.dll
0x74d10000 - 0x74d7b000 C:\WINDOWS\system32\USP10.dll
0x6d6b0000 - 0x6d6d1000 C:\Program Files\Java\jre1.6.0_01\bin\npjpi160_01.dll
0x6d4a0000 - 0x6d4bb000 C:\Program Files\Java\jre1.6.0_01\bin\jpiexp.dll
0x6d250000 - 0x6d261000 C:\Program Files\Java\jre1.6.0_01\bin\deploy.dll
0x71a50000 - 0x71a5a000 C:\WINDOWS\system32\wsock32.dll
0x76f70000 - 0x76f78000 C:\WINDOWS\System32\winrnr.dll
0x6d4f0000 - 0x6d514000 C:\Program Files\Java\jre1.6.0_01\bin\jpishare.dll
0x05960000 - 0x05ba7000 C:\PROGRA~1\Java\JRE16~1.0_0\bin\client\jvm.dll
0x6d310000 - 0x6d318000 C:\PROGRA~1\Java\JRE16~1.0_0\bin\hpi.dll
0x6d770000 - 0x6d77c000 C:\PROGRA~1\Java\JRE16~1.0_0\bin\verify.dll
0x6d3b0000 - 0x6d3cf000 C:\PROGRA~1\Java\JRE16~1.0_0\bin\java.dll
0x6d7b0000 - 0x6d7bf000 C:\PROGRA~1\Java\JRE16~1.0_0\bin\zip.dll
0x6d000000 - 0x6d1c3000 C:\Program Files\Java\jre1.6.0_01\bin\awt.dll
0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll
0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll
0x6d2b0000 - 0x6d303000 C:\Program Files\Java\jre1.6.0_01\bin\fontmanager.dll
0x6d480000 - 0x6d498000 C:\Program Files\Java\jre1.6.0_01\bin\jpicom.dll
0x08c40000 - 0x08c7b000 C:\Program Files\Java\jre1.6.0_01\bin\regutils.dll
0x30000000 - 0x302ee000 C:\WINDOWS\system32\Macromed\Flash\Flash9b.ocx
0x76350000 - 0x7639a000 C:\WINDOWS\system32\comdlg32.dll
0x69000000 - 0x6900e000 C:\WINDOWS\system32\Macromed\Common\SwSupport.dll
0x6d570000 - 0x6d583000 C:\Program Files\Java\jre1.6.0_01\bin\net.dll
0x6d220000 - 0x6d243000 C:\Program Files\Java\jre1.6.0_01\bin\dcpr.dll
0x6d940000 - 0x6d94a000 C:\WINDOWS\System32\ddrawex.dll
0x6d760000 - 0x6d76f000 C:\Program Files\Java\jre1.6.0_01\bin\unpack.dll
0x6d590000 - 0x6d599000 C:\Program Files\Java\jre1.6.0_01\bin\nio.dll
0x6d520000 - 0x6d544000 C:\Program Files\Java\jre1.6.0_01\bin\jsound.dll
0x6d550000 - 0x6d558000 C:\Program Files\Java\jre1.6.0_01\bin\jsoundds.dll
0x73e80000 - 0x73edc000 C:\WINDOWS\system32\DSOUND.dll
0x73e50000 - 0x73e54000 C:\WINDOWS\system32\KsUser.dll
0x6d450000 - 0x6d474000 C:\Program Files\Java\jre1.6.0_01\bin\jpeg.dll
VM Arguments:
jvm_args: -Xbootclasspath/a:C:\PROGRA~1\Java\JRE16~1.0_0\lib\deploy.jar;C:\PROGRA~1\Java\JRE16~1.0_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.6.0_01 -Djavaplugin.nodotversion=160_01 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE16~1.0_0 -Djavaplugin.vm.options=-Djava.class.path=C:\PROGRA~1\Java\JRE16~1.0_0\classes -Xbootclasspath/a:C:\PROGRA~1\Java\JRE16~1.0_0\lib\deploy.jar;C:\PROGRA~1\Java\JRE16~1.0_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.6.0_01 -Djavaplugin.nodotversion=160_01 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE16~1.0_0
java_command: <unknown>
Launcher Type: generic
Environment Variables:
CLASSPATH=.;
PATH=C:\PROGRA~1\Java\JRE16~1.0_0\bin;C:\Program Files\Internet Explorer;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Sonic\MyDVD;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\Sonic\MyDVD;;C:\DESKJET;.
USERNAME=Giel
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2
Memory: 4k page, physical 523808k(60484k free), swap 1228812k(801124k free)
vm_info: Java HotSpot(TM) Client VM (1.6.0_01-b06) for windows-x86, built on Mar 14 2007 00:24:02 by "java_re" with unknown MS VC++:1310
Thanks for your help, it would be really nice if annyone could help me out here. I am encountering this problem for more then a year now, and nothing has been able to fix it. pls help meThe stack trace from the hs_err log doesn't provide a ton of info on this. I would try running with the server compiler (add the option '-server' to your command line) to see if this is due to something in the client compiler. Aside from that, look at the Java SE 6 troubleshooting guide, it has a number of tips for getting more information:
http://java.sun.com/javase/6/webnotes/trouble/index.html
Best of all, if you have a (hopefully small) reproducible test case that you can provide to us (Sun), then please file a bug. -
Writing OR query for fetching records
Hi,
I have dowloaded a custom wsdl and generated a java client from it using Jdeveloper.
I have a method named customObject1QueryPage(QueryInputObj) which is used to query the CRM oD to fetch records.
I have successfully queried using the above method for one condition:-
QueryInputObj param= new QueryInputObj();
QueryType q = new QueryType();
q.set_value("='" + "ABC'");
//q.set_value("LIKE 'A*'");
param.setAccountName(q);
customObject1QueryPage(param);
But now I want to query using "OR" condition with multiple names in the condition and I don't know how to
write query for that.
SQL query would be like "Select * from table where name='ABC' OR name='PQR' OR name ='XYZ' ";
I want to execute same query for CRM oD but have no idea how to write it.
Can somebody please help me as soon as possible.
Thanks.Hi,
If your intent to Use OR Condition on a field with multiple Values
say, AccountName = 'xyz' OR AccountName= 'abc' the syntax would be *(='xyz') OR (='abc')*
say, AccountName = 'xyz' OR AccountName= 'abc' OR AccountName = 'pqr' the syntax would be *((='xyz') OR (='abc'))OR(='pqr')*
You can find similar example under On Demand Web Service Documentation
Regards
Deepak H Andeli -
Help with re-writing this query
Dear experts;
create table t2
ID varchar2(1000),
name varchar2(1000),
place varchar2(1000)
create table mappingt2
grades varchar2(1000)
individual varchar2(1000)
insert into t2 values ('James', 'John', 'newyork');
insert into t2 values ('Linda', 'James', 'London');
insert into t2 values ('Alex', 'kim', 'Mexico');
insert into t2 values ('karen', 'Jack', 'Tunis');
insert into t2 values ('CC', 'Jack', 'Peru');
insert into t2 values ('Linda', 'James', 'Germany');
insert into mappingt2 values ('A', 'James');
insert into mappingt2 values ('C', 'Kim');
insert into mappingt2 values ('C', 'Linda');
insert into mappingt2 values ('B', 'CC');I have the following query below
SELECT (select grades from mappingt2 t
where t.individual = pt.ID) as current_grade
,(select grades from mappingt2 ty
where ty.individual = pt.name) alt_grade
,pt.place
FROM t2 ptI was just wondering whether this query can be better written. All help is appreciated. Thank youuser13328581 wrote:
Hi Frank, Tom Kyte claims sub scalar queries is usually betterHe didn't say usually he said if you want the first row faster
>
if your goal is to optimize your query for initial response time, you may want to use the former query, with the scalar subquery, because Oracle Database would have to get just the first row from DEPT, run the scalar subquery (select count...) against EMP to get the count, and then return it. The process for returning that first row would be very fast.
>
The corollary to this that was not explicitly mentioned in the article that I can see is that this probably comes at the expense of the time taken to return all the rows which can then take longer. -
please help me find out the solution to the problem.
My iphone 4S was not able to fetch mails from the server ( outgoing and incoming)
I was trying to configure my exchange account and follow all the procedures correctly but am having trouble in sending and receiving mails as the error says " cant get mails cannot connect to the server? where seems to be the problem?
Have read from the support services that if you using a Pop3 account into another device which I did ( my email was configured via outlook for mac in my macbook) there might be a lock out problem and cannot get emails on the second device which is my iphone? ( I want to set up my exchange account to my iphone so wherever and whenever i go i cant still access to my email easily. Please help.No one seems to be hearing what Big Q is saying.
He can pair his iPhone to his Macbook, but cannot CONNECT. He's NOT asking for alternative solutions, like Wi Fi.
I am able to both pair and connect my one one Macbook to my other one, but I can only pair but not connect my iPhone or iPad to either Macbook. So I have the same problem. But I can pair and connect my Macbooks to other Bluetooth devices, like my ancient Nokia cellfone, or my Bluetooth HP printer.
It's irrelavent that I can instead use a direct USB cable or Wi Fi between my Macbooks and my iPhone/iPad - why can't I use Bluetooth? If Apple does not allow Bluetooth between it's Macbooks and other Mac devices, then why have Bluetooth at all? Does my iPhone have Bluetooth only so that I can pair and connect to my my non Apple mobile handsfree car kit, or communicate easily with the dreaded Apple enemy Samsung, or what?
Make no mistake , I am a diehard Apple fan, but this Bluetooth non compatibility issue appears shortsighted and seemingly pointless. Why does Apple not just say why they created the non compatibility, or have a message on the Bluetooth setup programme which simply and clearly says "don't bother wasting hours of your time trying to pair and connect your iPhone to your Macbook, because we don't allow that anymore, reason being that............"?
As a first time user of this Forum I am surprised at the intolerant and highhanded tone of some of the replies to what is a legitimate question, that is obviously plagueing many, many other Apple users. -
Need help in re-writing a query
SELECT DDQ.DS_PRS_ID,TO_CHAR(DDQ.DEACTIVATE_DT,'DD-MON-YYYY HH24:MI'),
TO_CHAR(SYSDATE+NVL(L.GMT_OFFSET,0)/24,'DD-MON-YYYY HH24:MI'),
PCWI.PRS_ID,mcr_pkg_hra_person_name.get_tc_full_name(PCWI.prs_last_nm,
PCWI.prs_first_nm,PCWI.prs_middle_init,PCWI.prs_pref_nm,
PCWI.ROLE_TYPE_CD),TO_CHAR(PCWI.termn_dt,'DD-MON-YYYY HH24:MI'),
MOF.OFFER_STATUS_CD, TO_CHAR(NVL(MOF.ADJ_START_DT,START_DT),'DD-MON-YYYY HH24:MI'),
TO_CHAR(OFFER_STATUS_DT, 'DD-MON-YYYY HH24:MI') /* Added by Ashwin for Radar 3160778 */
FROM MER_OFFER_FORM MOF, LOC L, PRS_CUR_WORK_INFO PCWI, DS_DEACTIVATE_QUEUE DDQ
WHERE DDQ.DS_PRS_ID > 0
AND PCWI.DS_PRS_ID = DDQ.DS_PRS_ID
AND L.LOC_CD = PCWI.LOC_CD
AND MOF.DS_PRS_ID(+) = PCWI.DS_PRS_ID;
The above gives the following output.
4519 29-NOV-2006 23:59 18-DEC-2007 19:33 14626 Larson, Marianne 29-NOV-2006 00:00 10 01-SEP-2007 00:00 03-DEC-2007 15:41
4519 29-NOV-2006 23:59 18-DEC-2007 19:33 14626 Larson, Marianne 29-NOV-2006 00:00 10 11-MAR-1998 00:00 19-MAR-1998 16:51
130516250 26-JAN-2007 23:59 C429219 18-DEC-2007 19:39 *GIROUX, DAVID A. 10 19-AUG-2006 00:00 15-AUG-2006 15:45
130516250 26-JAN-2007 23:59 C429219 18-DEC-2007 19:39 *GIROUX, DAVID A. 10 11-JUN-2006 00:00 09-JUN-2006 15:27
I want to select distinct DDQ.DS_PRS_ID and minmum OFFER_STATUS_DT among the duplicate DDQ.DS_PRS_ID.
I somehow want to avoid duplicate DDQ.DS_PRS_ID here (Distinct clause does not work. And we cant remove outer join condition from the above query).
Could you please suggest me the query for this?
Regards,
Chandra Bhushan BakshiCan you not just do something like
SELECT ddq.ds_prs_id, TO_CHAR (ddq.deactivate_dt, 'DD-MON-YYYY HH24:MI'),
TO_CHAR (SYSDATE + NVL (l.gmt_offset, 0) / 24, 'DD-MON-YYYY HH24:MI'),
pcwi.prs_id,
mcr_pkg_hra_person_name.get_tc_full_name (pcwi.prs_last_nm,
pcwi.prs_first_nm,
pcwi.prs_middle_init,
pcwi.prs_pref_nm,
pcwi.role_type_cd
TO_CHAR (pcwi.termn_dt, 'DD-MON-YYYY HH24:MI'), mof.offer_status_cd,
TO_CHAR (NVL (mof.adj_start_dt, start_dt), 'DD-MON-YYYY HH24:MI'),
TO_CHAR (offer_status_dt, 'DD-MON-YYYY HH24:MI')
FROM mer_offer_form mof,
loc l,
prs_cur_work_info pcwi,
ds_deactivate_queue ddq
WHERE ddq.ds_prs_id > 0
AND pcwi.ds_prs_id = ddq.ds_prs_id
AND l.loc_cd = pcwi.loc_cd
AND mof.ds_prs_id(+) = pcwi.ds_prs_id
AND mof.offer_status_dt(+) = (select min(offer_status_dt)
from mer_offer_form mof2
where ds_prs_id = ddq.ds_prs_id) -
Pls help..Constructor,setter, getter and Exception Handling Problem
halo, im new in java who learning basic thing and java.awt basic...i face some problem about constructor, setter, and getter.
1. I created a constructor, setter and getter in a file, and create another test file which would like to get the value from the constructor file.
The problem is: when i compile the test file, it come out error msg:cannot find symbol.As i know that is because i miss declare something but i dont know what i miss.I post my code here and help me to solve this problem...thanks
my constructor file...i dont know whether is correct, pls tell me if i miss something...
public class Employee{
private int empNum;
private String empName;
private double empSalary;
Employee(){
empNum=0;
empName="";
empSalary=0;
public int getEmpNum(){
return empNum;
public String getName(){
return empName;
public double getSalary(){
return empSalary;
public void setEmpNum(int e){
empNum = e;
public void setName(String n){
empName = n;
public void setSalary(double sal){
empSalary = sal;
my test file....
public class TestEmployeeClass{
public static void main(String args[]){
Employee e = new Employee();
e.setEmpNum(100);
e.setName("abc");
e.setSalary(1000.00);
System.out.println(e.getEmpNum());
System.out.println(e.getName());
System.out.println(e.getSalary());
}**the program is work if i combine this 2 files coding inside one file(something like the last part of my coding of problem 2)...but i would like to separate them....*
2. Another problem is i am writing one simple program which is using java.awt interface....i would like to add a validation for user input (something like show error msg when user input character and negative number) inside public void actionPerformed(ActionEvent e) ...but i dont have any idea to solve this problem.here is my code and pls help me for some suggestion or coding about exception. thank a lots...
import java.awt.*;
import java.awt.event.*;
public class SnailTravel extends Frame implements ActionListener, WindowListener{
private Frame frame;
private Label lblDistance, lblSpeed, lblSpeed2, lblTime, lblTime2, lblComment, lblComment2 ;
private TextField tfDistance;
private Button btnCalculate, btnClear;
public void viewInterface(){
frame = new Frame("Snail Travel");
lblDistance = new Label("Distance");
lblSpeed = new Label("Speed");
lblSpeed2 = new Label("0.0099km/h");
lblTime = new Label("Time");
lblTime2 = new Label("");
lblComment = new Label("Comment");
lblComment2 = new Label("");
tfDistance = new TextField(20);
btnCalculate = new Button("Calculate");
btnClear = new Button("Clear");
frame.setLayout(new GridLayout(5,2));
frame.add(lblDistance);
frame.add(tfDistance);
frame.add(lblSpeed);
frame.add(lblSpeed2);
frame.add(lblTime);
frame.add(lblTime2);
frame.add(lblComment);
frame.add(lblComment2);
frame.add(btnCalculate);
frame.add(btnClear);
btnCalculate.addActionListener(this);
btnClear.addActionListener(this);
frame.addWindowListener(this);
frame.setSize(100,100);
frame.setVisible(true);
frame.pack();
public static void main(String [] args) {
SnailTravel st = new SnailTravel();
st.viewInterface();
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnCalculate){
SnailData sd = new SnailData();
double distance = Double.parseDouble(tfDistance.getText());
sd.setDistance(distance);
sd.setSpeed(0.0099);
sd.setTime(distance/sd.getSpeed());
String answer = Double.toString(sd.getTime());
lblTime2.setText(answer);
lblComment2.setText("But No Exception!!!");
else
if(e.getSource() == btnClear){
tfDistance.setText("");
lblTime2.setText("");
public void windowClosing(WindowEvent e){
System.exit(1);
public void windowClosed (WindowEvent e) { };
public void windowDeiconified (WindowEvent e) { };
public void windowIconified (WindowEvent e) { };
public void windowActivated (WindowEvent e) { };
public void windowDeactivated (WindowEvent e) { };
public void windowOpened(WindowEvent e) { };
class SnailData{
private double distance;
private double speed;
private double time;
public SnailData(){
distance = 0;
speed = 0;
time = 0;
public double getDistance(){
return distance;
public double getSpeed(){
return speed;
public double getTime(){
return time;
public void setDistance(double d){
distance = d;
public void setSpeed(double s){
speed = s;
public void setTime(double t){
time = t;
}Pls and thanks again for helps....What i actually want to do is SnailTravel, but i facing some problems, which is the
- Constructor,setter, getter, and
- Exception Handling.
So i create another simple contructor files which name Employee and TestEmployeeClass, to try find out the problem but i failed, it come out error msg "cannot find symbol".
What i want to say that is if i cut below code (SnailTravel) to its own file(SnailData), SnailTravel come out error msg "cannot find symbol".So i force to put them in a same file(SnailTravel) to run properly.
I need help to separate them. (I think i miss some syntax but i dont know what)
And can somebody help me about Exception handling too pls.
class SnailData{
private double distance;
private double speed;
private double time;
public SnailData(){
distance = 0;
speed = 0;
time = 0;
public double getDistance(){
return distance;
public double getSpeed(){
return speed;
public double getTime(){
return time;
public void setDistance(double d){
distance = d;
public void setSpeed(double s){
speed = s;
public void setTime(double t){
time = t;
} -
How to place nulls has last rows.Find query for below problem
I have a table..MyTable(value number(10))
select * from Mytable;
value
12
null
13
null
11
null
This is the table i have and the records i have...... and i need output like this
value
12
13
11
null
null
null ..............>ike this i need output for this i use this query i.e
Query-->select value from mytable where value is not null
union all
select value from mytable where value is null
------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
MyTable2(value1 number(10),value2 number(10))
select * fromMyTable2
value1 value2
111 null
null 201
112 null
null 200
110 null
this is the table i have......... and i need output like below
value1 value2
111 201
112 200
110 null
null null
null null
NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for thatI'm not able to find any sense in your request but it can be done:
select value1, value2
from (select value1, rownum rn from
(select value1 from mytable where value1 is not null
union all
select value1 from mytable where value1 is null)
) a,
(select value2, rownum rn from
(select value2 from mytable where value2 is not null
union all
select value2 from mytable where value2 is null)
) b
where a.rn = b.rn;You should study some book about relational databases to understand frst of all what a record is, and then that records in a table are not ordered.
Max -
Please help me with the proper query for the below problem
Hi,
I have a table RATE which have two columns RT_DATE (date) and RATES(number).
This table have following data.
RT_DATE
RATES
1-JAN-2007
7
2-MAR-2008
7.25
5-JAN-2009
8
8-NOV-2009
8.5
9-JUN-2010
9
I wanted to get the rate of interest on 8-DEC-2009.
Output will be 8.5 as this given date is in between 8-NOV-2009 and 9-JUN-2010. Could you please help me with proper query?
Regards,
Aparna SHi,
That sounds like a job for the LAST function:
SELECT MIN (rates) KEEP (DENSE_RANK LAST ORDER BY rt_date) AS eff_rate
FROM rate
WHERE rt_date < 1 + DATE '2009-12-08'
MIN above means that, in case of a tie (that is, 2 or more rows with the exact same latest rt_date) the lowest rates from that latest rt_date will be returned. In rt_date is unique, then it doesn't matter if you use MIN or MAX, but syntax demands that you use some aggregate function there.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for your sample data, and also post the results you want from that data.
Point out where the statement above is getting the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002#9362002 -
Help required in writing a query
hi
Consider a table (ShogenValue) with following data:
Model_Id header_id Serial_no shogen_no si_val
4329 1 40001 A0001 1
4329 1 40001 B0001 2
4329 1 50300 B0001 3
4329 1 40001 C0001 4
4329 1 50300 C0001 5
4329 1 60001 C0001 6
Select
si_val
From
ShogenValue
Where
model_id = 4329
And
header_id = 1
And
serial_no = '60001'
Is it possible to write a modified version of above query which will bring the following result:
Model_Id header_id Serial_no shogen_no si_val
4329 1 40001 A0001 1
4329 1 50300 B0001 3
4329 1 60001 C0001 6
Meaning if a record exists for a particular shogen_no (Shogen_no C0001 has value corrosponding to '60001' in above query), pick it up, if it
does not exist (Shogen_no B0001 does not have value corrosponding to '60001' in above case) then pick a record with one level less serial number ('50300' in above case) and so on.
Thanx
Regards
Omer ImtiazThis should help, although it will probably not perform. Try it and see what the plan for it is.
SELECT
FROM
shogenvalue sv,
(SELECT
max(serial_no) serial_no_max,
shogen_no
FROM
shogenvalue
WHERE
model_id = 4329
AND header_id = 1
AND serial_no <= '60001'
GROUP BY
shogen_no
) svm
WHERE
sv.serial_no = svm.serial_no_max
AND sv.shogen_no = svm.shogen_no
;HTH,
Lennert -
Help me in writing this query plz....
There are two tables - Table1 (table1_id, value1) and Table2 (table2_id,
table1_id, value2). The field Table2.table1_id is a foreign key to
Table1.table1_id. It is necessary to write a SQL query that would find
all records in Table1 that do not have a corresponding record in Table2.
The query should not use sub-selectsuser554495 wrote:
Can you provide me the queryNo, we're not about to do your homework for you. How do you expect to learn anything if all the answers are served to you on a silver platter?
Try and work it out for yourself; if you get stuck, we'll try and help from that point, but you'd have to provide the sql queries you've tried (along with table information and sample input and expected output data).
Maybe you are looking for
-
Open playlist in new window?
In iTunes 11, how do I open a playlist in a new window? Every previous version included this option.
-
Can one instance have multiple redo threads ?
i was reading the Oracle Data guard 10g guide and it says Determine the appropriate number of standby redo log file groups. Minimally, the configuration should have one more standby redo log file group than the number of online redo log file groups o
-
CS5's save for web size preview is lying to me. Help!
So I just downloaded Photoshop CS5. For my work I need to save images through the Save for Web and I need to save it at a certain file size as a jpg. I change the percentage to get it just at right size (75K or 25K) and then hit save. Then when I loo
-
At the time of Process order creation Batch determination
Dear All, When i am creating process order at the time system not allowing me to execute batch determaination after release only it is allowing me to do. My requirement is At the time of order creation i want assign batches ( Execute Batch Detrminati
-
Hi, I wanted to know what are the limitations of manipulating the text accounts in Business Rules. I want to keep a text account with some text information that needs to be set from within a Business Rule. I am getting the following error when I try