Error while assigning a character value to a numeric variable.

I fire a sql statement and check the number of rows returned by the sql.
I check this result with the application logs.
The application logs keeps the sqls fired by the application and the no of rows returned, in the example below the sql returned 8454 rows.
My script compares the two results.
***********Application Log***********
4/14/2008 11:15:01 AM: 0059 SQL SELECT "CLUSTER_CD",
4/14/2008 11:15:01 AM: 0060 "PRODUCT_DESC",
4/14/2008 11:15:01 AM: 0061 "TEAM_CD"
4/14/2008 11:15:01 AM: 0062 FROM "OPS$TMS"."MAP_CLUSTER_TEAM_PROD"
4/14/2008 11:15:01 AM:      3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD, 8,454 lines fetched
***********Application Log***********
My script:
#!/bin/ksh
typeset -i resA
typeset -i resB
opstms_conn_string="abc/[email protected]"
set `sqlplus -s $opstms_conn_string << EOF
set pages 0
WHENEVER SQLERROR CONTINUE
SELECT count(*)
FROM MAP_CLUSTER_TEAM_PROD;
exit
EOF`
resA=$1 ##returns 8454
resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}'`
##resB returns 8,454
## here i get syntax error
if [ $resA -eq $resB ]; then
echo "QA passed for sql1"
else
echo "QA failed for sql1"
fi
The problem is as resB is integer variable it does not accept character value: 8,454 so returns a syntax error:
How do I change the value assigned to resB into a numeric variable?
error:
+ grep 3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD, BCVP_Main_Loader.qvw.log
run.ksh[52]: 8,454: syntax error

Change:
resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}'`
to this:
resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{print $10}' | tr -d ,`
to drop the comma. Or you could do it in awk(1):
resB=`grep '3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD,' BCVP_Main_Loader.qvw.log | awk '{ gsub( /,/, "", $10 ); print $10}'`
Or you could to it all in awk(1):
resB=`awk '
/3 fields found: CLUSTER_CD, PRODUCT_DESC, TEAM_CD/ {
gsub( /,/, "", $10 )
print $10
' BCVP_Main_Loader.qvw.log`
(This example was not tested, it's just for a model.)
Someone more of an SQL guru than I can probably tell you how to change your numeric locale to avoid presenting those commas in the first place and avoid the problem.
HTH

Similar Messages

  • Error while assigning supervisor to employee

    Hi
    I was trying to assign supervisor to an employee when i got the below error.
    This is a production environment. The multi org setups are done in India Localization. They had attached default Key FFs in the BG and the key FFs had no segments/no valuesets...
    Responsibility: HRMS Super User
    Menu used is :GLB HRMS Navigator
    Request Group used is  : Global HRMS Reports & Process
    I thought , might be the segments are not existing, that is the reason why the error is occuring while attaching supervisor to employee.
    *1st Error : Please choose an existing combination* ( People>Enter and Maintain>Assignment )
    So I attached segments for Job and position FF. I created Job successfully , but while creating position it threw another error.
    *2nd error: You can not use the datetracked window, because HR is not installed, instead use non datetracked position window.*
    Normally when we do in vision instance, we dont assign any job/position but still we could attach the supervisor..then why this issue occuring in production environment. Please Help.
    Edited by: Sangeeta on Aug 20, 2010 3:34 AM

    "Please choose an existing combination". This error comes when you try to create a new KFF value but do not use the values allowed by value sets attached with a segment in the KFF.
    Now in the assignment screen there are two places where you can create new KFF value.
    1. People Group field
    2. Statutory Information tab
    OPen the assignment details for the person and check for these two flex fields. If there is any problem with the data present in any of these fields, you may get the aforementioned error while updating any field value in the assignment screen.
    So check the value in these two fields and try to fix them.

  • Error while assigning dates to associative array of date type

    Hi All,
    I am facing the issue while assigning dates to associative array of date type:
    Oracle Version:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Stored procedure i am trying to write is as following
    create or replace procedure jp1 (
    p_start_date date default trunc(sysdate,'MM')
    , p_end_date date default trunc(sysdate)
    is
    l_no_of_days number;
    type t_date_id is table of date
    index by pls_integer;
    l_date_id_arr t_date_id;
    begin
    l_no_of_days := p_end_date - p_start_date;
    for i in 0
    .. l_no_of_days - 1
    loop
        l_date_id_arr := p_start_date + i;
        dbms_output.put_line(p_start_date + i);
    end loop;
    end;
    I am getting error at line 14 while compiling this. and the error message is as following:
    Errors for PROCEDURE JP1:
    LINE/COL ERROR
    14/5     PL/SQL: Statement ignored
    14/22    PLS-00382: expression is of wrong type
    So while investigating this i tried to output the value of (p_start_date + i) using dbms_output.put_line and the output is date itself.
    create or replace procedure jp1 (
    p_start_date date default trunc(sysdate,'MM')
    , p_end_date date default trunc(sysdate)
    is
    l_no_of_days number;
    type t_date_id is table of date
    index by pls_integer;
    l_date_id_arr t_date_id;
    begin
    l_no_of_days := p_end_date - p_start_date;
    for i in 0 .. l_no_of_days-1
    loop
        --l_date_id_arr := p_start_date + i;
        dbms_output.put_line(p_start_date + i);
    end loop;
    end;
    output of the
    exec jp1
    is as following:
    01-DEC-13
    02-DEC-13
    03-DEC-13
    04-DEC-13
    05-DEC-13
    06-DEC-13
    07-DEC-13
    08-DEC-13
    09-DEC-13
    10-DEC-13
    11-DEC-13
    12-DEC-13
    13-DEC-13
    14-DEC-13
    15-DEC-13
    16-DEC-13
    17-DEC-13
    18-DEC-13
    I see the output as date itself. so why it is throwing error while assigning the same to associative array of date type.
    I tried to google also for the same but to no avail.
    Any help in this regard is appreciated or any pointer some other thread on internet or in this forum.
    Thanks in advance
    Jagdeep Sangwan

    Read about associative arrays :
    create or replace procedure jp1 (
    p_start_date date default trunc(sysdate,'MM')
    , p_end_date date default trunc(sysdate)
    ) is
    l_no_of_days number;
    type t_date_id is table of date
    index by pls_integer;
    l_date_id_arr t_date_id;
    begin
    l_no_of_days := p_end_date - p_start_date;
    for i in 0..l_no_of_days - 1
    loop
        l_date_id_arr(i) := p_start_date + i;
        dbms_output.put_line(p_start_date + i);
    end loop;
    end;
    Ramin Hashimzade

  • Error while Assigning database level role (db_datareader) to SQL login (Domain Account)

    Team,
    I got an error while creating a User for Domain Account. Below is the screen shot of the error (error : 15401)
    Database instance is on SQL 2000 SP3. ( I know it is out of support, But the customer is relutanct to upgrade)
    On Google search, i found below article which is best matching for this error
    http://support.microsoft.com/kb/324321
    I have follows each step of troubleshooting. But still the issue persists.
    Step 1. The login does not exist == The login is very much exist in the domain as i am able to add the same domain id to other database instances
    Step 2. Duplicate security identifiers == i have used this query to find duplicate SID
    /*  SELECT name FROM syslogins WHERE sid = SUSER_SID ('YourDomain\YourLogin') */
    But there was only one row returned with create date of today's.
    Error while Assigning database level role (db_datareader) to SQL login (Domain Account) 
    Step 3. Authentication failure == Domain is available. User is able to login on other servers via RDP connection.
    Step 4. Case sensitivity == Database collation is set to Case insensitivity. (CI)
    Other two 5. Local Accounts & 6. Name resolution == is not applicable to me.
    I tried other ways also.
    A. Creating login and providing permission in one go only = User account is not created
    B. Instead of GUI, use query to create login and provide required permission = Same error.
    Does anybody has faced any such situation
    Chetan

    See the below output
    srvid
    sid
    xstatus
    xdate1
    xdate2
    name
    password
    dbid
    language
    isrpcinmap
    ishqoutmap
    selfoutmap
    NULL
    0x010500000000000515000000A1F66E1BFC1DC75D26E72530A2B80400
    14
    20:25.9
    57:33.4
    UKBAA\LHRAPPMuttavarapuS
    NULL
    1
    us_english
    0
    0
    0
    Chetan

  • Error - ATTRIBUTE_IDOC_METADATA - EDI: Error while assigning IDoc number

    Hi,
    I'm attempting to create a simple interface which converts cutomer data from a flat file and loads it into a SAP enterprise system as an DEBMAS06 IDoc type. I am getting the error message Error - ATTRIBUTE_IDOC_METADATA - EDI: Error while assigning IDoc number in the XI message monitor.
    Has anyone come accross this error before and if so, what is the resolution???
    Thanks, in advance,
    Pete

    Hi Peter,
    did you fixed it?
    How did you?
    got the same problem
    Kind regards,
    Michael

  • Error while assigning Decimal Attribute to PA

    Hi,
    I am receiving an error while assigning a decimal attribute to the planning area. I am attaching the screen shot below . Can anybody shade some light on this error, what could be the reason ?
    Thanks in advance.
    Regards,
    Chandan

    One cannot have a decimal attribute as the 'attribute' in planning. A decimal attribute can always be marked as a key figure.
    For eg: Price. It cant be a attribute of planning area (like Plant, product).

  • Error: EDI: Error while assigning IDoc number

    Hi Everybody,
    using XI 3.0 on Linux 64 bit SLES9 with Oracle I got some probleme sending messages from mq series to sap:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!-- Call Adapter
    -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30"
    xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP:mustUnderstand="">
    <SAP:Category>XIAdapter</SAP:Category>
    <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
    <SAP:P1>EDI: Error while assigning IDoc number</SAP:P1>
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText />
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack>Error: EDI: Error while assigning IDoc number</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    What is missing here?
    Kind regards,
    Michael

    Hi Jayakrishnan,
    thanks a lot for your answer.
    SM59 is working finde. In IDX1 I got the the correct RFC destination entered and a double click works fine also.
    The other way around R3 -> XI -> mq series is working fine. Here we are trying mq -> XI -> R3 and it stops sending from XI to R/3.
    How to check the IDOC type?
    Regards,
    Michael

  • Error while assignment of Paying Co Code in FBZP

    HI friends,
    I am getting the following error while assigning Paying Co Code in FBZP -
    Company code 7144 is not permitted as the paying company code
    Message no. F3063
    Diagnosis
    The paying company code and the company code on whose behalf the payment is being made must be in the same country, have the same local currency, and display the same currencies managed in parallel. The setting regarding extended withholding tax functions (active or not active) must also be identical for both company codes.
    System Response
    The entry is not accepted since these requirements are not met.
    Procedure
    Correct your entry.bold**
    The reason for the same isCompany code 7144 is not permitted as the paying company code
    Message no. F3063
    Diagnosis
    The paying company code and the company code on whose behalf the payment is being made must be in the same country, have the same local currency, and display the same currencies managed in parallel. The setting regarding extended withholding tax functions (active or not active) must also be identical for both company codes.
    System Response
    The entry is not accepted since these requirements are not met.
    Procedure
    Correct your entry.
    The scenario is that one company code is making the payments for the other. However, the 2 companies are based in different countries. Hence, system is not allowing this assignment.
    Has anyone come across this scenario? Is there any other wayaround for this which can result in Intercompany postings.
    If we assign the Paying Company Code in the Variant screen in F110( instead of FBZP), will that work? I have tried the same but it doesnt work that way.
    Any help on this will be highly appreciated.
    Thanks in advance,
    Hrishi

    - i am not sure if its possible; help on FBZP clearly states this
    +++++++++++++++++
    The paying company code and the company code to which payment is made must be in the same country and have the same local currency and parallel currencies. In addition, both company codes must have the same settings for enhanced withholding tax functions (active or not active).
    Only the valid company codes for the paying company code are included in the possible entries.
    +++++++++++++++++
    Rgds.

  • Assigning a node value from an XML variable to a String type  in Weblogic Process Integrator

    Hi,
    Is there any way to assign a node value from an XML variable to a String variable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

    Nerendra
    Are you talking about using Xpath on the XML document and assigning to a
    variable, it is unclear what you are asking
    Tony
    "Narendra" <[email protected]> wrote in message
    news:3bba1215$[email protected]..
    >
    Hi,
    Is there any way to assign a node value from an XML variable to a Stringvariable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

  • Assigning a javascript value to a JSP variable

    How do i assign a javascript value to a JSP variable?
    eg
    <%
    String JSPvar;
    %>
    <script language="JavaScript1.2">
    <!--
    var javascriptVar="hey"
    -->
    </script>
    <%
    JSPvar = javascriptVar ???
    %>

    You do know that the JSP runs on the server and generates HTML, including Javascript, that is executed on the client, don't you?

  • Error  while assigning resultset value to Querytable variable in Coldfusion 10

    We are upgrading from coldfusion 8 to 10. Internally we were using java function to to get the data.
    In java function we have a resultset object, if we assign this resultset value to Querytable variable, we are getting below error. This code was working fine in coldfusion 8.
    Detail    This exception is usually caused by service startup failure. Check your server configuration.
    Message    The Runtime service is not available.
    StackTrace    coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Runtime service is not available. at coldfusion.server.ServiceFactory.getRuntimeService(ServiceFactory.java:117) at coldfusion.runtime.RequestMonitor.<clinit>(RequestMonitor.java:14) at coldfusion.sql.QueryTable.populate(QueryTable.java:358) at coldfusion.sql.QueryTable.populate(QueryTable.java:283) at coldfusion.sql.QueryTable.<init>(QueryTable.java:96) at com.myCompany.myClass.myFunct(myClass.java:627) at
    Here is the function which is causing error.
    static private QueryTable myFunct(String userId, SessionFactory sf) {
            PreparedStatement pStmt = null;
            ResultSet rs = null;
            QueryTable ret = null;
             try{
                Query q = sf.getCurrentSession().getNamedQuery("ListUsers");
                pStmt = sf.getCurrentSession().connection().prepareStatement(q.getQueryString());
                rs = pStmt.executeQuery();// works fine till here
                ret = new QueryTable(rs);  // error line         
                rs.close();
            }catch(Exception e){
                e.printStackTrace();
                throw new RuntimeException(e.getLocalizedMessage());
            return ret;
    Can you provide some help on this. Please let me know if you need any other details.

    We have found this error is logs
    coldfusion.runtime.Encryptor$InvalidParamsForEncryptionException: An error occurred while trying to encrypt or decrypt your input string: The input and output encodings are not same..
        at coldfusion.runtime.Encryptor.decrypt(Encryptor.java:303)
        at coldfusion.runtime.Encryptor.decrypt(Encryptor.java:284)
        at coldfusion.runtime.CFPage.Decrypt(CFPage.java:5353)
        at coldfusion.runtime.CFPage.Decrypt(CFPage.java:5326)
        at coldfusion.runtime.CFPage.Decrypt(CFPage.java:5458)
        at com.vmware.vcp.service.impl.EncryptColdFusionImpl.decrypt(EncryptColdFusionImpl.java:65)
        at com.vmware.vcp.web.servlet.ApplicationConfigServlet.initEmailService(ApplicationConfigSer vlet.java:119)
        at com.vmware.vcp.web.servlet.ApplicationConfigServlet.init(ApplicationConfigServlet.java:51 )
        at javax.servlet.GenericServlet.init(GenericServlet.java:160)
        at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
        at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5278)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)

  • Error while assigning an application to a user

    Hi All,
    I am new to Oracle Database Lite. I have created a new user and i want to assign a Sample application which comes while installing the mobile server. But while assigning the Sample application to a user through the application page, i got "ERROR: VIRTUAL PATH IS NULL" and when i wanted to assign the Sample application to a user through the user page, i got "Error in executing " Save application ":oracle.lite.web.resource.ResourceException: CONS-10050: Rollback failure: java.sql.SQLException: Io exception: Connection reset by peer: socket write error "
    So can any one help me how to resolve this error so that i can assign the application to a user?
    Any help is welcomed.
    Shrikant

    Thanks Scott. I've also been looking for a pattern of consistency that would point to the cause of the problem but have been unable to find one. I was hoping that others may have experienced the same error and could help to shed some light here.
    I dug around some and found that the wwv_flows_alias_idx constraint is a unique index on the alias and security_group_id columns of wwv_flows. My application has an alias that is the same for all installations so I thought that somehow a previously used value for security_group_id was being generated causing the unique constraint violation. Can you tell me how that value is generated during the install process? Is it some sort of hashing function?
    Thanks

  • Error While Assigning Ad insert contract from Ad insert orders.

    Hi Experts,
    While performing the transaction for u2018Assigning Ad inserts Contracts from Ad Insert ordersu2019, Iu2019m getting the following error.
    Message no. JVSD056
    I did the following steps.
    a) Created a geographical unit.
    b) Assigned that geographical unit in the BP master of the retailer with a newly created assignment type.
    c) Linked the geographical unit in the booking unit for Ad inserts  in MAM .
    d) Created an Ad insert order in MAM by using the booking unit which has the geographical unit assignment.
    Then tried to execute the u2018Assign Ad inserts Contracts from Ad insert orders. The error message is JVSD056.
    Appreciate if anyone can help me in this. This is the first time we are doing this.
    Regards,
    Suresh

    Hi Helios,
    I hav egone through the document.However i have resolved the error ar: illegal option -- F by following the doc id Doc ID 785828.1
    Now i am facing error while relinking
    Relinking module 'FNDCORE.dll' in product fnd ...
    Removing any existing temp directory
    rm -rf temp
    creating the temp directory
    mkdir temp
    changing permissions for the temp directory
    chmod 777 temp
    Getting the object file names for this FNDCORE.dll
    gnumake -f E:/oracle/apps/apps_st/appl/admin/PROD/out/link_fnd_5136.mk fndcore.LIST
    E:/oracle/apps/apps_st/appl/admin/PROD/out/link_fnd_5136.mk:760: *** target pattern contains no `%'. Stop.
    Unable to get the objects for module "FNDCORE.dll".
    See error messages above (also recorded in log file)
    for possible reasons for the failure.
    adrelink is exiting with status 1
    Please advice
    Regards,
    SRK

  • Error while assigning external event

    Hi Guys!
    I'm getting error, while trying to assign an external event on table output.
    I've got a button with action POSTPO, that is residing in standalone form. That action should send data form some form and a table to BAPI.
    When I try to configure connector line and assign that *event (from event scope 'any element'), I recieve Internet Explorer's script error " 'length' is null or not an object".
    Here are two screenshots: [1|http://www.dennisk.org/tmp/SAP/event_err.jpg], [2|http://www.dennisk.org/tmp/SAP/event_err_mod.jpg].
    At the same model I can assign that event to different form and table. The only difference is that before that faulty elements there is a chain of two directly connected BAPIs.
    Is there a way to fix it?
    Thanks in advance!
    Regards,
    DK

    anybody?

  • Error while assigning group

    Hi friends,
      1. Iam getting the following error when assigning the group to a user.
      <b>An error occurred while adding group assignments; to see the correct status, perform a new assigned groups search</b>
    2. When uploading the template also its throwing the java.null exception..
       template contains , user name, password, roles , mail_id, group..
      after uploading the template all the above information is created except group
      when i search for the user which is created based on uploading template ,
      the group is not assigned.
       I need to send users list asap with groups assigned. but its giving problem...
      can anyone suggest me on this..
      Thanks & regards
      Sireesha.

    Hello Sireesha,
    Have u followed standard format while uploading the text file....
    If not use this format while preparing the groups and users etc.....
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/7cdf3dffadd95ee10000000a114084/content.htm
    Rgds
    Pradeep

Maybe you are looking for

  • Passing attribute value in session variable

    Hi All I need to store one field value from my SIM form as a session variable and pass them to the next page along with my session, using some jscript stuff or else. Does this make sense? If it is possible or anyone have any prior experience please r

  • How to Change Hyper-V Host Physical NIC

    I plan to replace a physical NIC on a Windows Server 2008 R2 Hyper-v host. What are the steps that I need to do. Thank you.

  • Custom Tag with boolean Attribute problems

    Hi, I've created a simple custom tag that is expecting a boolean attribute called "disabled". In my Tag derived class I've created a setDisabled(boolean b) method and set the following in the tag descriptor: <attribute>      <name>disabled</name>    

  • Transaction QM03 not allowed for notification type MQ

    HI Dears,      The following error is appearing when i want to view my notification created through defects Transaction QM03 not allowed for notification type MQ      How to rectify it ? Alagesan

  • Combine two tables T-SQL

    Hi there, It might be simple Query for you but I was missing the logic. I have Tab A    this does have 4 records.            Tab B  this does have 14 records. Note: those 4 records exists in Tab B I want to insert rest of the 10 records into the Tab