Tyring to dynamically create SQL statment for an SQL Calendar

Is there a way to dynamically create an SQL statement that an SQL Calendar would use. I don't see an option to create a PL/SQL Calendar.
For example I want to pass a table name, and the corresponding date column to items on the calendar page, and then have the SQL Calendar use those to fields to display the number of records loaded into the specified table. I've written the following but it doesn't work:
'SELECT count(*), ' || :P8_SOURCE_DATE || ' FROM ' || :P8_SOURCE_TABLE || ' GROUP BY ' || :P8_SOURCE_DATE;
Does anyone know if there is a why to create a PL/SQL Calendar?

Jason,
it is possible, though not so simple as with a report.
What you need to do is to create a pipelined function, that returns your date and count data. This pipelined function can be the base of a pseudo-table, which can be used in a select. For the pipelined function you need to define types for one row and a table to define the return-type for your function:
create or replace type calendar_row as object (date_time date, description varchar2(250));
create type calendar_table as table of calendar_row;
Then you can create the package with the function:
================================================
create or replace package dyn_calendar is
procedure set_query(i_query in varchar2);
function view_source return calendar_table pipelined;
end;
create or replace package body dyn_calendar is
v_query varchar2(100) := null;
procedure set_query(i_query in varchar2) is
begin
v_query := i_query;
end;
function view_source return calendar_table pipelined is
TYPE cursor IS REF CURSOR;
c_cal cursor;
v_date_time date := null;
v_description varchar2(100) := null;
r_cal calendar_row;
begin
open c_cal for v_query;
fetch c_cal into v_date_time, v_description;
loop
exit when c_cal%notfound;
r_cal := calendar_row(v_date_time, v_description);
pipe row(r_cal);
fetch c_cal into v_date_time, v_description;
end loop;
return;
end;
end;
================================================
Now you can set query in a PL/SL region before the calendar:
dyn_calendar.set_query(SELECT count(*), ' || :P8_SOURCE_DATE || ' FROM ' || :P8_SOURCE_TABLE || ' GROUP BY ' || :P8_SOURCE_DATE);
and you can base your calendar on the query:
select * from table(dyn_calendar(view_source))
Good luck,
Dik

Similar Messages

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

  • Update SQL script for lower SQL version

    Hi, I am copying same records 9 times and this query is working fine in SQL-2008 or newer version but getting the following error in Lower SQL version. How I can run this script for lower SQL version.
    drop table #temp
    create table #temp (Code1 varchar(10))
    insert into #temp values ('ABC')
    ;With Numbers As
    (Select 1 As Number
    Union All 
    Select Number + 1
    From Numbers
    Where Number < 9)
    Select t.* 
    From #temp t
    Cross Join Numbers;
    Error: Line 2: Incorrect syntax near ';'.

    Why are you using CTE in SQl server 2000. They were introduced from 2005. of course you need to confirm version of SQL Server
    Plus use code like below
    If object_ID('tempdb..#Temp') IS NOT NULL
    drop table #temp
    create table #temp (Code1 varchar(10))
    insert into #temp values ('ABC')
    ;With Numbers As
    (Select 1 As Number
    Union All
    Select Number + 1
    From Numbers
    Where Number < 9)
    Select t.*
    From #temp t
    Cross Join Numbers;
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Cant create connection Pool for MS SQL Server 2000 with Microsoft Driver

    i am using bea weblogic server 6.1, i cant create connection pool while using MS
    SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft website. when
    i give the following class name for JDBC driver and the connection url and click
    apply while selecting the available server, a number of exception appears in default
    server (that is the connection pool cannot be created..... cannot load the driver
    class).
    URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
    Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
    when i use the above setting in a JDBC simple application in Jbuilder
    7.0 the application runs successfully and fetches the data deom MS SQL database
    but in at Bea connection Pool is not created with these settings. i do give appropriate
    username and password in properties field in connection pool. Thankx for any help!

    khabbab wrote:
    That was the original code part from "startweblogic" :
    :runWebLogic
    echo on
    set PATH=.\bin;%PATH%
    set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;
    echo off
    and i changed it to :
    :runWebLogic
    echo on
    set PATH=.\bin;%PATH%
    set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;D:\Program Files\Microsoft
    SQL Server 2000 Driver for JDBC\lib\msbase.jar;D:\Program Files\Microsoft SQL
    Server 2000 Driver for JDBC\lib\msutil.jar;D:\Program Files\Microsoft SQL Server
    2000 Driver for JDBC\lib\mssqlserver.jar;I suggest moving or copying the three ms driver jars to a directory that has no blanks
    in it so the classpath doesn't have blanks in it. Ie:
    go to the "D:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib"
    directory and do this:
    mkdir D:\microsoft_jdbc_driver
    cp *.jar D:\microsoft_jdbc_driver
    Then make the classpath include D:\microsoft_jdbc_driver\msbase.jar etc.
    Joe
    >
    >
    echo off
    when i save and run the bat file, server appears then disappears.
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    The class path which is echoed at server startup does not include thepaths to
    driver jar files. when i edited the "startweblogic.bat" file and includedthe
    driver class paths to jar files, now the server doesnot even run. tellme what
    to do now???Show me what change you made to the startweblogic file.
    Joe
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    kindly tell me how can i check that the class paths for driver jarfiles are included
    in that string? thanks. also tell me can not i use the jdriver forsql server
    2000?.The startup script will echo what it's doing, including printing out
    the classpath
    it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
    for
    basic JDBC, but the MS drivfer is preferable in some ways.
    Joe
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    i am using bea weblogic server 6.1, i cant create connection
    pool
    while
    using MS
    SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
    website.
    when
    i give the following class name for JDBC driver and the connectionurl and click
    apply while selecting the available server, a number of exception
    appears
    in default
    server (that is the connection pool cannot be created..... cannot
    load
    the driver
    class).The server startup script creates a string that will become the
    classpath
    for the server.
    This string is part of the java call to start the server with a-classpath
    argument. You need to
    make sure the MS driver jars are part of that classpath string.
    Joe
    URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
    Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
    when i use the above setting in a JDBC simple applicationin Jbuilder
    7.0 the application runs successfully and fetches the data deom
    MS
    SQL database
    but in at Bea connection Pool is not created with these settings.
    i
    do give appropriate
    username and password in properties field in connection pool.
    Thankx
    for any help!
    khabbab wrote:
    The class path which is echoed at server startup does not include thepaths to
    driver jar files. when i edited the "startweblogic.bat" file and includedthe
    driver class paths to jar files, now the server doesnot even run. tellme what
    to do now???
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    kindly tell me how can i check that the class paths for driver jarfiles are included
    in that string? thanks. also tell me can not i use the jdriver forsql server
    2000?.The startup script will echo what it's doing, including printing out
    the classpath
    it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
    for
    basic JDBC, but the MS drivfer is preferable in some ways.
    Joe
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    i am using bea weblogic server 6.1, i cant create connection
    pool
    while
    using MS
    SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
    website.
    when
    i give the following class name for JDBC driver and the connectionurl and click
    apply while selecting the available server, a number of exception
    appears
    in default
    server (that is the connection pool cannot be created..... cannot
    load
    the driver
    class).The server startup script creates a string that will become the
    classpath
    for the server.
    This string is part of the java call to start the server with a-classpath
    argument. You need to
    make sure the MS driver jars are part of that classpath string.
    Joe
    URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
    Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
    when i use the above setting in a JDBC simple applicationin Jbuilder
    7.0 the application runs successfully and fetches the data deom
    MS
    SQL database
    but in at Bea connection Pool is not created with these settings.
    i
    do give appropriate
    username and password in properties field in connection pool.
    Thankx
    for any help!

  • Creating Allwayon SQL cluster for MS SQL Resource proidver.

    Hi All,
    i have set up SQL Alwayson 2014 Enterprise and also a File server cluster in order on connect both to the WAP.
    i was able to create the SQK WAP on the admin portal group with the file server cluster. but when i am trying to connect the MS SQL resource i am setting the following error on the wap admin portal:
    "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify
    that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
    i look into the SQL logs - i seems like the user(SQL user to connect from the WAP to SQL) able to perform authentication with the SQL.
    Next - i look in WAPADMINAPI event viewer --> MGMTSVC-SQLServer--> operational --> 
    and i was getting the following error :(event ID 160) 
    Unexpected exception for operation '', version '', client request Id '', server request Id '', exception 'System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
    server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception
    (0x80004005): The network path was not found
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer
    timeout)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
    SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.WindowsAzure.Server.Common.SqlProcExecutor.<ExecuteNonQueryAsync>d__d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.WindowsAzure.Management.ResourceProvider.SqlServer.Controllers.HostingServersController.<CreateSysAdminLogin>d__7d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.WindowsAzure.Management.ResourceProvider.SqlServer.Controllers.HostingServersController.<CreateHostingServerAsyncInternal>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.WindowsAzure.Management.ResourceProvider.SqlServer.Controllers.HostingServersController.<CreateHostingServer>d__15.MoveNext()
    ClientConnectionId:00000000-0000-0000-0000-000000000000'.
    what can i do in order to fix it?
    TNX
    Eran.

    WAP and SQL do not have to be in the same domain, This is an issue regarding NETBIOS name resolving.
    Your WAP and SQL probably in a different subnet, so a different broadcast domain.
    When you add your SQL Availablity Group in WAP if first makes a connection over TCP/IP.
    When it reads the members of the AG, it tries to resolve the hostnames over NETBIOS/Named Pipes.
    This fails because there servers are not in the same broadcast domain.
    I'm communication with someone from the WAP team to get this fixed, although I'm not sure this is something that needs to be fixed in WAP.
    Workaround:
    Put your SQL Server node names in the hostfile of your WAP Admin servers.
    - Darryl

  • Dynamically create data type for structure

    Hello Experts.
    how to create dynamic data type for structres. for example.
    data lv_struc_name type strukname.
    lv_struc_name = get_struct_name( )  ****** this method gives the structure name('ct_struc')
    now I want to create one data type, which is having the type of lv_struc_name content.(ct_struct)
    thanks
    Tim

    Hi,
    here is the link to really good presentation about generic programming ABAP351.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae
    It contains examples how to create dynamic structure and tables.
    Cheers

  • Error Creating Connection Pool for Microsoft SQL Server

    I am trying to create a connection pool that connects to a MS SQl Server but it keeps giving me an error
    Unable to create : com.microsoft.sqlserver.jdbc.SQLServerDriver
    Missing class: com.microsoft.sqlserver.jdbc.SQLServerDriver Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils Loader: oc4j:10.1.3 Code-Source: /D:/jdevstudiobase1013/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\jdevstudiobase1013\j2ee\home\oc4j.jar This load was initiated at system.root:0.0.0 using the Class.forName() method. The missing class is not available from any code-source or loader in the system.
    I have added the Microsoft Jar to the D:/jdevstudiobase1013/j2ee/home/lib/ and also to D:/jdevstudiobase1013/j2ee/home/. Please any suggestion would be welcome

    I am trying to create a connection pool that connects to a MS SQl Server but it keeps giving me an error
    Unable to create : com.microsoft.sqlserver.jdbc.SQLServerDriver
    Missing class: com.microsoft.sqlserver.jdbc.SQLServerDriver Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils Loader: oc4j:10.1.3 Code-Source: /D:/jdevstudiobase1013/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\jdevstudiobase1013\j2ee\home\oc4j.jar This load was initiated at system.root:0.0.0 using the Class.forName() method. The missing class is not available from any code-source or loader in the system.
    I have added the Microsoft Jar to the D:/jdevstudiobase1013/j2ee/home/lib/ and also to D:/jdevstudiobase1013/j2ee/home/. Please any suggestion would be welcome

  • Open SQL statment for Update flag based on Date

    Dear all,
    I am trying to write an Open SQL statement to update a flag in a table. Table Ztable1 with fields Sr.No, Flag, Datefrom, DateTo. i would like to update Flag entry in the table only if today falls in between Datefrom & Dateto. I can satisfy the above requirement using the following ABAP code.
    DATA: lv_timestamp TYPE timestamp,
          lv_today LIKE adr2-valid_from,
          tz TYPE timezone.
    CONVERT DATE sy-datlo TIME sy-timlo INTO TIME STAMP lv_timestamp
      TIME ZONE tz.
    lv_today = lv_timestamp.
    update ztable1 set flag = 'X' where lv_today BETWEEN datefrom and dateto.
    But the issue is that, DateFrom & DateTo contains space aswell Dates. Datefrom can be space if it is start of Time (01010001) and also DateTo can be space if it is End of time (31129999). Which means that if DateFrom is space, then it should treated as 01010001, simlarly DateTo is space, then it should be 31129999. How can i write the if else cases within where clauses.
    I know Decode statement in Native sql programming, but that won't fit for Opensql in ABAP. Also, because of huge entries in database, i cannot read entries, manupulate & then update.
    How can i enhance the same above Update statement to cater this need.
    Please advise.
    Thanks a lot in advance.
    Greetings, Satish

    Hi,
    first fetch records in to internal table.
    ranges: r_range for sy-datum.
    loop at itab into wa.
    if wa-validfrom is initial.
    wa-validfrom =  (here u pass valid from date).
    elseif wa-validto is initial
    wa-validto = 99991231.
    endif.
    r_range-low = wa-validfrom
    r_range-high = wa-validto
    *check here current date is falling in interval. if its fall between ranges update flas in work area and *modify you internal table
    if sy-datum in r_range.
    wa-flag = 'x'.
    modify itab from wa.
    endif.
    refresh r_range.
    clear wa-flag.
    endloop.
    *--Finally update your ztable
    modify ztable from table itab.
    Regards,
    Peranandam

  • JDBC Driver Class  error While Creating New Dataset for MS  SQL 2008?

    Hi Experts ,
        I am getting an error in
    please Help Me ...
    Regards,
    Mayank Shah

    Hi Henry,
    I tried this one i have download and unzip the file in Program file then then place the Jar file path in environment variable class path but it is still giving me an error ...
    plz guide me .
    Regards,
    Mayank Shah

  • Pointers needed to create a JSP for week/hour calendar type component

    Hi,
    I am looking to get some pointers on how to create week/hour calendar type component in JSP.
    My application is JSP/struts2 based web application. I need to create a web page where users will see a week hour calendar and for any time slot will enter some information. Each time slot can have different information. For example: Sunday 9:30am to 10:00am - Click on this cell and pop up a dialog for info and save it without refreshing the page. At the end combine all this info for each slot and submit to the server.
    If there is already a component like this is available to use, please point me to that.
    Any ideas are welcome.
    Thanks,
    Developer in need.

    I dont know of an already existing application that can do this. However, here are some ideas on creating your own:
    Create an html table in JSP who's number of rows and columns match what you would find in an ordinary wall calendar for the given month and year. Use the Calander.java class to obtain the number of days in the current month and build the JSP page accordingly (Calendar.java should automatically take care of leap year). You will probably need to add 'next' and 'previous' buttons to the form to retrieve the previous and next month(s) in case the user wants to access previous or future months. Each cell in the table displays that day (example ' 28 '). Notice my convention the first column is usually 'Sunday'.
    Next, determine what to put in each cell. One suggestion is to embed a table in each cell with 48 rows (24 hours in a day, 1/2 hour resolution= =48), and two columns (first column is for time: example: "10:30am to 11:00am", the second column is for the user's appointment message).
    Above that embedded table is the day (example: '28'). If a user has no information in the embedded table, the outer cell will appear to have nothing but the '28' in it.
    Next, how to populate the cell. When the user clicks on the cell, have an onclick event call a javascript function. The function will pop up a new window (a child window) by calling 'window.open( )' (google 'window.open'). In the pop up, show a table with 48 rows, 2 columns that the user can type in a message within column 2. When the user clicks 'submit' button on the pop up, call a javascript onclick function that reads all the message cells. Any cell not empty will populate the corresponding cell (day, rowID, columnID) back on the parent window by calling something like this: window.opener.document.myFormName.myTextField.value = someValue
    (google 'window.opener'). Once this is done, close the child window from that javascript function. By calling 'window.opener', you dont have to refresh the parent window.
    Next, if the user clicks on the parent window cell that is already populated, you will have to pass all theexisting information for that day through the window.open( ) to the child window so the pop up child window will show that preexisting information (that way he can add to the cell or alter it as he pleases).
    Next, after he alters many days on the calender, you have to provide an 'update' button on the parent form so the user saves his changes (write the data to a database record, with his name attached to that record). Note: if he clicks the previous/next button, he will lose any changes unless you also save the information before going to the previous/next page.
    Next, you might want to provide a vertical scroll bar on the table cell if
    the end user has many messages that cant be viewed in the parent cell all at once. Note each cell should be a fixed number of pixels width/height so it shows correctly. Have Fun!

  • SQL - PL/SQL question for you SQL degenerates.

    I wish to create a view from a tableZ as follows. I have a table with 4 columns. I want to group col1,col2 and col3 based upon the value of col4. The value of col4 is based on a algorithm that needs to search for the lowest number in that particular grouping. So, from the example I am listing the value of col4 in the first block (A,A,A) is 1 since the smallest number in that block of 4 rows is a 1. Second block value would be=4 (A,A,B) since there are all 4's in the last column. Third Block (AAC) would be = 2 since we have 2,2,3,3. Fourth block (AAD) would be = 3 since we have 3,3,3,4 and the Fifth block (AAE) would be a 1 since we have 1,1,1,1. Remember the value is equal to the lowest integer of the four. The integer 1 is the lowest value in any list so if you loop and search the list and find a value of 1 you can exit at that point and automatically assign a one. So the Summary view would look like this based upon the sample values in the tableZ contents.
    A A A 1
    A A B 4
    A A C 2
    A A D 3
    A A E 1
    Table Z Contents of
    col1,col2,col3,col4
    ========================
    A A A 1
    A A A 1
    A A A 2
    A A A 3
    A A B 4
    A A B 4
    A A B 4
    A A B 4
    A A C 2
    A A C 2
    A A C 3
    A A C 3
    A A D 3
    A A D 3
    A A D 3
    A A D 4
    A A E 1
    A A E 1
    A A E 1
    A A E 1
    Thanks in advance,
    Anon

    I am using a fairly common slang use of the word in Information Technology offices throughout the United States[Humpty Dumpty language|http://www.wordspy.com/words/HumptyDumptylanguage.asp]
    n. An idiosyncratic or eccentric use of language in which the meaning of particular words is determined by the speaker.
    As in
    "There's glory for you!"
    "I don't know what you mean by 'glory,' " Alice said.
    Humpty Dumpty smiled contemptuously. "Of course you don't—till I tell you. I meant 'there's a nice knock-down argument for you!' "
    "But 'glory' doesn't mean 'a nice knock-down argument,' " Alice objected.
    "When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean—neither more nor less."
    Lewis Carroll, Alice through the Looking Glass
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • How to throw or catch sql exception for executeReader sql adapter

    Wcf sql adapter was created and executeReader was used.
    When an invalid sql statement was constructed and send it to wcf sql adapter, it will hanging there, and no response. No exception was catched even though send chape  was inside a catch block. How can I catch this kind of exception
    or throw this exception ? I need to give client an exception resposne.
    thanks
    Gary

    I used scope with exception handle which has Exception object type: "System.SystemException".
    I guess this type "System.SystemException" can catch any exception, including sql exception. Maybe I am wrong. I got error from window event:
    A message sent to adapter "WCF-Custom" on send port "WcfSendPort_SqlAdapterBinding_DalCore_Custom" with URI "mssql://shig-quad-2k3e1//DataSourceOne?" is suspended.
     Error details: System.Data.SqlClient.SqlException: Incorrect syntax near '='.
    Server stack trace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    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 System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)
     MessageId:  {B24EF5B8-298A-4D4F-AA98-5E639361A7DB}
     InstanceID: {F8924129-265B-4652-B20E-8D25F8F20A51}
    If  "System.SystemException" can't catch all exception, which type can catch all exception ? I want to catch all exception in this catch block.
    thanks
    Gary

  • SQL Permissions for the SQL Managment Pack

    Hi,
    Were implementing version 6.5.1.0 of the SQL 2005 2008 2012 Managment pack.  Its going ok, but there is a line...
    Add “SQLDefaultAction” to the dbmodule_users database role.
    that makes no sense.  I can't see dbmodule_users as a database role.  Am i being thick?
    Chris
    Chris Gibson

    Hi Chris,
    Did you follow the SQL management pack guide downloaded here:
    http://www.microsoft.com/en-us/download/details.aspx?id=10631
    To configure runas account for SQL monitor, you may check the article below:
    http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Creating Web services using JDeveloper for Pl/SQL package having ref cursor

    Hi,
    I am trying to create web services for PL/SQL package in JDeveloper. When I am trying to create this web service, the functions in the package which is returning referential cursor or record cursor are not visible. When I highlight the function and click "Why Not?", it displays the message "The following types used by the program unit do not have an XML schema mapping and/or serializer Specified: REF CURSOR". Could you please let me know, how I can create this web service?
    I am getting similar error when I am trying to create web service for a package with overloaded functions also.
    Thanks,

    Ok so I played around with this some more. I created the same process in bpel using oracle bpel designer and here are the results.
    1. Against 10g database running a synch process data is retutned without error.
    2. Against 9i database running an asynch process data is retutned without error.
    3. Against 9i database running a synch process data is retutned with error.
    I'm definilty missing something.

  • Adding AJAX support for dynamically created panelGrid components

    Hi everyone!
    I would like to ask help from anyone who may have encountered similar problem before...
    I have a panelGrid whose component is dynamically created by the backing bean. Here is my JSF code:
    <h:panelGrid styleClass="panelGrid"
              rowClasses="tsPanelGridRowClass" columns="8" cellpadding="0"
              cellspacing="2" bgcolor="transparent" style="margin-left: 10px"
              id="revCenterItemPanelGrid"
              binding="#{pc_Touchscreen_pull_select_item.revCenterItemPanelGrid}">
    </h:panelGrid>And here is the code for backing bean that adds content inside the panelGrid:
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("1");
    index.setValue(String.valueOf(1));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);On click of a button...
    <a4j:commandButton value="Update"
              styleClass="commandExButtonPou2" id="button1" reRender="revCenterItemPanelGrid"
              actionListener="#{pc_Touchscreen_pull_select_item.doSortActionListener2}">
              <f:attribute name="order" value="2"></f:attribute>
              <f:attribute name="toggleState" value="off"></f:attribute>
    </a4j:commandButton>the backing bean is supposed to update the value of the outputText
    doSortActionListener2() {
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("2");
    index.setValue(String.valueOf(2));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);
    }However, update doesn't seem to work. I have been successful in adding ajax support to a panelGrid that is not dynamically created but not for this one.
    Has anyone encountered this error before? Any ideas?
    Thanks in advance!

    Hi everyone!
    I would like to ask help from anyone who may have encountered similar problem before...
    I have a panelGrid whose component is dynamically created by the backing bean. Here is my JSF code:
    <h:panelGrid styleClass="panelGrid"
              rowClasses="tsPanelGridRowClass" columns="8" cellpadding="0"
              cellspacing="2" bgcolor="transparent" style="margin-left: 10px"
              id="revCenterItemPanelGrid"
              binding="#{pc_Touchscreen_pull_select_item.revCenterItemPanelGrid}">
    </h:panelGrid>And here is the code for backing bean that adds content inside the panelGrid:
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("1");
    index.setValue(String.valueOf(1));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);On click of a button...
    <a4j:commandButton value="Update"
              styleClass="commandExButtonPou2" id="button1" reRender="revCenterItemPanelGrid"
              actionListener="#{pc_Touchscreen_pull_select_item.doSortActionListener2}">
              <f:attribute name="order" value="2"></f:attribute>
              <f:attribute name="toggleState" value="off"></f:attribute>
    </a4j:commandButton>the backing bean is supposed to update the value of the outputText
    doSortActionListener2() {
    HtmlOutputText index = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
    index.setId("2");
    index.setValue(String.valueOf(2));
    index.setStyle("datagridtext");
    revCenterItemPanelGrid.getChildren().add(index);
    }However, update doesn't seem to work. I have been successful in adding ajax support to a panelGrid that is not dynamically created but not for this one.
    Has anyone encountered this error before? Any ideas?
    Thanks in advance!

Maybe you are looking for

  • Bug in new firmware 7.0 for 6300 cannot create per...

    There is bug in new firmware 7.0 for nokia 6300 and maybe all 40 series. I am not able to create access point which is necessary to access internet with java applications. When I go Settings -> Configuration -> Personal config.sett. -> Add -> Access

  • Acrobat X, seeing what % you print

    In Acrobat 9, you could see how many % a page was shrunk (is that a word?) to fit on an A4 page. Like this (in Swedish): In Acrobat X, I can't see that percentage anywhere: The reason to why I want this: We get dimensional drawings on our units from

  • How do I get my Draft folder to open?

    My Draft file won't open. New entries won't appear. I see a round circle continue to show the file is trying to open.

  • Report fradulent activity

    Good morning Today morning I got a message from the skype team that my account was blocked (which upset me, naturally). After recovering my account and was rather shocked to see all my money gone, depleted in 3 calls to +2454012999 , Guinea-Bissau ye

  • Load Balancing TMG 2010

    hi, i use 2 tmg's with sp2. no active directory, hance no tmg array. i want to enable microsoft load balancing on the internal and external but i always get "RPC is not ..." although i have opened the correct ports. i have managed to establish a load