Invalid Statement Error
Hi,
Can anyone look at my code and see why I am getting the Invaild Statement Error:
select GCC.SEGMENT1||'-'||GCC.SEGMENT2||'-'||GCC.SEGMENT3||'-'||GCC.SEGMENT4||'-'||GCC.SEGMENT5||'-'||GCC.SEGMENT6
Account, msi.segment1 item
ogb.gl_batch_id gl_batch_number
round(sum(nvl(mta.base_transaction_value,0)), 2) Net_activity,
round(sum(decode( nvl(mta.base_transaction_value,0) /
abs(decode(
nvl(mta.base_transaction_value,0),
0, 1, nvl( mta.base_transaction_value,0 ) )),
1, nvl(mta.base_transaction_value,0), 0 ) ), 2) sum_debits,
round(sum(decode( nvl(mta.base_transaction_value,0) /
abs(decode(nvl(mta.base_transaction_value,0),
0, 1, nvl( mta.base_transaction_value,0 ) )),
-1, nvl(abs(mta.base_transaction_value),0), 0 ) ), 2)
sum_credits from
mtl_material_transactions mmt,
mtl_system_items msi,
gl_code_combinations gcc,
mtl_transaction_accounts mta
org_gl_batches ogb
where
mta.transaction_id = mmt.transaction_id
and
mta.inventory_item_id = msi.inventory_item_id and mta.organization_id
= msi.organization_id
and mta.reference_account = gcc.code_combination_id
and mta.accounting_line_type <> 15
and mta.gl_batch_id = ogb.gl_batch_id (+) group by GCC.SEGMENT1||'\n'||GCC.SEGMENT2||'\n'||GCC.SEGMENT3||'\n'||GCC.SEGMENT4||'\n'||GCC.SEGMENT5||'\n'||GCC.SEGMENT6 , msi.segment1 having sum(nvl(mta.base_transaction_value,0)) != 0 order by 1 , 2
SELECT gcc.segment1
|| '-'
|| gcc.segment2
|| '-'
|| gcc.segment3
|| '-'
|| gcc.segment4
|| '-'
|| gcc.segment5
|| '-'
|| gcc.segment6 ACCOUNT,
msi.segment1 item, ogb.gl_batch_id gl_batch_number,
ROUND (SUM (NVL (mta.base_transaction_value, 0)), 2) net_activity,
ROUND
(SUM (DECODE ( NVL (mta.base_transaction_value, 0)
/ ABS (DECODE (NVL (mta.base_transaction_value, 0),
0, 1,
NVL (mta.base_transaction_value, 0)
1, NVL (mta.base_transaction_value, 0),
0
2
) sum_debits,
ROUND
(SUM (DECODE ( NVL (mta.base_transaction_value, 0)
/ ABS (DECODE (NVL (mta.base_transaction_value, 0),
0, 1,
NVL (mta.base_transaction_value, 0)
-1, NVL (ABS (mta.base_transaction_value), 0),
0
2
) sum_credits
FROM mtl_material_transactions mmt,
mtl_system_items msi,
gl_code_combinations gcc,
mtl_transaction_accounts mta,
org_gl_batches ogb
WHERE mta.transaction_id = mmt.transaction_id
AND mta.inventory_item_id = msi.inventory_item_id
AND mta.organization_id = msi.organization_id
AND mta.reference_account = gcc.code_combination_id
AND mta.accounting_line_type = 15
AND mta.gl_batch_id = ogb.gl_batch_id(+)
GROUP BY gcc.segment1
|| '\n'
|| gcc.segment2
|| '\n'
|| gcc.segment3
|| '\n'
|| gcc.segment4
|| '\n'
|| gcc.segment5
|| '\n'
|| gcc.segment6,
msi.segment1
HAVING SUM (NVL (mta.base_transaction_value, 0)) != 0
ORDER BY 1, 2;*009*
Similar Messages
-
Invalid state error when using concurrent sessions in Discoverer Viewer
We are oracle 10g DB for Oracle BI Discoverer Viewer application.
We have a problem when a user logs in with the same ID on two different sessions under one machine(1 mac address).
The error message is as per below.
====================================
"The Application encountered an invalid state.
No state was found matching the state identifier provided. This can happen if your session timed out. Please start the operation again.
Indez: 10, Size:0"
====================================
The index and size varies at different times.
We suspect that the problem's caused by a confusion between the StateIDs of the two sessions. This can be replicated by modifying the querying URL; by manually changing the value of the StataID parameter.
It will be good if somebody can help us on this...
Regards
Albin AbrahamAre you using the same browser for the two sessions? I have seen instances where the user opens, say, IE, connects to Disco, and runs a worksheet. They then open another IE window, start another session, and run a different worksheet. What I believe was happening (and I'm not sure because we told the users to stop doing this) was the second browser may have tried to "reuse" the java session started by the first browser. When you went back to the first browser, it no longer had a valid session because the second browser had taken it.
To have to independent sessions, I'll start one in IE, and another in Firefox, or Netscape. This keeps the sessions from getting mixed up.
Then again, I could be wrong... -
Invalid State Identifier Error
Hi All,
I have implemented breadcrumb by using "a href="javascript:history.back()". The naviagtion is upto 5 repots and hence the breadcrumb will have 5 links. The issue is sometimes i get "Invalid State identifier" error with some random number when i click on any link in the breadcrumb.
Unable to trace the root cause of this issue. Please provide your thoughts.
Regards,
SwatiThanks!!! Do you have any idea about Invalid state error? I have tried inserting the following as suggested by Oracle but doesnt help much.
<StatePool>
<MemoryExpireMinutes> 1440 </MemoryExpireMinutes>
<DiskCleanupIntervalMinutes> 1440 </DiskCleanupIntervalMinutes>
</StatePool>
Regards,
Swati -
Invalid statement when accessing JavaBean in CQL query
Hello everybody,
I'm trying to access a property of a nested JavaBean, but I always get an invalid statement error. It's telling me, that there could be a problem with the member access on the complex type.
This is what the query looks like:
Select myChannel.firstJavaBean from myChannel [now] where myChannel.firstJavaBean.anotherbean.property = "foo"
The channel has the event-type "MyEvent" which is also an JavaBean and it's registered in the event repository.
I already checked that all beans have getter and setter and that every bean is on the classpath of the cep application. I also tried to register the java type of "firstJavaBean" as an event-type. But it didn't work out.
What's the problem with this statement?
Thanks, Chrishi Chris,
We support nested property and object type, however, it is still invalid to use the whole object in the select clause.
You need change your statement like below:
Select myChannel.firstJavaBean.property as property, myChannel.firstJavaBean.property2 as property2 from myChannel [now] where myChannel.firstJavaBean.anotherbean.property = "foo"
The expressions in the select clause are expected to be the properties of the target event type.
Thanks
Junger -
Case When Statement and ORA:01722 Invalid number error
Hi folks, I have posted this under another heading as well under E-business suite so apologies if some you have already seen it but I would really appreciate some help on this one. Any suggestions are most welcome.
We are trying to put together a calculation that returns the number of days absent an individual has had in a given time period. We need to cater for those absences that started before the period and are closed during it, absence that start during the period and end after it, and those that open and close within it.
The period is always a rolling 6 months from sysdate.
This is the calc we have come up with so far which works for some people but we get the invalid number error if the absence includes a half day - so 0.5, 1.5,etc.
This is probably over complicated but we are not techie at all so are learning as we go!
We are using the HRMS - Administration - Oracle Human Resources (Core) business area in 10G and the Absence Attendance and Person folders.
SUM(TO_NUMBER(NVL(( CASE WHEN Absence Attendance.Actual Start Date < TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') THEN ( CASE WHEN Absence Attendance."Actual End Date" > SYSDATE THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) END ) END ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( Absence Attendance.Duration Days ) END ) END ) END ) END ) END ),( DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") )),'999999990D00'))Hi,
It could be that this is because you are using SYSDATE which contains the time as a fraction rather than TRUNC(SYSDATE) which just contains the current time. It could be that your working_dates_between raises this error.
However, your formula is far more complicated than it needs to be.
Firstly, you want to look at the date window ADD_MONTHS(TRUNC(SYSDATE), -6) to TRUNC(SYSDATE). Then you want to look at the portion of the absence that falls in the date window. This is GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6)) to LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE)). You may need to add 1 to the absence end date because this is the last day of their absence rather than the date they return. It depends how you calculate the days between the start and end
date of the absence. You can create calculations for the start and end date of the absences within the 6 months time window. Create calculation AbsenceStart as
GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6))
and AbsenceEnd as
LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE))
Then you need to only pick up absence that a part of the absence in your 6 month date window. You can use a condition in the workbook or a condition in a case statement to do this. You then need to calculate the difference between these dates and SUM all the values.
SUM(CASE WHEN AbsenceEnd >= AbsenceStart THEN WORKING_DAYS_BETWEEN(AbsenceStart, AbsenceEnd) END)
That's it. Not so complicated after all.
Rod West -
Case When Statement and ORA:1722 Invalid number error
Sorry I posted this in the wrong forum - I have the answer now
Cheers
HELP!!!
We are trying to put together a calculation that returns the number of days absent an individual has had in a given time period. We need to cater for those absences that started before the period and are closed during it, absence that start during the period and end after it, and those that open and close within it.
The period is always a rolling 6 months from sysdate.
This is the calc we have come up with so far which works for some people but we get the invalid number error if the absence includes a half day - so 0.5, 1.5,etc.
This is probably over complicated but we are not Techie at all so are learning as we go! We are using the HRMS - Administration - Oracle Human Resources (Core) business area in 10G and the Absence Attendance and Person folders.
SUM(TO_NUMBER(NVL(( CASE WHEN Absence Attendance.Actual Start Date < TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') THEN ( CASE WHEN Absence Attendance."Actual End Date" > SYSDATE THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) END ) END ) ELSE ( CASE WHEN ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) END ) END ) END ) IS NULL THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),SYSDATE) ) ELSE ( CASE WHEN TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY') >= Absence Attendance.Actual Start Date THEN ( WORKING_DAYS_BETWEEN(TO_DATE(ADD_MONTHS(SYSDATE,-6),'DD-Mon-YYYY'),Absence Attendance."Actual End Date") ) ELSE ( CASE WHEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") ) IS NULL THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( CASE WHEN SYSDATE <= Absence Attendance."Actual End Date" THEN ( WORKING_DAYS_BETWEEN(Absence Attendance.Actual Start Date,SYSDATE) ) ELSE ( Absence Attendance.Duration Days ) END ) END ) END ) END ) END ),( DAYS_BETWEEN(Absence Attendance.Actual Start Date,Absence Attendance."Actual End Date") )),'999999990D00'))
Edited by: CPearce on Sep 25, 2008 8:03 AMHi,
It could be that this is because you are using SYSDATE which contains the time as a fraction rather than TRUNC(SYSDATE) which just contains the current time. It could be that your working_dates_between raises this error.
However, your formula is far more complicated than it needs to be.
Firstly, you want to look at the date window ADD_MONTHS(TRUNC(SYSDATE), -6) to TRUNC(SYSDATE). Then you want to look at the portion of the absence that falls in the date window. This is GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6)) to LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE)). You may need to add 1 to the absence end date because this is the last day of their absence rather than the date they return. It depends how you calculate the days between the start and end
date of the absence. You can create calculations for the start and end date of the absences within the 6 months time window. Create calculation AbsenceStart as
GREATEST(Absence Attendance.Actual Start Date, ADD_MONTHS(TRUNC(SYSDATE), -6))
and AbsenceEnd as
LEAST(NVL(Absence Attendance."Actual End Date",TRUNC(SYSDATE)), TRUNC(SYSDATE))
Then you need to only pick up absence that a part of the absence in your 6 month date window. You can use a condition in the workbook or a condition in a case statement to do this. You then need to calculate the difference between these dates and SUM all the values.
SUM(CASE WHEN AbsenceEnd >= AbsenceStart THEN WORKING_DAYS_BETWEEN(AbsenceStart, AbsenceEnd) END)
That's it. Not so complicated after all.
Rod West -
I have a base template (which has never been sysprep'd) from which I create linked clones. After the linked clone comes up, I run the following command:
c:\windows\system32\sysprep\sysprep.exe /generalize /oobe /reboot /unattend:c:\windows\panther\unattend.xml
This works fine for the first few linked clones, but after about 3-4 linked clones are running, I start to hit "A fatal error occurred while trying to sysprep the machine."
****c:\windows\panther\setuperr.log****
2013-03-29 16:40:07, Error [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 32[gle=0x00000020]
2013-03-29 16:40:07, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]
****c:\windows\panther\unattend.xml****
<?xml version='1.0' encoding='utf-8'?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Enabled>true</Enabled>
<Username>Administrator</Username>
<Password>
<Value>ca$hc0w</Value>
<PlainText>true</PlainText>
</Password>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>ca$hc0w</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
<TimeZone>Pacific Standard Time</TimeZone>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ProductKey>7M67G-PC374-GR742-YH8V4-TCBY3</ProductKey>
<ComputerName>*</ComputerName>
</component>
</settings>
</unattend>
****c:\windows\panther\setupact.log****
2013-03-29 16:40:07, Info [0x0f004d] SYSPRP The time is now 2013-03-29 16:40:07
2013-03-29 16:40:07, Info [0x0f004e] SYSPRP Initialized SysPrep log at c:\windows\system32\sysprep\Panther
2013-03-29 16:40:07, Info [0x0f0054] SYSPRP ValidateUser:User has required privileges to sysprep machine
2013-03-29 16:40:07, Info [0x0f0056] SYSPRP ValidateVersion:OS version is okay
2013-03-29 16:40:07, Info [0x0f005e] SYSPRP ScreenSaver:Screen saver was already disabled, no need to disable it for sysprep
2013-03-29 16:40:07, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file c:\windows\system32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2013-03-29 16:40:07, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'
2013-03-29 16:40:07, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'
2013-03-29 16:40:07, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'REBOOT'
2013-03-29 16:40:07, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'
2013-03-29 16:40:07, Info [0x0f004a] SYSPRP WaitThread:Entering spawned waiting thread
2013-03-29 16:40:07, Info [sysprep.exe] UnattendFindAnswerFile: Looking at explicitly provided unattend file [c:\windows\panther\unattend.xml]...
2013-03-29 16:40:07, Info [sysprep.exe] UnattendFindAnswerFile: [c:\windows\panther\unattend.xml] meets criteria
for an explicitly provided unattend file.
2013-03-29 16:40:07, Info SYSPRP SysprepSearchForUnattend: Using unattend file at [c:\windows\panther\unattend.xml].
2013-03-29 16:40:07, Info SYSPRP SysprepSearchForUnattend: [generalize] pass in unattend file [c:\windows\panther\unattend.xml] either doesn't exist or passed
validation
2013-03-29 16:40:07, Info SYSPRP WinMain:Found unattend file at [c:\windows\panther\unattend.xml]; caching...
2013-03-29 16:40:07, Info SYSPRP WinMain:Processing unattend file's 'generalize' pass...
2013-03-29 16:40:07, Info SYSPRP Sysprep is running a generalize pass with the following unattend file: [%windir%\panther\unattend.xml]
2013-03-29 16:40:07, Info SYSPRP RunUnattendGeneralizePass: Sysprep unattend generalize pass exits; hr = 0x0, hrResult = 0x0, bRebootRequired = 0x0
2013-03-29 16:40:07, Info [0x0f003f] SYSPRP WinMain:Processing 'cleanup' request.
2013-03-29 16:40:07, Error [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 32[gle=0x00000020]
2013-03-29 16:40:07, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]
2013-03-29 16:48:52, Info [0x0f004c] SYSPRP WaitThread:Exiting spawned waiting thread
2013-03-29 16:48:52, Info [0x0f0059] SYSPRP ScreenSaver:Screen saver was originally disabled, leaving it disabled
2013-03-29 16:48:52, Info [0x0f0052] SYSPRP Shutting down SysPrep log
2013-03-29 16:48:52, Info [0x0f004d] SYSPRP The time is now 2013-03-29 16:48:52Hi,
This is typical of an OEM license issue.
To avoid this in the future you should look at site/volume licensing.
Anyway.
so, first check if you can re-arm by runing the
slmgr.vbs /dlv and check the re-arm counter, if it set to zero.. you need to do the following :
http://support.microsoft.com/kb/929828 (set the <SkipRearm>1</SkipRearm> like in the example, note: this option will make the product key window to appear in the setup process).
you can also try running : slmgr.vbs -rearm, to rearm Windows.
after that, let's come back to the sysprep process.. for syspreping already syspreped machine we have to change few keys in the registry :
HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\
CleanupState:2
HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\
GeneralizationState:7
After done with the registry, do the following :
Start -> Run : msdtc -uninstall (wait few seconds)
Start -> Run : msdtc -install (wait few seconds)
Restart the machine
Check the registry for the right registry keys values
sysprep with the new XML answerfile.
Source: Olegm
If you find my information useful, please rate it. :-) -
Please help: Case Statement - ORA-01722: invalid number Error
Hi All,
I'm trying to use Case statement to recode Cancelled statuses into two groups
'Reject' if the difference between first date and last date is less than 29 and
'Accept' if the difference between first date and last date is greater than 30
Here is my 'test' data:
STATUS FIRST_DATE LAST_DATE
Transfer 10/08/2011 10/09/2011
Mover 10/08/2011 15/09/2011
Cancel 10/08/2011 16/09/2011
Cancel 10/08/2011 5/09/2011
Here is the syntax
select a.*,
(CASE WHEN a.STATUS ='Cancel' THEN (round(a.LAST_DATE-a.FIRST_DATE))
ELSE 0
END) CAN_DAYS,
(CASE WHEN 'CAN_DAYS' >29 THEN 'Reject'
WHEN 'CAN_DAYS' <30 THEN 'Accept'
END) Reject_Accept
from test a
The first CASE statement works fine and gives me this
STATUS FIRST_DATE LAST_DATE CAN_DAYS
Transfer 10/08/2011 10/09/2011 0
Mover 10/08/2011 15/09/2011 0
Cancel 10/08/2011 16/09/2011 37
Cancel 10/08/2011 5/09/2011 26
but the second CASE produces ORA-01722: invalid number Error. It is something to do with the CAN_DAYS data type, Oracle doesn't see it as Numeric i think.
The result i want to see would be
STATUS FIRST_DATE LAST_DATE CAN_DAYS Reject_Accept
Transfer 10/08/2011 10/09/2011 0
Mover 10/08/2011 15/09/2011 0
Cancel 10/08/2011 16/09/2011 37 Accept
Cancel 10/08/2011 5/09/2011 26 Reject
Could someone please help me to fix the syntax?
Thank you in advance,This seems to give you your desired results...
with test as
( select 'Transfer' as status, to_date('10/08/2011') as first_date, to_date('10/09/2011') as last_date from dual union all
select 'Mover' , to_date('10/08/2011') , to_date('15/09/2011') from dual union all
select 'Cancel' , to_date('10/08/2011') , to_date('16/09/2011') from dual union all
select 'Cancel' , to_date('10/08/2011') , to_date('05/09/2011') from dual
select status
, first_date
, last_date
, CAN_DAYS
, CASE
WHEN CAN_DAYS = 0 THEN NULL
WHEN CAN_DAYS < 30 THEN 'Reject'
WHEN CAN_DAYS >= 30 THEN 'Accept'
END Reject_Accept
from ( select status
, first_date
, last_date
, CASE
WHEN STATUS ='Cancel' THEN round(LAST_DATE-FIRST_DATE)
ELSE 0
END CAN_DAYS
from test
; -
I am getting "ORA-00900: invalid SQL statement" error.?
I did installed oracle 11gR2. and used "DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','USER1','USER2')" to see the result like below, but I am getting "ORA-00900: invalid SQL statement" error. Any idea?
I am using:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> desc user1.tbl_a
Name Null? Type
FIELD_A1 NOT NULL NUMBER
FIELD_A2 VARCHAR2(20)
FIELD_A4 NOT NULL NUMBER(5,2)
FIELD_A5 VARCHAR2(10)
FIELD_A6 NOT NULL NUMBER(2)
SQL> desc user2.tbl_a
Name Null? Type
FIELD_A1 NOT NULL NUMBER
FIELD_A2 VARCHAR2(50)
FIELD_A3 DATE
FIELD_A4 NUMBER(5,2)
FIELD_A5 NOT NULL VARCHAR2(10)
SQL> select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual
expected result:
DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','U1','U2')
ALTER TABLE "U1"."TBL_A" ADD ("FIELD_A3" DATE)
ALTER TABLE "U1"."TBL_A" DROP ("FIELD_A6")
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A2" VARCHAR2(50))
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NUMBER(5,2) DEFAULT 0)
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NULL)
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A5" NOT NULL ENABLE)Thanks for reply rp,
I got result using "select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual" -
ORA-00900: invalid SQL statement Error while Executing Procedure
Hi:
I am trying to execute following procedure through java code, but i am getting ORA-00900: invalid SQL statement error.
Procedure is :
<code>
(vResult out int)
as
vCardId varchar2(16);
vForacid varchar2(16);
vApp_Entry_No varchar2(10);
vSrNo number(6);
vCardStatus char(1);
vCardStat char(2);
vExpiryDate date;
Cursor cardCur1 is
select u.card_number,trim(u.ACCOUNT_NUMBER),u.CARD_STATUS,to_char(u.EXPIRY_DATE,'dd-MM-yyyy')
FROM DailyCardData u
where default_indicator='1'
and isprocessed = 'N'
order by expiry_date;
begin
vSrNo := 0;
vResult := 0;
open cardCur1;
Loop
fetch cardCur1 into vCardId,vForacid,vCardStat,vExpiryDate;
if cardCur1%NOTFOUND then
exit;
end if;
if (vCardStat != null) then
vCardStatus := 'H';
elsif (vExpiryDate <= sysdate) then
vCardStatus := 'E';
else
vCardStatus := null;
end if;
select a.app_entry_no into vApp_Entry_No from Application a,ApplicationLinkedAccounts l
where l.foracid = vForacid and l.AcSrNo = '1'
and a.app_entry_no = l.app_entry_no
and a.cardid is null
and a.DOWNLOADFILECREATIONFLAG = 'Y';
update Application set CardId = vCardId,
Card_Status = vCardStatus,APPLICATIONPROCESSEDFLAG = 'Y',
APPLICATIONPROCESSEDdate = DOWNLOADFILECREATIONdate
where App_Entry_No = vApp_Entry_No;
commit;
update DailyCardData set isprocessed = 'Y',app_entry_no = vApp_Entry_No
where card_number = vCardId;
commit;
end Loop;
close cardCur1;
vResult := 1;
end;
</code>
Can any body help me in that?
Thank You,
AnupFirst of all I don't see a procedure header.
Secondly I see you commit inside your procedure. This is a bug.
Thirdly I see you also commit inside a loop. This is also a bug, and needs to be removed asap.
The error indicates a statement doesn't parse. As you don't post the error stack, nor a table definition no one can reproduce the problem.
You need to isolate the statements, one by one, and run them through sql*plus to see what happens.
Sybrand Bakker
Senior Oracle DBA -
Invalid state in SQL query for a function that was created with no errors.
SQL> CREATE OR REPLACE FUNCTION overlap(in_start1 IN TIMESTAMP, in_end1 IN TIMESTAMP, in_start2 IN TIMESTAMP, in_end2 IN TIMESTAMP) RETURN NUMBER
2 IS
3
4 BEGIN
5 IF (in_start1 BETWEEN in_start2 AND in_end2 OR in_end1 BETWEEN in_start2 AND in_end2 OR in_start2 BETWEEN in_start1 AND in_end1) THEN
6 RETURN 0;
7 ELSE
8 RETURN 1;
9 END IF;
10 END;
11 /
Function created.
SQL> show errors;
No errors.
SQL>
SQL> SELECT * FROM tbl where overlaps(current_time,current_time+1,current_time-1,current_time+2) = 0;
SELECT * FROM tbl where overlaps(current_time,current_time+1,current_time-1,current_time+2) = 0
ERROR at line 1:
ORA-06575: Package or function OVERLAPS is in an invalid state
I do not understand why overlaps is returned as in invalid state in the query, when it was created with no errors earlier. Could anyone help me?Marius
Looking at the logic you are trying to create it looks like you are looking for overlapping time periods.
Consider two date/time ranges:
Range 1 : T1 - T2
Range 2 : T3 - T4
Do they overlap?
1) No: T1 < T4 (TRUE) T2 > T3 (FALSE)
T1 --- T2
T3 --- T4
2) Yes: T1 < T4 (TRUE) T2 > T3 (TRUE)
T1 ---------- T2
T3 --- T4
3) Yes: T1 < T4 (TRUE) T2 > T3 (TRUE)
T1 -------------------- T2
T3 --- T4
4) Yes: T1 < T4 (TRUE) T2 > T3 (TRUE)
T1 ----- T2
T3 --- T4
5) Yes: T1 < T4 (TRUE) T2 > T3 (TRUE)
T1 --- T2
T3 ------------ T4
5) No: T1 < T4 (FALSE) T2 > T3 (TRUE)
T1 --- T2
T3 --- T4Answer: Yes they overlap if:
T1 < T4 AND T2 > T3
So you can code the logic in your SQL as simply:
SELECT *
FROM tbl
WHERE range1_start < range2_end
AND range_1_end > range2_startIf you go around implementing PL/SQL functions for simple logic that can be achieved in SQL alone then you cause context switching between the SQL and PL/SQL engines which degrades performance. Wherever possible stick to just SQL and only use PL/SQL if absolutely necessary. -
Invalid cursor state error while executing the prepared statement
hai friends,
following code showing the invalid cursor state error while executing the second prepared statement.
pls anyone help me
String query = "select * from order_particulars where order_no=" + orderno + " order by sno"; psmt1 = conEntry.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); rs1 = psmt1.executeQuery(); rs1.last(); intRowCount = rs1.getRow(); particularsdata = new Object[intRowCount][6]; rs1.beforeFirst(); if (intRowCount >= 1) { for (int i = 0; rs1.next(); i++) { particularsdata[0] = i + 1;
particularsdata[i][1] = rs1.getString(3);
particularsdata[i][2] = Double.parseDouble(rs1.getString(4));
rs1.close();
psmt1.close();
query = "SELECT sum(delqty) FROM billdetails,billparticulars WHERE order_no= " + orderno + " and " +
"billdetails.bill_no = billparticulars.bill_no GROUP BY particulars ORDER BY sno";
psmt1 = conEntry.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
rs1 = psmt1.executeQuery(); //error showing while executing this lineAlso .. Why using arrays instead of collections? Shifting the cursor all the way forth and back to get the count is fairly terrible.
With regard to the problem: either there's a nasty bug in the JDBC driver used, or you actually aren't running the compiled class version of the posted code. -
Invalid Number Error in Merge Statement
Hi all.
I got an invalid number error in the following merge statement, but I don't know why. Maybe you can give me a hint.
MERGE INTO wam_table
USING (SELECT * FROM wam_table) b
ON (b.username = 'user'
AND b.mod = 'module'
AND b.trimester = '1')
WHEN MATCHED THEN
UPDATE SET as = '1', ad = '1', co = '1', pr = '1', date = localtimestamp, lus = 'username'
WHEN NOT MATCHED THEN
INSERT VALUES ('user','module','1','1','1','1','1', localtimestamp, 'username');
The invalid number error appears in the first line, but I don't know why?
StephanUPDATE SET as = '1', ad = '1', co = '1', pr = '1', date = localtimestamp, lus = 'username'SELECT * FROM sys.v_$reserved_words;
SQL> create table test1(as varchar2(10));
create table test1(as varchar2(10))
ERROR at line 1:
ORA-00904: : invalid identifier
SQL> create table test1(sno number, date date);
create table test1(sno number, date date)
ERROR at line 1:
ORA-00904: : invalid identifier
SQL> create table test1("as" varchar2(10));
Table created.
SQL>
SQL> create table test2(sno number, "date" date);
Table created.
SQL> desc test1
Name Null? Type
as VARCHAR2(10)
SQL> desc test2
Name Null? Type
SNO NUMBER
date DATE
SQL> -
Simple CQL query error - Invalid statement: select one from inputChannel
Hi,
I am new to oracle cep, I wrote a simple query....
"select * from inputChannel RETAIN 5 EVENTS" but some how it shows the error as .
Invalid statement: "select one from >>inputChannel RETAIN<< 5 EVENTS"
Cause: generic syntax error
Action: The syntax expects '[', as, match_recognize, xmltable, end-of-file, ')', ',', where, group,
having, order, left, right, partition, on, primary token
Any help is greatly appreciated.
Thanks,
S.VishalOracle CEP CQL Reference : http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e12048/toc.htm
Also you can check the other documents about Oracle CEP at : http://download.oracle.com/docs/cd/E14571_01/nav/portal_booklist.htm . -
How to find invalid statements(not syntax error) executed using v$ views
Hi
I want find invalid statements(not syntax error statements) that executed, when some of the applications runs in the server,
for eg: permissions denied, table/view doesn't exit .. etc
I could not able to find it in v$sql views. is there any other view that gives this information?V$ views only contain parsed statements, not incorrect ones.
Max
Maybe you are looking for
-
Goods Recipt without Purchase Order
Hi Experts, Can any one Explain me the Process of Goods recipt without Purchase order. 1) What document type i need to select ? 2) Does i need to process MIRO for these ? 3) If it is a Usual material which i previously procuring throgh purchase order
-
Updated McAfee anti-virus, Computer turned off and now it won't boot past windows
I have a HP Pavilion P6000 Series Model #P6520f AMD Athlon II 633 Quad-Core 6GB DDR3 1 Terabyte HD Genuine Windows 7 Home Premium 64-bit I was installing updates for McAfee anti-virus, and suddenly the power went out. After a few hours the power came
-
Monday all of our OS X Lion Macs can access SMB file shares on our file server and we come in Tuesday morning and now they take at least 1 minute to pull up the file share and sometimes longer. Windows PC's are immediate when connecting to the same
-
How to find contents of Backuppiece ?
Dear Experts, Where I can find the contents of a backuppiece. Thanks in advance.
-
Segment E1EDP36 not active in the DELFOR02 IDOC type.
Hi All, I have been working with creating extensions for Idoc type DELFOR02 inn ECC 6.0. But for the basic idoc type DELFOR02 , the segment E1EDP36 is not active here.i.e., the idoc generated does not carry data for this particular segement. This se