Subqueries not allowed inside Cursors?
I get the following error when attempting to use a subquery nested within a Cursor.
ORA-03001: unimplemented feature ORA-01733: virtual column not allowed here
Here's an example of my query:
select test1, cursor(select test2
from table2
where test2 in(select test3 from table3))
as subtests
from table1
Is this just not possible?
-Ian
null
This works for me in 8.1.5 or 8.1.6:
select deptno, cursor( select dname
from dept
where dname in (
select dname from dept)) as foo
from dept
Similar Messages
-
Hello,
I am trying to run the below querry in my proc but get an error that "Subqueries currently (8.1.7) not allowed outside SQL" Below is the querry.
IF v_TransCode = 'A'
AND v_DocNum In(Select Document_Number from T_PIOS_MASTER where T_PIOS_MASTER.Document_number = v_DocNum) THEN
RAISE_APPLICATION_ERROR(-20100,'Error Add PIOS Master Already Exist');
END IF;You cannot specify SELECT ..... as a condition for IF statement. Try something like:
IF v_TransCode = 'A' THEN
SELECT count(*)
INTO n
FROM T_PIOS_MASTER
WHERE T_PIOS_MASTER.Document_number = v_DocNum;
IF n > 0 THEN
RAISE_APPLICATION_ERROR(-20100,'Error Add PIOS Master Already Exist');
END IF;
END IF; -
NiUSRP Configure Signal.vi not allowed inside loops?
It seems that niUSRP Configure Signal.vi is not allowed in loops. After stopping the VI I get this message:
niUSRP Configure Signal.vi<ERR>This attribute cannot be modified while the driver is in the Running state.
Is there a way to change the carrier frequency while the driver is running? Using the niUSRP Property Node.vi to set a new frequency within a loop is also not working. My goal is to create frequency hopping with the USRP.
Solved!
Go to Solution.
Attachments:
Simple Transmitter_inside loop.vi 20 KB
Simple Transmitter_outside loop.vi 19 KBHi YYY,
Thanks for including your VI in the post. I was able to download it and replicate what you are seeing. There are a few things that need to be changed in order to get this working.
First, you do not need to have the niUSRP Configure Signal.vi function inside of your while loop. You can put this outside the loop and use a property node to change the frequency with a property node. You have the property node in your code already, you just need to change it to write instead of read. There is an example that will do exactly this if you just want to use that instead of modifying your code too. It is called niUSRP EX Tx Continuous Async Reconfig on the Fly.vi.
Next, the reason that you are not able to go at the 1MS/s IQ rate with the code you have is because you are trying to read and write the frequency during every loop iteration. Due to the time to query the hardware, set the frequency, and read the frequency back, the max IQ rate I was able to get was around 500kS/s. This is due to a combination of hardware and driver limitations. Even with the example listed above that uses the property node instead of the configuration function, if I put in an indicator to look at the carrier frequency I cannot use a faster IQ rate.
Try changing to the property node and removing this indicator, you should have a lot more success. Let me know if that doesn't work for you or if you have any other questions, I'd be happy to help.
Sarah Y
SDR Product Manager
National Instruments | Ettus Research -
Waveform Chart NOT allowed inside array of clusters; Dynamic plot stacking?
The NI Developer Zone has a VI that does something I want - dynamically
stack plots in a useful way. Unfortunately, I would like those plots
to actually be Waveform Charts and NOT Waveform Graphs (as the
documentation specifies but LIES!)
A little further experimentation shows you that it is seemingly not
possible to make an array of clusters that contain Waveform Charts!
Why?
Alternatively, are there any other ways to smartly show many signals at
once? I have found multiplots to be frustrating as it is difficult to
assign the number of plots once you start the VI (hence the existence
of Dynamic Stack Plots).
DynamicStackPlots here:
http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B123AE0CB938111EE034080020E74861If you have LabVIEW 8.0, have a look at the new "Mixed Signal Graph"
(see e.g.: http://zone.ni.com/devzone/conceptd.nsf/webmain/C6B79FA61959D9D68625706E006F7462 )
LabVIEW Champion . Do more with less code and in less time . -
I have read some of the other posts for people that got this error, but none seem to apply to me.
My program has been working for weeks. I made some minor changes, and started getting the error (full details below).
I did a TFS "undo pending changes" and still getting the same error, even after logging off. The one odd thing is that I did change my Windows password this week. The connection string is using a SQL user id and password that has no issues.
I'm an Admin own my own box (running WIn XP SP3). I even tried "Run as Admin" on Visual Studio.
I'm doing a Debug-Start, running a Console-Test-Program that calls a WCF service, which on local machine is hosted by "ASP.NET Development Server".
We have two other developers, one has the same problem, one does not. In theory, we have all done "get latest" and are running the same code.
The SQL Connection is related to a trace database; we are using this library http://ukadcdiagnostics.codeplex.com which has worked fine for months.
When I do "Start Run" in Visual Studio, I get this error:
{"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. "}
with InnerException: {"The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception."}
and it has InnerException: {"Requested registry access is not allowed. "}
Outmost StackTrace:
at System.Data.SqlClient.SqlConnection..ctor()
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at FRB.Diagnostics.Listeners.SqlDataAccessCommand..ctor(String connectionString, String commandText, CommandType commandType)
at FRB.Diagnostics.Listeners.SqlDataAccessAdapter.CreateCommand()
at FRB.Diagnostics.Listeners.SqlTraceListener.TraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
at FRB.Diagnostics.Listeners.CustomTraceListener.FilterTraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
at FRB.Diagnostics.Listeners.CustomTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
at System.Diagnostics.TraceSource.TraceInformation(String message)
at FRB.EC.AdminService.AdminService.TestHelloWorldWithTrace(String name)
at SyncInvokeTestHelloWorldWithTrace(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
Second Inner StackTrace:
at System.Data.SqlClient.SqlConnection..cctor()
Third Inner StackTrace:
at System.Data.SqlClient.SqlConnectionFactory..cctor()
When I do "Run as Admin", I get this error:
{"Could not load file or assembly 'FRB.EFDataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. "}
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at FRB.EC.AdminService.ConsoleTester.svcRef.IAdminService.GetDispositionStatusTypeList()
at FRB.EC.AdminService.ConsoleTester.svcRef.AdminServiceClient.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\Service References\svcRef\Reference.cs:line 2459
at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 565
at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.ExecuteNewRelease103QueryMethods() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 189
at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.Main(String[] args) in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 76
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I am also posting the web.config/app.config, but I would rather not focus on that since there were absolutely no changes to it between the time it was working and the time it began failing.
Client app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
</connectionStrings>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceAuthorization impersonateCallerForAllOperations="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="FRB.AllowImpersonate">
<clientCredentials>
<windows allowedImpersonationLevel="Impersonation"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IAdminService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="5565536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:3588/AdminService.svc" binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IAdminService" contract="svcRef.IAdminService"
name="WSHttpBinding_IAdminService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
web.config of WCF service:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="FRB.Diagnostics" type="FRB.Diagnostics.Configuration.UkadcDiagnosticsSection, FRB.Diagnostics"/>
</configSections>
<appSettings>
<!-- whatever goes here -->
</appSettings>
<!-- connection string section -->
<connectionStrings>
<add name="log" connectionString="Data Source=myserver;Initial Catalog=ECWCFLOG_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
<add name="DBConn" connectionString="Data Source=myserver;Initial Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
<add name="EagleConnectEntities" connectionString="metadata=res://*/EagleConnect.csdl|res://*/EagleConnect.ssdl|res://*/EagleConnect.msl;provider=System.Data.SqlClient;provider connection string="Data Source=myserver;Initial
Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient"/>
</connectionStrings>
<!-- FRB.Diagnostics logging section -->
<FRB.Diagnostics>
<sqlTraceListeners>
<sqlTraceListener name="sqlTraceListenerSettings"
connectionStringName="log"
commandText="INSERT INTO LogStore VALUES(@Source, @ActivityId, @ProcessId, @ThreadId, @EventType, @Message, @Timestamp)"
commandType="Text">
<parameters>
<parameter name="@Source" propertyToken="{Source}"/>
<parameter name="@ActivityId" propertyToken="{ActivityId}"/>
<parameter name="@ProcessId" propertyToken="{ProcessId}"/>
<parameter name="@ThreadId" propertyToken="{ThreadId}"/>
<parameter name="@EventType" propertyToken="{EventType}" callToString="true"/>
<parameter name="@Message" propertyToken="{Message}"/>
<parameter name="@Timestamp" propertyToken="{DateTime}"/>
<!-- <parameter name="@UserId" propertyToken="{WindowsIdentity}"/> -->
</parameters>
</sqlTraceListener>
</sqlTraceListeners>
<smtpTraceListeners>
<smtpTraceListener name="smtpTraceListenerSettings"
host="vssmtp"
port="25"
from="[email protected]"
to="[email protected]"
subject="AdminService Logging Event: {EventType}, {MachineName}"
body="{Message}
=======
Process={ProcessId},
Thread={ThreadId},
ActivityId={ActivityId}"/>
</smtpTraceListeners>
</FRB.Diagnostics>
<!-- System.Diagnostics logging section -->
<system.diagnostics>
<sources>
<source name="FRB.EC.AdminService" switchValue="All">
<listeners>
<clear/>
<add name="ods"/>
<add name="smtp"/>
<add name="sql"/>
</listeners>
</source>
<source name="System.ServiceModel" switchValue="Off" propagateActivity="true">
<listeners>
<add name="ignored" type="System.Diagnostics.ConsoleTraceListener"/>
</listeners>
</source>
</sources>
<sharedListeners>
<!-- OutputDebugStringTraceListener -->
<add name="ods"
type="FRB.Diagnostics.Listeners.OutputDebugStringTraceListener, FRB.Diagnostics"
initializeData="{ActivityId}|{EventType}: {Message} - {DateTime}, Process={ProcessId}, Thread={ThreadId}"/>
<!-- SqlTraceListener -->
<add name="sql"
type="FRB.Diagnostics.Listeners.SqlTraceListener, FRB.Diagnostics"
initializeData="sqlTraceListenerSettings"
traceOutputOptions="Timestamp"/>
<!-- SmtpTraceListener -->
<add name="smtp"
type="FRB.Diagnostics.Listeners.SmtpTraceListener, FRB.Diagnostics"
initializeData="smtpTraceListenerSettings">
<filter type="System.Diagnostics.EventTypeFilter"
initializeData="Error"/>
</add>
</sharedListeners>
<trace autoflush="true"/>
</system.diagnostics>
<system.web>
<compilation debug="true" targetFramework="4.0">
</compilation>
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
</system.web>
<system.serviceModel>
<services>
<service name="FRB.EC.AdminService.AdminService"
behaviorConfiguration="FRB.EC.AdminService.AdminServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding"
bindingConfiguration="wsHttpEndpointBinding"
contract="FRB.EC.AdminService.IAdminService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs.
If removed, WCF will infer an appropriate identity automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndpointBinding"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="500000000">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647"/>
<security>
<message clientCredentialType="Windows"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="FRB.EC.AdminService.AdminServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and
remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true.
Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceCredentials>
</serviceCredentials>
<!--<serviceAuthorization principalPermissionMode="UseAspNetRoles"
roleProviderName="AspNetWindowsTokenRoleProvider"/>-->
<serviceAuthorization principalPermissionMode="UseWindowsGroups"
impersonateCallerForAllOperations="true"/>
</behavior>
<behavior name="FRB.EC.AdminService.IAdminServiceTransportBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and
remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true.
Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="PeerTrust"/>
<!--<authentication certificateValidationMode="Custom" customCertificateValidatorType="DataFactionServices.FRBX509CertificateValidator"/>-->
</clientCertificate>
<serviceCertificate findValue="WCfServer"
storeLocation="LocalMachine"
storeName="My" x509FindType="FindBySubjectName"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Thanks for any help.
NealI think I found it... this is sure a strange error for what is really happening.
Apparently it had happened to me before, and fortuantely, I actually added the following comment:
// Above is related to the WCFLOG SQL Diagnostics Trace
// If you get error here an inner exception "requested registry access is not allowed"
// inside exception "type initializer for System.Data.SqlClient.SqlConnection"
// then make sure you have impersonation enabled in your client.
// See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
Now I think I will do a try catch and spit out the same text.
Still testing to assure that this really was the issue.
<endpointBehaviors>
<behavior name="FRB.AllowImpersonate ">
<clientCredentials>
<windows allowedImpersonationLevel="Impersonation"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
The line below in BOLD below is what somehow seemed to disappear from my app.config - probably due to a TFS human error - still checking that also:
<client>
<endpoint address="http://localhost:4998/AdminService.svc"
behaviorConfiguration="FRB.AllowImpersonate"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IAdminService"
contract="svcRef.IAdminService"
name="WSHttpBinding_IAdminService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
Here's how I "idiot-proofed" this error for now, to give an error that actually at least points to a solution:
public SqlDataAccessCommand(string connectionString, string commandText, CommandType commandType)
try
_connection = new SqlConnection(connectionString);
// Above is related to the WCFLOG SQL Diagnostics Trace
// If you get error here an inner exception "requested registry access is not allowed"
// inside exception "type initializer for System.Data.SqlClient.SqlConnection"
// then make sure you have impersonation enabled in your client.
// See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
catch (Exception ex)
if (ex.ToString().Contains("The type initializer for"))
throw new System.ApplicationException(@"
Your client app <endpoint> must be cofigured have a
'behaviorConfiguration' attribute like this:
behaviorConfiguration='FRB.AllowImpersonate'
that points back to a behavior that has this syntax:
<behavior name='FRB.AllowImpersonate'>
<clientCredentials>
<windows allowedImpersonationLevel='Impersonation'/>
</clientCredentials>
</behavior>
", ex);
else
throw ex;
_command = _connection.CreateCommand();
_command.CommandText = commandText;
_command.CommandType = commandType;
// TODO _command.CommandTimeout = ;
Neal -
how to allow some fixed extension go in from outside to inside but not allow go from inside to outside
for example, allow JPEG, MOV, AVI data flow from outside to inside
but not allow JPEG, MOV, AVI files access or upload or get by outside, in another words not from inside to outside
how to configure?Hi,
The ZBF link sent earlier show how we can inspect URI in http request
parameter-map type regex uri_regex_cm
pattern “.*cmd.exe”
class-map type inspect http uri_check_cm
match request uri regex uri_regex_cm
ZBf is the feature on Cisco routers and ASA though concepts are little same but works differently. However it is important that you can be more granular with the protocol (layer 7) inspection only. Like on ASA if you will try to restrict .exe file from a p2p application that won't be possible, But on router you have some application for p2p in NBAR and you can use it file filtering. Please check configuartion example for both devices.
Thanks -
I am having a problem accessing Hotmail email messages via Fireflox server. When I am in the Inbox, reviewing messages, it either freezes up or a "1 item" small icon window follows cursor and does not allow me to enter messages or do anything. Have to log off and start over. Suggestions>?
Can you detect any pattern to it, whether related to messages with attachments, or particular advertising on the page, etc.?
When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
1. Clear Firefox's Cache
orange Firefox button ''or'' Tools menu > Options > Advanced
On the Network mini-tab > Offline Storage : "Clear Now"
2. If needed, delete the site's cookies here
While viewing a page on the site, right-click and choose View Page Info > Security > "View Cookies"
(Usually the dialog will refer to live.com rather than hotmail.com, that's normal.)
Then try reloading the page and logging in again. Does that help? -
My typing cursor frequently goes crazy, not allowing me to type and jumping from place to place, deleting letters. Suddenly, a line I have typed will be highlighted and deleted at will. Also, mouse cursor moves at will, opening multiple pages in seconds. Help! What could be causing this, and how can I stop it?
I've had my Macbook pro for over a year and it has never done this before. Restarting the computer fixes the problem temporarily.My first thought was the hard drive and OS has a built in Sudden Motion Sensor whcih will stop the hard drive heads from crashing into the platters when the computer is moved suddenly. This does work most of the time and could cause some of the tings you are seeing.
But then after reading more of your first post it seems your system and drive is doing some very strange things.
It would be best to first take it into an Apple Genius Bar and have it looked at. They can run tests on it and since it is still in the original 1 year warranty this should not cost you anything even if something needs to be replaced.
You can also run the Apple Hardware Test on it your self by connecting it to the Net by Ethernet cable and booting holding down the d key or the Command+d keys. That will boot the computer from the Apple internet servers and load the AHT.
Good Luck. -
ORA-22902 CURSOR expression not allowed Error Cause: CURSOR on a subquery..
Hi,
I found same issue in a metalink thread which is addressed in Oracle 12.1 which doesn't help me now. I need to rewrite the below query. Does anyone have any suggestions how to go about it?
thanks,
April
working in Oracle 11.2.0.3.1, windows server, doing an upgrade from 10g to 11g. Piece of code is failing with following error via TOAD
Oracle Database Error Code ORA-22902 Description :
CURSOR expression not allowed
Error Cause:
CURSOR on a subquery is allowed only in the top-level SELECT list of a query.
The below code is returning a tree of data for projects, units within the buildings.
Code as follows:
SELECT LEVEL
, p.project_id
|| NVL (p.file_ref, ' ')
|| '] ['
|| NVL (p.project_ref, ' ')
|| '] '
|| p.project_name
|| ' ( '
|| (SELECT COUNT (*)
FROM PROJECT p1
WHERE p1.parent_project_id = p.project_id)
|| ' sub-projects, '
|| (SELECT COUNT (*)
FROM PROJECT_ELEMENT pe2
WHERE pe2.project_id = p.project_id)
|| ' elements)' AS project_description
CURSOR
(SELECT pe.element_id
|| pe.element_ref
|| '] '
|| pe.element_name
|| ' ('
|| pe.unit_count
|| ')' AS element_description
CURSOR
(SELECT hu.hu_id
|| hu.hu_ref
|| '] '
|| CASE
WHEN hu.bedroom_count IS NOT NULL
THEN ', Bedrooms: ' || hu.bedroom_count
ELSE NULL
END
|| CASE
WHEN hu.bedspace_count IS NOT NULL
THEN ', Bedspaces: ' || hu.bedspace_count
ELSE NULL
END AS hu_descripton
FROM HOUSING_UNIT hu
WHERE hu.element_id = pe.element_id
ORDER BY hu.hu_ref
) AS housing_units
FROM PROJECT_ELEMENT pe
WHERE pe.project_id = p.project_id
ORDER BY pe.element_ref, pe.element_name
) elements
FROM PROJECT p
START WITH p.project_id = l_root_project_id
CONNECT BY PRIOR p.project_id = p.parent_project_id -- connect by used with LEVEL keyword
ORDER SIBLINGS BY p.file_ref DESC
, p.project_ref DESC
, p.project_name DESC;
Edited by: AprilM on Jul 17, 2012 10:28 AMInteresting. I am getting even worse results on 11.2.0.1.0:
SQL> select * from v$version
2 /
BANNER
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> select dname,cursor(select ename from emp e where e.deptno = d.deptno) from dept d
2 /
select dname,cursor(select ename from emp e where e.deptno = d.deptno) from dept d
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00905: missing keyword
SQL> connect scott
Enter password: *****
Connected.
SQL> select * from v$version
2 /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL> select dname,cursor(select ename from emp e where e.deptno = d.deptno) from dept d
2 /
DNAME CURSOR(SELECTENAMEFR
ACCOUNTING CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
ENAME
CLARK
KING
MILLER
RESEARCH CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
ENAME
SMITH
JONES
SCOTT
ADAMS
FORD
SALES CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
ENAME
ALLEN
WARD
MARTIN
BLAKE
TURNER
JAMES
6 rows selected.
OPERATIONS CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
no rows selected
SQL> And double CURSOR also works fine in 10g:
SQL> select cursor(select dname,cursor(select ename from emp e where e.deptno = d.deptno) from dept d) from dual
2 /
CURSOR(SELECTDNAME,C
CURSOR STATEMENT : 1
CURSOR STATEMENT : 1
DNAME CURSOR(SELECTENAMEFR
ACCOUNTING CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
ENAME
CLARK
KING
MILLER
RESEARCH CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
ENAME
SMITH
JONES
SCOTT
ADAMS
FORD
SALES CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
ENAME
ALLEN
WARD
MARTIN
BLAKE
TURNER
JAMES
6 rows selected.
OPERATIONS CURSOR STATEMENT : 2
CURSOR STATEMENT : 2
no rows selectedSY.
Edited by: Solomon Yakobson on Jul 17, 2012 1:27 PM -
Reason for not allowing static declarations inside an inner class
Is the reason for not allowing static declarations inside an inner class is due to the fact that it can never be accessed at a class level as the outer class has to create an instance of the inner class and any attributes/methods of the inner class has to be accessed through that.
Typically, an instance (non-static) variable can never be accessed in a statement or expression inside a static context but the class variable can be accessed inside a non-static context. Given this, shouldnt the static declarations be allowed inside an inner class?
Correct me if my understanding is wrong.
ThanksI still couldnt get it clearly. Why i cant i have a static value ( variable ) for all the instances of the inner class irrespective of its enclosing instances of it ( i.e outer class instances). Say in this example below,
class Outer
static int i = 0;
public Inner inner = new Inner();
class Inner // inner class ( non-static nested class )
int j = 0;
static final int k = 2; // compile time constants are allowed
// ininner class
public void m1()
j++;
System.out.println("j is " + j);
i++
System.out.println("i is " + i);
public static void main(String[] arg)
Outer outer1 = new Outer();
outer1.inner.m1(); // j will be 1 & i will be 1
Outer outer2 = new Outer();
outer2.inner.m1() // j will be 1 again & i will be 2. But I would
// want j to be 2. Why is this not allowed?
Looks like something missing.. -
After Yosemite Track pad moves the cursor but will NOT allow Click
Track pad moves the cursor but will NOT allow click after a period of usage. After Forced reboot track pad works fine for a few hours. This started within hours of installing Yosemite. Help, I am afraid I will lose a document during reboot. So far I have been lucky and have not lost data.
MacBook Pro (17-inch, Early 2011) SSDCould be many things, we should start with this...
If 10.7.0 or later...
Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.
Any change on reboot? -
microsoft office word/powerpoint is not responding, the cursor just keeps on going round and round, i cannot exit it.
What is your iPhoto version?
For Photo Stream you will need at least iPhoto 9.2.1 for compatability with iCloud. Are you still running iPhoto 8?
Regards
Léonie -
JFrame which does not allow resizing (maximizing, minimizng)
I want to develop a login frame which does not allow resizing (maximizing, minimizing as this does not make sense) and with 2 fields, JTextField and JPasswordField.
The frame is developed but has the usual resizing handles.
How to do?
Many tks for any information.
John PashleyDon't use a JFrame. Also, don't expect code like this again; I did it for fun.
It requires your modification.
* Title: Login Screen<p>
* Description: Login Screen<p>
* Class: Login ScreenLoginScreen<p>
* Copyright: who cares<p>
* Company: who cares<p>
* @author who cares
* @version who cares
import java.awt.*;
import java.awt.event.*;
import java.net.URL;
import java.util.Vector;
import java.io.File;
import javax.swing.*;
public class LoginScreen extends JDialog implements ActionListener, FocusListener
private JTextField name;
private JPasswordField password;
private JButton loginButton;
private JButton cancelButton;
private JDialog thisDialog = this;
private ImageIcon splashImage;
private String appTitle;
private int logCounter;
public LoginScreen()
super();
this.toFront();
setTitle("Login");
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
getContentPane().setLayout(new BorderLayout());
splashImage = new ImageIcon( getClass().getResource("images" + File.separator + "image.jpg")) );
getContentPane().add(new JLabel(splashImage), "North");
getContentPane().add(makeLoginPanel(), "Center");
getContentPane().add(makeButtonPanel(), "South");
pack();
setResizable(false);
setLocationRelativeTo(null);
setVisible(true);
* make login panel
private JPanel makeLoginPanel()
JPanel loginPanel = new JPanel();
JLabel label;
loginPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 0, 20));
GridBagLayout gbl = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
loginPanel.setLayout(gbl);
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0, 5, 10, 5);
gbc.gridx = 0;
gbc.gridy = 0;
label = new JLabel("Login Name:", SwingConstants.LEFT);
gbl.setConstraints(label, gbc);
loginPanel.add(label);
gbc.gridx = 1;
name = new JTextField("insider", 10);
name.addFocusListener(this);
gbl.setConstraints(name, gbc);
loginPanel.add(name);
gbc.gridx = 0;
gbc.gridy = 1;
label = new JLabel("Password:", SwingConstants.LEFT);
gbl.setConstraints(label, gbc);
loginPanel.add(label);
gbc.gridx = 1;
password = new JPasswordField("insider",10);
password.addFocusListener(this);
gbl.setConstraints(password, gbc);
loginPanel.add(password);
return loginPanel;
* make button panel
private JPanel makeButtonPanel()
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
//make LogIn button
loginButton = new JButton("Login");
loginButton.setActionCommand("Login");
buttonPanel.add(loginButton);
rootPane.setDefaultButton(loginButton);
loginButton.addActionListener(this);
this.getRootPane().setDefaultButton(loginButton);
//make Cancel button
cancelButton = new JButton("Cancel");
cancelButton.setActionCommand("Cancel");
buttonPanel.add(cancelButton);
cancelButton.addActionListener(this);
this.addKeyListener(new KeyAdapter()
public void keyReleased(KeyEvent e)
if(e.getKeyCode() == KeyEvent.VK_ESCAPE)
cancelButton.doClick();
return buttonPanel;
* Action handler for login and cancel buttons
public void actionPerformed(ActionEvent e)
JButton btn = (JButton) e.getSource();
if (btn.getActionCommand().equals("Login"))
// Because login() process happens before swing process (above),
// force it to happen "later"
SwingUtilities.invokeLater(new Runnable()
public void run()
login(); //create this method, okay?!
else if (btn.getActionCommand().equals("Cancel"))
System.exit(0);
* Focus gained handler for username and password buttons
public void focusGained(FocusEvent e)
JTextField tf = (JTextField) e.getSource();
tf.selectAll();
* Focus lost handler for username and password buttons
public void focusLost(FocusEvent e) {}
private void showErrorMessage(String message, String header)
JOptionPane.showMessageDialog(getContentPane(),
message, header,
JOptionPane.ERROR_MESSAGE);
* This method controls the cursor for login window. If isWait is set to
* true, dialog's cursor is set to Cursor.WAIT_CURSOR. If isWait is set
* to false, the cursor is set ta Deafult.
* While the window is in WAIT mode, this method will also disable Login
* and Cancel buttons to ensure the user does not accidently request
* a cancel while loging in or launching a second login.
private void setWaitCursor(boolean isWait)
/* In order to disable login and cancel buttons while logging in to the
application, this method will temporarely change action commands and
reset them when login process failed to give user another chance.
Note: Disabling the buttons by calling setEnabled(false) did not work
since login() method is called from an action event handler and the
process will not be released to AWT until login method is complete.
if (isWait)
this.getGlassPane().setCursor(new Cursor(Cursor.WAIT_CURSOR));
this.getGlassPane().setVisible(true);
loginButton.setActionCommand("none");
cancelButton.setActionCommand("none");
else
this.getGlassPane().setCursor(Cursor.getDefaultCursor());
this.getGlassPane().setVisible(false);
loginButton.setActionCommand("Login");
cancelButton.setActionCommand("Cancel");
} //end loginscreen -
Aggregation of analytic functions not allowed
Hi all, I have a calculated field called Calculation1 with the following calculation:
AVG(Resolution_time) KEEP(DENSE_RANK FIRST ORDER BY RANK ) OVER(PARTITION BY "User's Groups COMPL".Group Name,"Tickets Report #7 COMPL".Resource Name )
The result of this calculation is correct, but is repeated for all the rows I have in the dataset.
Group Name Resourse name Calculation1
SH Group Mr. A 10
SH Group Mr. A 10
SH Group Mr. A 10
SH Group Mr. A 10
SH Group Mr. A 10
5112 rowsI tried to create another calculation in order to have only ONE value for the couple "Group Name, Resource Name) as AVG(Calculation1) but I have the error: Aggregation of analytic functions not allowed
I saw also inside the "Edit worksheet" panel that the Calculation1 *is not represented* with the "Sigma" symbol I(as for example a simple AVG(field_1)) and inside the SQL code I don't have GROUP BY Group Name, Resource Name......
I'd like to see ONLY one row as:
Group Name Resourse name Calculation1
SH Group Mr. A 10....that it means I grouped by Group Name, Resource Name
Anyone knows how can I achieve this result or any workarounds ??
Thanks in advance
AlexHi Rod unfortunately I can't use the AVG(Resolution_time) because my dataset is quite strange...I explain to you better.
Ι start from this situation:
!http://www.freeimagehosting.net/uploads/6c7bba26bd.jpg!
There are 3 calculated fields:
RANK is the first calculated field:
ROW_NUMBER() OVER(PARTITION BY "User's Groups COMPL".Group Name,"Tickets Report Assigned To & Created By COMPL".Resource Name,"Tickets Report Assigned To & Created By COMPL".Incident Id ORDER BY "Tickets Report Assigned To & Created By COMPL".Select Flag )
RT Calc is the 2nd calculation:
CASE WHEN RANK = 1 THEN Resolution_time END
and Calculation2 is the 3rd calculation:
AVG(Resolution_time) KEEP(DENSE_RANK FIRST ORDER BY RANK ) OVER(PARTITION BY "User's Groups COMPL".Group Name,"Tickets Report Assigned To & Created By COMPL".Resource Name )
As you can see, from the initial dataset, I have duplicated incident id and a simple AVG(Resolution Time) counts also all the duplication.
I used the rank (based on the field "flag) to take, for each ticket, ONLY a "resolution time" value (in my case I need the resolution time when the rank =1)
So, with the Calculation2 I calculated for each couple Group Name, Resource Name the right AVG(Resolution time), but how yuo can see....this result is duplicated for each incident_id....
What I need instead is to see *once* for each couple 'Group Name, Resource Name' the AVG(Resolution time).
In other words I need to calculate the AVG(Resolution time) considering only the values written inside the RT Calc fields (where they are NOT NULL, and so, the total of the tickets it's not 14, but 9).
I tried to aggregate again using AVG(Calculation2)...but I had the error "Aggregation of analytic functions not allowed"...
Do you know a way to fix this problem ?
Thanks
Alex -
Dreamweaver does not allow me to edit the editable region
Oh my, I'm so desperate in this, I have a .dwt and have set up the editable region as well. When I want to make a new html file from the said template dreamweaver does not allow me to edit it. I mean, all the code is completely grayed out as if the template itself is locked by default.
What I want to do is to create several new pages such as new albums, charts, genres, contacts (which all based on the home template) The home template itself has slider in its body. For the new html files I'm about to create (which I'm so desperate why I can't do so) I want the header and footer to remain the same.
Here is an image of my index.dwt (my homepage) anything inside the red frame is what I want to edit for new albums, charts, genres, contacts, login page, etc. The top part is the header and the bottom one is the footer (Excuse the right image, I'm working on dual screen)
Any help will be appreciated!
Sorry for my englishHello SeptianNugraha,
here some hints concerning while handling templates (I quote):
The main principle of DW Templates is:
Non-editable regions = propagate to all child pages. The content of non-edtable regions is identical on all child pages. When you edit a non-editable region, DW propagates all changes to all child pages.
Editable regions = do not propagate because they're unique to every child page. The whole idea of editable regions is that they contain page specific content which does not appear on any other child page.
And:
PART 1
1. Create a prototype page with all the sitewide elements (common header, footer, sidebar, etc..) that you will need for your entire project. This requires some careful pre-planning even for small web sites.
2. Validate your code & test this prototype page in all major browsers. 3. When you're completely satisfied with your layout, SaveAs Template. DW will save this as a .dwt file in a site folder called Templates.
4. DW will ask you to add Editable Regions for stuff that will change from page to page. Do this and SAVE.
5. Close your Template.dwt file.
PART 2
1. File > New Page > from Template. Select the template you wish to use. Hit OK.
2. This is a child page. You can only edit content within editable regions. Everything else is locked.
3. SaveAs index.html (your home page) to the root in your local site folder.
PART 3
Repeat PART 2 for each additional page required.
PART 4
1. Open your main TEMPLATE file and add a navigation menu with links to your site pages.2. SAVE.3. DW will ask if you want to populate changes to child pages. Hit yes.
4. Publish all site pages to your server.
PART 5
If you should ever need to edit your TEMPLATE .dwt file, Repeat PART 4.
Good luck!
Hans-Günter
Maybe you are looking for
-
Restoring Stickies from Time Machine -
Any advice would be greatly appreciated - My old Macbook Pro 17" running Leopard faulted last week and I bought a new Macbook Pro 15" running Snow Leopard. I backed up my old Macbook Pro using Time Machine, and have found "StickiesDatabase" as sugges
-
my business has created an order, saved it. Now i want to see it in VA02 it gives error message "not possible to carry out conversion" if i double click it, it says," the alternative unit of measure you have entered cannot be converted to the
-
Setting previleges to a non-root user account to access ports
Hello , I am tring to do an icmp-ping to a machine in the network from an application by connecting to icmp port through a raw socket. My question is i am able to connect to icmp port using raw socket only in root user account. But my application sho
-
As stated above, I used to have Google as my search engine now it is Norton Safe Search. How can I get Google back?
-
Can't burn CDs in Lion 10.7.2
Message says Canceling burn. This is after it collects the titles in the playlist. I tested this and have discovered that if the playlist spans more than 1 CD, iTunes will cancel the burn without even trying to determine how much to write to the CD.