Count of a query in Unix environment and use sysdate

hi,
i have a code below and i want this to be used in Unix env and i need to use sysdate where i hard coded the date but the time should remain as it is.
select count(type),type from ebizp.bchistevent
where (type = 'com.avolent.apps.event.LoginEvent' or type = 'com.avolent.apps.event.LogoutEvent')
and(to_char(createdt, 'dd/mm/yy hh24:mi s') between '28/01/13 08:00:00' and '28/01/13 09:00:00')
AND ( bucket = to_char(sysdate-1, 'YYYYMM') OR bucket = to_char(sysdate, 'YYYYMM') OR bucket = 0)
group by type
like it should be between 'sysdate 08:00:00' and 'sysdate 09:00:00')
please suggest.

Dates should be compared with dates values. Don't use to_char to compare date values.
And dont use "TYPE" as a column name - it is a reserved key word..
select count(type), type
from ebizp.bchistevent
where (
    type = 'com.avolent.apps.event.LoginEvent'
    or type     = 'com.avolent.apps.event.LogoutEvent'
AND createdt BETWEEN trunc(sysdate)+(8/24) AND trunc(sysdate)+(9/24)
and (
  bucket = to_char(sysdate-1, 'YYYYMM')
  or bucket    = to_char(sysdate, 'YYYYMM')
  or bucket    = 0
GROUP BY type;And you can simplify the query
select count(type), type
from ebizp.bchistevent
where type in
    ('com.avolent.apps.event.LoginEvent','com.avolent.apps.event.LogoutEvent')
AND createdt BETWEEN trunc(sysdate)+(8/24) AND trunc(sysdate)+(9/24)
and bucket in
     (to_char(sysdate-1, 'YYYYMM'),to_char(sysdate, 'YYYYMM'),'0')
GROUP BY type;Edited by: jeneesh on Feb 19, 2013 2:42 PM

Similar Messages

  • Will JCO work in Unix Environment and in Webshere 3.5

    I need to know whether SAPJCO.jar will work fine in unix environment and also whether is it compactible with websphere version 3.4.

    Hi Nikki,
    The answer for your question is <b>YES</b>. Unix supports java and Websphere. I think you are aware of of running complex J2EE applications on websphere. If you are able to run java based applications on your server and do not worry you can run sapjco.jar without any problem. Recently we had an integration project [ SAP R/3 and Lotus Domino Server]. It worked out perfectly.
    Read this will let you know more,
    http://www-128.ibm.com/developerworks/websphere/zones/portal/catalog/doc/appportletbuilder/ApplicationPortletBuilder_v410_wsdd.html
    Hope this will solve your problem.
    Thanks
    Kathirvel

  • SELECt query in UNiX environment

    Iam using hp unix with oracle 11g
    when i try to spool 26 lack records it is giving me error
    " There is not enough memory available now.
    O/S Message: Broken pipe"
    is there is any other way SQL commands, we can limit the SELECT query to spool specific number of times other than using
    FOR LOOP.. with LIMIT cluase

    logdata=`${SQLPLUS} -S username/password<< EOF
                        SET ECHO OFF
                        SET LINESIZE 2000
                        SET NEWPAGE 0
                        SET SPACE 0
                        SET PAGESIZE 0
                        SET FEEDBACK OFF
                        SET HEADING OFF
                        SET TRIMSPOOL ON
                        SET TAB OFF
                        set autoprint on               
                        set serveroutput on
                        set spool on
                        spool ${SPOOL_FILE}     
                        set termout off
                   WHENEVER SQLERROR EXIT SQL.SQLCODE
                   whenever oserror exit 1;
                        $GetQuery ==> there come's the SELECT statement which spool's 25 lakh records.
                        spool off
                   EXIT
                        END`
    While spooling records it throws the error
    There is not enough memory available now.
    O/S Message: Broken pipe
    i want u use spooling instead of using util_file to write each and every rows in a file
    Edited by: user9080289 on Apr 29, 2010 5:04 AM

  • Querying on a value and using that to pull other data in the same query

    I am having some issues pulling the correct data in a query. There is a table that houses application decision data that has a certain decision code in it, WA, for a particular population of applicants. These applicants also may have other records in the same table with different decision codes. Some applicants do NOT have WA as a decision code at all. What I need to do is pull anyone whose maximum sequence number in the table is associated with the WA decision code, then list all other decision codes that are also associated with the same applicant. These do not necessarily need pivoted, so long as I can pull all the records for a person whose highest sequence number is associated with WA and all of the other decision codes for that applicant for the same term code and application number also appear as rows in the output.
    I do not have the rights in Oracle to create tables, so please pardon if this code to make the table is incorrect or doesn't show up here as code. This is not the entire SARAPPD table framework, just the pertinent columns, along with some data to put in them.
    DROP TABLE SARAPPD;
    CREATE TABLE SARAPPD
    (PIDM              NUMBER(8),
    TERM_CODE_ENTRY   VARCHAR2(6 CHAR),
    APDC_CODE         VARCHAR2(2 CHAR),
    APPL_NO        NUMBER(2),
    SEQ_NO             NUMBER(2));
    INSERT INTO SARAPPD VALUES (12345,'201280','WA',1,4);
    INSERT INTO SARAPPD VALUES (12345,'201280','RE',1,3);
    INSERT INTO SARAPPD VALUES (12345,'201280','AC',1,2);
    INSERT INTO SARAPPD VALUES (23456,'201280','RE',1,2);
    INSERT INTO SARAPPD VALUES (23456,'201280','WA',1,3);
    INSERT INTO SARAPPD VALUES (23456,'201280','SC',1,1);
    INSERT INTO SARAPPD VALUES (34567,'201280','AC',1,1);
    INSERT INTO SARAPPD VALUES (45678,'201210','AC',2,1);
    INSERT INTO SARAPPD VALUES (45678,'201280','AC',1,2);
    INSERT INTO SARAPPD VALUES (45678,'201280','WA',1,3);
    INSERT INTO SARAPPD VALUES (56789,'201210','SC',1,2);
    INSERT INTO SARAPPD VALUES (56789,'201210','WA',1,3);
    COMMIT;I have attempted to get the data with a query similar to the following:
    WITH CURR_ADMIT AS
          SELECT   C.SEQ_NO "CURR_ADMIT_SEQ_NO",
                            C.PIDM "CURR_ADMIT_PIDM",
                            C.TERM_CODE_ENTRY "CURR_ADMIT_TERM",
                            C.APDC_CODE "CURR_ADMIT_APDC",
                            C.APPL_NO "CURR_ADMIT_APPNO"
                              FROM SARAPPD C
                              WHERE C.TERM_CODE_ENTRY IN ('201210','201280')
                              AND C.APDC_CODE='WA'
                             AND C.SEQ_NO=(select MAX(d.seq_no)
                                                   FROM   sarappd d
                                                   WHERE   d.pidm = C.pidm
                                                   AND d.term_code_entry = C._term_code_entry)
    select sarappd.pidm,
           sarappd.term_code_entry,
           sarappd.apdc_code,
           curr_admit.CURR_ADMIT_SEQ_NO,
           sarappd.appl_no,
           sarappd.seq_no
    from sarappd,curr_admit
    WHERE sarappd.pidm=curr_admit.PIDM
    and sarappd.term_code_entry=curr_admit.TERM_CODE_ENTRY
    AND sarappd.appl_no=curr_admit.APPL_NOIt pulls the people who have WA decision codes, but does not include any other records if there are other decision codes. I have gone into the user front end of the database and verified the information. What is in the output is correct, but it doesn't have other decision codes for that person for the same term and application number.
    Thanks in advance for any assistance that you might be able to provide. I am doing the best I can to describe what I need.
    Michelle Craig
    Data Coordinator
    Admissions Operations and Transfer Systems
    Kent State University

    Hi, Michelle,
    903509 wrote:
    I do not have the rights in Oracle to create tables, so please pardon if this code to make the table is incorrect or doesn't show up here as code. This is not the entire SARAPPD table framework, just the pertinent columns, along with some data to put in them. You really ought to get the necessary privileges, in a schema that doesn't have the power to do much harm, in a development database. If you're expected to develop code, you need to be able to fabricate test data.
    Until you get those privileges, you can post sample data in the form of a WITH clause, like this:
    WITH     sarappd    AS
         SELECT 12345 AS pidm, '201280' AS term_code_entry, 'WA' AS apdc_code , 1 AS appl_no, 4 AS seq_no     FROM dual UNION ALL
         SELECT 12345,           '201280',                    'RE',               1,             3                 FROM dual UNION ALL
         SELECT 12345,           '201280',                  'AC',            1,          2               FROM dual UNION ALL
    ... I have attempted to get the data with a query similar to the following:
    WITH CURR_ADMIT AS
          SELECT   C.SEQ_NO "CURR_ADMIT_SEQ_NO",
    C.PIDM "CURR_ADMIT_PIDM",
    C.TERM_CODE_ENTRY "CURR_ADMIT_TERM",
    C.APDC_CODE "CURR_ADMIT_APDC",
    C.APPL_NO "CURR_ADMIT_APPNO"
    FROM SARAPPD C
    WHERE C.TERM_CODE_ENTRY IN ('201210','201280')
    AND C.APDC_CODE='WA'
    AND C.SEQ_NO=(select MAX(d.seq_no)
    FROM   sarappd d
    WHERE   d.pidm = C.pidm
    AND d.term_code_entry = C._term_code_entry)
    Are you sure this is what you're actually running? There are errors. such as referencing a column called termcode_entry (starting with an underscore) at the end of the fragment above. Make sure what you post is accurate.
    Here's one way to do what you requested
    WITH     got_last_values  AS
         SELECT  sarappd.*     -- or list all the columns you want
         ,     FIRST_VALUE (seq_no)    OVER ( PARTITION BY  pidm
                                        ORDER BY      seq_no     DESC
                                  )           AS last_seq_no
         ,     FIRST_VALUE (apdc_code) OVER ( PARTITION BY  pidm
                                        ORDER BY      seq_no     DESC
                                  )           AS last_apdc_code
         FROM    sarappd
         WHERE     term_code_entry     IN ( '201210'
                           , '201280'
    SELECT     pidm
    ,     term_code_entry
    ,     apdc_code
    ,     last_seq_no
    ,     appl_no
    ,     seq_no
    FROM     got_last_values
    WHERE     last_apdc_code     = 'WA'
    ;Don't forget to post the results you want from the sample data given.
    This is the output I get from the sample data you posted:
    `     PIDM TERM_C AP LAST_SEQ_NO    APPL_NO     SEQ_NO
         23456 201280 WA           3          1          3
         23456 201280 RE           3          1          2
         23456 201280 SC           3          1          1
         45678 201280 WA           3          1          3
         45678 201280 AC           3          1          2
         45678 201210 AC           3          2          1
         56789 201210 WA           3          1          3
         56789 201210 SC           3          1          2I assume that the combination (pidm, seq_no) is unique.
    There's an analytic LAST_VALUE function as well as FIRST_VALUE. It's simpler (if less intuitive) to use FIRST_VALUE in this problem because of the default windowing in analytic functions that have an ORDER BY clause.

  • Query on SR520-ADSL and using FE ports for WAN

    Hi all,
    Apologies for a noob type question here but I am hoping to save myself a junk of money:
    I currently have a Cisco SR520-ADSL router in place utilising my current ADSL2+ Broadband connection.
    The router is using a /29 Public address range on the ATM interface and on one of the FE ports to a firewall on the same subnet, which does the NAT to the PCs etc.
    Internet <> SR520 (Public) <> Firewall (Public) <> LAN/PCs (Private/NAT)
    This is all working fine but we are looking to upgrade our WAN link to a corporate Fibre link.
    My ISP has given me new IP addresses, including a seperate WAN IP Subnet to my LAN IP Subnet, but all are still public.
    e.g. (Addresses Just for example purposes)
    WAN = 195.1.1.1 /30
    My Router IP = 195.1.1.2
    ISP Gateway = 195.1.1.1
    LAN IP = 190.1.1.1 /29
    So my question is simply this: Can I utilise my SR520 to route the two networks, using two of the FE ports and ignore the ATM (ADSL) port?
    If so then I don't need to invest in a 1841 or similar and, for now, this will save me money.
    I am just not sure if the useability of the 4 FE ports on the SR520 is reduced in any way when compared to a 1841 or similar?
    Regards,
    Chris Snape

    Hi Chris,
    Sure, the port itself is layer 2 only, but there is no reason why you couldn't assign that to a dedicated layer 3 vlan interface.
    eg:
    conf t
    vlan 32
      name WAN
      exit
    interface fast 1
      switchport access vlan 32
      exit
    interface vlan 32
      ip address 10.10.10.10 255.255.255.0
    The SR520 supports 4 VLANs, you can use the show vlan-switch command to see what is already configured.
    As I mentioned previously, there may be certain limitations to using this approach, but it may be sufficient for many scenarios.
    Also, just to repeat for others reading this thread, while possible, this is not a specifically supported configuration for the SR520 series routers.
    Regards,
    Andy

  • Unable to compile .pll in Unix environment

    Hi
    I am trying to compile a .pll library file in a unix environment and its coming up with error message 'PDE-PLI018- could not find library PMS_MENU.pll'
    Regards and Thanks
    Dharmendra Jha

    Yea I have all the reference to the library.
    Basically what I am doing is
    1.making few changes to .pll file
    2.ftping the file to unix enviroment
    3.from unix prompt,I am typing the following statment to compile the .pll file
    f45gen MENU.pll userid=scott/tiger module_type=LIBRARYthis above statement fails to compile and returns the error message 'PDE-PLI018- could not find library PMS_MENU.pll'

  • Error using wldeploy in unix environment

    I am trying to use wldeploy ant task to deploy and undeploy applications from my server in a unix environment, and keep getting errors there, and not locally on a XP development workstation. Below are my buildfile and the error that I am getting. Anyone have any ideas as to what may be wrong?
    build.xml
    <target name="undeploy" description="Undeploys app">
    <wldeploy user="${user}" password="${password}"
    adminurl="${adminurl}" remote="true"
         action="stop" name="${appname}" debug="true"
    verbose="true"/>
    </target>
    And here is the error:
    [wldeploy] weblogic.Deployer -debug -remote -verbose -noexit -name ${appname} -adminurl iiop://${host}:${port} -user ${user} -password ${password} -stop
    [wldeploy] weblogic.Deployer invoked with options: -debug -remote -verbose -noexit -name broker-co
    ntact.ear -adminurl iiop://${host}:${port} -user ${user} -stop
    [wldeploy] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE v
    ersion V1_4 deployments
    [wldeploy] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at a
    lice.healthpartners.com:8001, as user system
    [wldeploy] [ServerConnectionImpl.getEnvironment():288] : setting environment
    [wldeploy] [Debug.say():43] : getting context using iiop://alice.healthpartners.com:8001
    [wldeploy] [Debug.say():43] : Connecting to MBeanServer at service:jmx:iiop://${host}:${port}/jndi/weblogic.management.mbeanservers.domainruntime
    [wldeploy] java.io.IOException
    [wldeploy] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProvide
    rBase.java:135)
    [wldeploy] at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProvid
    erBase.java:79)
    [wldeploy] at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.j
    ava:341)
    [wldeploy] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:262)
    [wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServer(Serve
    rConnectionImpl.java:240)
    [wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServerForTyp
    e(ServerConnectionImpl.java:191)
    [wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectio
    nImpl.java:147)
    [wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(Web
    LogicDeploymentManagerImpl.java:148)
    [wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeplo
    ymentManagerImpl.java:118)
    [wldeploy] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentMan
    ager(DeploymentFactoryImpl.java:84)
    [wldeploy] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:4
    32)
    [wldeploy] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:302
    [wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
    [wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
    [wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:158)
    [wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:115)
    [wldeploy] at weblogic.Deployer.run(Deployer.java:70)
    [wldeploy] at weblogic.Deployer.mainWithExceptions(Deployer.java:62)
    [wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
    [wldeploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
    :43)
    [wldeploy] at java.lang.reflect.Method.invoke(Method.java:615)
    [wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:419)
    [wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:349)
    [wldeploy] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [wldeploy] at org.apache.tools.ant.Task.perform(Task.java:364)
    [wldeploy] at org.apache.tools.ant.Target.execute(Target.java:341)
    [wldeploy] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [wldeploy] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [wldeploy] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [wldeploy] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:4
    0)
    [wldeploy] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [wldeploy] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [wldeploy] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [wldeploy] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [wldeploy] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    [wldeploy] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
    [wldeploy] java.io.EOFException]
    [wldeploy] at weblogic.jrmp.Context.lookup(Context.java:189)
    [wldeploy] at weblogic.jrmp.Context.lookup(Context.java:195)
    [wldeploy] at javax.naming.InitialContext.lookup(InitialContext.java:363)
    [wldeploy] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProvide
    rBase.java:126)
    [wldeploy] ... 35 more
    [wldeploy] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nest
    ed exception is:
    [wldeploy] java.io.EOFException
    [wldeploy] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:293)
    [wldeploy] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:190)
    [wldeploy] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:321)
    [wldeploy] at weblogic.jrmp.BaseRemoteRef.invoke(BaseRemoteRef.java:221)
    [wldeploy] at weblogic.jrmp.RegistryImpl_Stub.lookup(Unknown Source)
    [wldeploy] at weblogic.jrmp.Context.lookup(Context.java:185)
    [wldeploy] ... 38 more
    [wldeploy] Caused by: java.io.EOFException
    [wldeploy] at java.io.DataInputStream.readByte(DataInputStream.java:269)
    [wldeploy] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:234)
    [wldeploy] ... 43 more
    [wldeploy] [Debug.say():43] : Closing DM connection
    [wldeploy] [Debug.say():43] : Unregistered all listeners
    [wldeploy] weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 'iiop://${host}:${port}': null. Ensure the url represents a running admin server and that the crede
    ntials are correct. If using http protocol, tunneling must be enabled on the admin server.
    Thanks.
    Scott

    Hi Richard,
    I had the same issue using Eclipse. I just tried to run the
    ant script outside of Eclipse and it worked fine.
    This is an Eclipse-Ant Class Loader issue.
    In order to make it work in Eclipse, You have to :
    1. Open the External Tool Run Configuration.
    2. Select your Ant script.
    3. Select JRE Tab.
    4. In Runtime JRE section, choose Seperate JRE.
    Hope this helps !
    Eric

  • How to create odbc (dsn) connection for OBIEE AND INFOR in unix environment

    Hi,
    we are establishing OBIA in Unix environment we set all the things fine but we are getting problem how to create ODBC connection
    for INFORMATICA AND OBIEE. I searched some blogs thats telling there is a ODBC.INI file we need to configure.
    but i am not getting clear idea to give parameters and it will not showing any TNSNAME ..........etc
    please any body give clear idea about how to create ODBC connection and LOCATION of that file AND parameter which i need to give.
    Thanks,
    charan....

    Hi Dpka,
    yah i already checked that one but i have not find out any parameter for TNS NAME information.
    is OBIEE connected to ORACLE DATA BASE without giving TNS information?............in UNIX OPERATING SYSTEM.
    pls give me the clear idea abt how to connect OBIEE, INFORMATICA to ORACLE DATA BASE IN UNIX ENVRNMENT
    thanks,
    charan.

  • Installation and deployment of operating system, applications and patches in Unix environment

    Is it possible to use Configuration Manager 2012 (or 2012 R2) to perform remote installation of operating system, applications and patching in a Unix environment?
    Balaji Kundalam

    ConfigMgr does not support Operating System Deployment for non-Windows OS flavors.
    You can use the ConfigMgr client on a Unix device to install applications and to instruct the device to install patches. Basically, the client will download files and run a script against them.  If there is a patch manager in your flavor of *nix, you
    can run a script to install the patches.
    See the supported operating systems here:
    http://technet.microsoft.com/en-us/library/gg682077.aspx#BKMK_SupConfigLnUClientReq
    I hope that helps,
    Nash
    Nash Pherson, Senior Systems Consultant
    Now Micro -
    My Blog Posts
    If you've found a bug or want the product worked differently,
    share your feedback.
    <-- If this post was helpful, please click "Vote as Helpful".

  • Convert Docx and doc to HTML in unix environment with CFMX7

    I have a web app that allows user to upload doc or docx files and converts it to HTML. I have CFMX 7 in a unix environment. Is there a custom tag that I could use for this conversion? I tried the cfx_word2html tag .. it converts .doc not docx. Please let me know. Thanks...

    I've been pleased with Aspose's Words component.  I use the .NET version, but a Java version is also available.  You could try using CFOBJECT plus the Words Java component to handle document conversion on your server.
    http://www.aspose.com/categories/file-format-components/aspose.words-for-.net-and-java/def ault.aspx

  • Java and UNIX environment variables

    Hi folks,
    am I right when I say that it is not possible to access UNIX environment variables from Java (these ones delared by the export statement)?
    Cheers,
    Heiko

    Yes.. Since some OS do not have the  concept of environment variables,it is directly not possible.
    But using the method System.getProperties you can get
    some inf about the environment.
    the following links may be of some help to you
    http://www.javaworld.com/javaworld/javaqa/2001-07/01-qa-0706-env.html
    http://www.jguru.com/faq/view.jsp?EID=11422

  • XSL variable and unix environment variable

    Any idea how I can pass the unix environment variable to the custom XSL file? I want to be able to pass the $PO_TOP path so the file location can be derived
    The below code works fine for static file location but I want it to be more generic.
    <fo:block xsl:use-attribute-sets="termcond">
    <xsl:if test="($print_draft = '')">
         <xsl:value-of select="unparsed-text('/usr/tmp/tc.txt','UTF-8')"/>
    </xsl:if>
    </fo:block>
    <fo:block id="last-page"/>
    Thanks in advance

    you'll need to use the name(.) XPath function to test the name of the current node.

  • How to use one query against multiple table and recieve one report?

    I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.

    hey
    a. the all 256 tables whuld be one big partitoned table
    b. you can use all_tables in order to write a select that will write the report for you:
    SQL> set head off
    SQL> select 'select * from (' from dual
      2  union all
      3  select 'select count(*) from ' || table_name || ' union all ' from a
      4  where table_name like 'DB%' AND ROWNUM <= 3
      5  union all
      6  select ')' from dual;
    select * from (
    select count(*) from DBMS_LOCK_ALLOCATED union all
    select count(*) from DBMS_ALERT_INFO union all
    select count(*) from DBMS_UPG_LOG$ union all
    remove the last 'union all', and tun the generated quary -
    SQL> set head on
    SQL> select * from (
      2  select count(*) from DBMS_LOCK_ALLOCATED union all
      3  select count(*) from DBMS_ALERT_INFO union all
      4  select count(*) from DBMS_UPG_LOG$
      5  );
      COUNT(*)
             0
             0
             0
    Amiel

  • Correct idea to scale out testing environment and test service pack2 installation

    Hi
    I have a sharepoint 2010 farm it has one sharepoint server, one database server
    In one server  below services are running
    Central administration service
    SharePoint Server Search 
    User Profile Service 
    Microsoft SharePoint Foundation Web Application
    so i want to scale out this form  to
    1 application server
    1 web front end server
    1 Search server (index server)
    1 databse server
    here how i scale out to this form
    1)here how i move  sharepoint  server search service to new  index server and
    2) here how i move  Microsoft SharePoint Foundation Web Application to new webfront end server
    and in this single server  some web appllications are running also how i move these to new wf server
    i want to do like this  because i want to test service pack 2 installation, now  sharepoint version is : service pack1
    my actual production environment has
    2 application servers
    2 webfront end servers
    2 index servers
    1 databae server
    so this correct idea to scale out testing environment and test service pack2 installation
    adil

    Hi Adil,
    The link below describes how to scale SharePoint Web Front-End with only web applications and the search query server  out of one SharePoint server with all roles running.
    http://sharepointsolutions.com/sharepoint-help/blog/2011/02/how-to-scale-out-a-sharepoint-2010-farm-from-two-tier-to-three-tier-by-adding-a-dedicated-application-server/
    Now you have two SharePoint server with:
    Tier 1 – SharePoint Server dedicated as a Web Front-End (WFE) with only the web application(s) and the search query service running on it
    Tier 2 – SharePoint Server dedicated as an Application Server with all of the other service applications running on it, but no web applications or query service
    Tier 3 – SQL Server for the databases
    Then you would scale out WFE server with web applications from tier1. Now please install a new SharePoint server and join it to the existing farm and deploy it as Web Front Server. Enable the relevant services on Web Front servers per the topology picture
    below, and stop the services running on the old server.
    http://technet.microsoft.com/en-us/library/cc263044(v=office.14).aspx
    Regards
    Rebecca Tu
    TechNet Community Support

  • Pass a Value to Variable from the unix environment in ODI (ELT)

    Hi
    i am very new to ODI environment.
    i want know how to pass a value to variables in oracle data integrator from unix environment.
    Example:
    Variable name : Sales
    for variable name sales i want to pass the value from unix environment.
    Regards,
    Raj
    Edited by: user11137587 on Aug 19, 2009 6:26 AM

    Work Around !
    You can execute OS commands using Jython script. Probably you need to flush your enviornment variables value into a file using jython script and then read those value into ODI variable from the file.
    BUt may I know why you want to read environment variable vaules in ODI, Dont you think this will make your application less portable
    Regards,
    Amit

Maybe you are looking for

  • HT3382 Does the Apple MiniDisplayPort to VGA adapter allow me to connect a VGA DLP projector as a display?

    I want to connect my MacBook Pro i7 that has a mini Dsiplay Port/Thunderbolt port. I want to connect it to my VGA NEC LT20 DLP Projector. I have the Apple MiniDisplayPort to VGA adapter, MB5727Z/A, Model Number A1307 and the computer does not recogni

  • How  to  send a  XML document using HTTPurlconnection as a  post

    Dear Guru's , I am trying ot send a xml document to a httpserver using httpurl connection .. It works fine locally ..but over the net it is throwning an exception ..java.io.interupted exception .. any ideas .. please send me the code if possible Than

  • Flash player to watch streamed sports

    I need a flash player to watch streamed sports to my iPad 3

  • Crop pdf file

    I received pdf file as attachment in Mail. I copied the pdf file to iBook. How do you crop the pdf? I tried iBook, goodreader, easypdf, documents 2 to open the pdf however there is no feature to crop.

  • ICloud photo sending problems

    I have tried sending photos by email using icloud, but it tells me that my user name/password has not been verified by the server, the problem is that its not giving me the chance to put in the correct combination and I am totally lost. I have tried