QUERY NOT WORKIN

Hi All,
I am trying to generate a  number through FMS on the customer reference but this query is showing incorrect syntax near From.
SELECT
'TEST/1011/' + (SELECT CONVERT (CHAR (5), ISNULL (MAX (SUBSTRING (T0.[NumAtCard] , 5, 5) +1) ,1)  FROM
OQUT T0 WHERE T0.[NumAtCard] IS NOT NULL
Please assist to correct the query.
THanks,
Joseph

Hi Istvan,
I want number like TEST/1011/0001.. The query that you have provided shows 001. How to correct that?
I have tried this:
SELECT 'TEST/1011/' +
Right(str(ISNULL(MAX(Right(T0.NumAtCard,4)+100001),100001)),4)
FROM OQUT T0 WHERE T0.U_ERN like 'TEST/1011/[0-9][0-9][0-9][0-9]'
But the auto increment does not work on this one. How to corret this?
Thanks,
Joseph
Edited by: Joseph Antony on Jun 16, 2010 1:12 PM

Similar Messages

  • Select Query not workin as expected

    HI Guru's,
    Here is a select query which takes more time when I incerase the search criteria . The Table I_MKPF is not initial.
    select mblnr mjahr zeile bwart matnr werks charg lifnr
    shkzg bwtar menge meins ebeln aufnr bukrs prctr
    from mseg into corresponding fields of table z_rec
    for all entries in i_mkpf
    where
    mblnr eq i_mkpf-mblnr and
    mjahr eq i_mkpf-mjahr and
    bwart in s_bwart and
    werks in s_werks and
    bukrs in s_bukrs.
    In the above query MBLNR and MJAHR are primary key fields in the same order as in the database.
    The query fetches 2 records and takes around 20 minutes.
    I did some more testing and found one peculiar issue.
    The query takes long time only when S_WERKS and/or S_BUKRS is entered on the selection screen.
    If these two fields are left blank it works super quick.
    I am baffled as to why this is happening. Should it not have been the other way around..?
    Could please take a look and tell me what the issue might be??
    Thanks in Advance,
    Imran

    Hi Imran,
    please check the SQL performance in transaction ST05 > "Explaine one SQL request" for this slightly modified statement:
    select mblnr, mjahr, zeile, bwart, matnr, werks, charg, lifnr,
    shkzg, bwtar, menge, meins, ebeln, aufnr bukrs, prctr
    from mseg
    where
    mblnr = '1' and
    mjahr = '2' and
    bwart in ('1', '2') and
    werks in ('1', '2') and
    bukrs in ('1', '2')
    or
    mblnr = '1' and
    mjahr = '2' and
    bwart in ('1', '2') and
    werks in ('1', '2') and
    bukrs in ('1', '2')
    or
    mblnr = '1' and
    mjahr = '2' and
    bwart in ('1', '2') and
    werks in ('1', '2') and
    bukrs in ('1', '2')
    or
    mblnr = '1' and
    mjahr = '2' and
    bwart in ('1', '2') and
    werks in ('1', '2') and
    bukrs in ('1', '2')
    Please answer back with the results. Best regards,
    Alvaro

  • Execute query not workin on application server

    i have upgraded my form to 10.1.2.0.2 successfully and can host them using the application server ....
    in the form i have got various tab canvas,stacked canvas,contect canvas.....
    but my execute query function is not working ...dont know why

    @abdetu...
    hey buddy every thing is working fine now ....
    according to your suggestion i checked the errors...
    and found that some of the columns were not exported properly from the targer database ...
    after adding the database everything started to work perfectly fine
    once again thnx a lot for ur help and time

  • SQL query not calculating

    SQL query not calculating
    gross_amount is giving the value of extended_amount and the gross_price_rc is giving the value of unit_selling_price
    select customer_trx_line_id,
    ( extended_amount / 1- (decode(decode(attribute6,null,0)+decode(attribute7,null,0)+decode(attribute8,null,0)+decode(attribute9,null,0)/100,null,0,1,0))) GROSS_AMOUNT,
    ( unit_selling_price /1-(decode(decode(attribute6,null,0)+decode(attribute7,null,0)+decode(attribute8,null,0)+decode(attribute9,null,0)/100,null,0,1,0))) gross_price_rc
    from ra_customer_trx_lines_all
    where attribute6 is not null or attribute7 is not null or attribute8 is not null or attribute9 is not null
    whats the isuue here??
    Thanks

    decode(attribute7,null,0)Looking at it again, this always returns 0 or NULL, so it not really surprising
    DECODE
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions040.htm#i1017437
    CASE
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions004.htm#i1033392

  • I have a generation 1 ipod touch my wifi is not working, under setting the wifi says no wifi and is gray.  i have tried resetting it and its not workin. what should i do, please help. thanks

    i have a generation 1 ipod touch my wifi is not working, under setting the wifi says no wifi and is gray.  i have tried resetting it and its not workin. what should i do, please help. thanks

    If a restore did not fix it, you have a hardware issue--possible bad wi-fi radio.
    Basic troubleshooting steps. 
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 

  • IPod nano 2G not workin!!!!

    hi folks.
    had this ipod for a while now. was charging it this mornin and all was good.
    now it wont turn on, ive tried charing it again
    and its not workin, iTunes wont even open.
    any idea on whats wrong/how to fix it?

    This is the Fifth Generation (aka "Video") iPod group by the way.
    First step is to do a reset on the iPod. Slide the hold switch from OFF to ON back to OFF then immediately hold down BOTH the center and Menu buttons for a good 10-15 seconds or until it restarts with the Apple logo.
    Resetting isn't always effective once and you may need to retry it several times to get it to work.
    So start with that.
    Patrick

  • Why is this query not using the index?

    check out this query:-
    SELECT CUST_PO_NUMBER, HEADER_ID, ORDER_TYPE, PO_DATE
    FROM TABLE1
    WHERE STATUS = 'N'
    and here's the explain plan:-
    1     
    2     -------------------------------------------------------------------------------------
    3     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    4     -------------------------------------------------------------------------------------
    5     | 0 | SELECT STATEMENT | | 2735K| 140M| 81036 (2)|
    6     |* 1 | TABLE ACCESS FULL| TABLE1 | 2735K| 140M| 81036 (2)|
    7     -------------------------------------------------------------------------------------
    8     
    9     Predicate Information (identified by operation id):
    10     ---------------------------------------------------
    11     
    12     1 - filter("STATUS"='N')
    There is already an index on this column, as is shown below:-
         INDEX_NAME INDEX_TYPE     UNIQUENESS     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION
    1     TABLE1_IDX2 NORMAL     NONUNIQUE     TABLE1      STATUS     1
    2     TABLE1_IDX NORMAL     NONUNIQUE     TABLE1     HEADER_ID     1
    So why is this query not using the index on the 'STATUS' Column?
    I've already tried using optimizer hints and regathering the stats on the table, but the execution plan still remains the same, i.e. it still uses a FTS.
    I have tried this command also:-
    exec dbms_stats.gather_table_stats('GECS','GEPS_CS_SALES_ORDER_HEADER',method_opt=>'for all indexed columns size auto',cascade=>true,degree=>4);
    inspite of this, the query is still using a full table scan.
    The table has around 55 Lakh records, across 60 columns. And because of the FTS, the query is taking a long time to execute. How do i make it use the index?
    Please help.
    Edited by: user10047779 on Mar 16, 2010 6:55 AM

    If the cardinality is really as skewed as that, you may want to look at putting a histogram on the column (sounds like it would be in order, and that you don't have one).
    create table skewed_a_lot
    as
       select
          case when mod(level, 1000) = 0 then 'N' else 'Y' end as Flag,
          level as col1
       from dual connect by level <= 1000000;
    create index skewed_a_lot_i01 on skewed_a_lot (flag);
    exec dbms_stats.gather_table_stats(user, 'SKEWED_A_LOT', cascade => true, method_opt => 'for all indexed columns size auto');Is an example.

  • I'm having a ipod nano which vl b in rectangular shape of 2" and when i connect my iphone's earpods d control keys are not workin. may i know d reason y its nt supporting?

    i'm having a ipod nano which vl b in rectangular shape of 2" and when i connect my iphone's earpods d control keys are not workin. may i know d reason y its nt supporting?

    I can't tell which iPod nano model you are describing.  The EarPods listing at the Apple Store
    http://store.apple.com/us/product/MD827LL/A/apple-earpods-with-remote-and-mic
    Says (under Compatibility) that iPod nano 4th gen and later are supported ["Requires software version 1.0.3 for iPod nano (4th generation)"].  If your nano is 3rd gen or earlier, it will still work for audio, but some control buttons may not work.

  • The proximity sensor  in my iphone 4 is not workin. What can i do?

    The proximity sensor  in my iphone 4 is not workin. What can i do?

    Hey there JLOGON,
    It sounds like your proximity sensor is not sensing your face when you go to answer a call. I would try these steps to help troubleshoot the issue:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Screen won't lock or go black when answering calls
    Verify mute or speaker have not been activated, just prior to placing your ear over the receiver.
    While on a call hold your hand over the top third of the display, and verify that the screen is locked or goes to sleep.
    Try turning iPhone off and then on again.
    My issue is still not resolved. What do I do next?
    Contact Apple Support.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Mismatch query not working. Not sure what I did wrong.

    In my query, I have created two CTE's. One pulls in the records of all people who are assigned to an audience. The other pulls in all people who are assigned to the same audience AND completed a certain course.
    What I wanted to do from there, was to do a mismatch query, not to find the PEOPLE, but just the departments that were represented in the audience, but had no people in the list of those who completed the course. (In other words, say the HR Department had
    three people in the audience... two completed the course, one did not. The HR Department should NOT show up in my mismatch query because some of their people completed the course. Then, say the IT Department had five people in the audience, and none of them
    have completed the course. The IT Department SHOULD show up in my mismatch query. For this case, I don't care about the people who didn't complete it, just the departments where nobody did yet.)
    I thought I was doing the mismatch query correctly, but I guess I must not. I will share the relevant parts of my query below (there is more to my query, but I don't think you necessarily need to see it to assist with this particular problem). (Side note:
    Yes, I know the way I am doing the fiscal calendar is not ideal, but I've looked up other ways to do it, and do not understand it. Given time, I can break it down and understand it, but I am in a rush to finish this report.)
    gm101certtbl
    AS
    select
    dimUser.EmpFK MeasureEmpFK,
    RIGHT(OrgCode2, LEN(OrgCode2) - 2) MeasurePC,
    audusersName MeasureAudName,
    dimActivity.ActivityName MeasureActName,
    dimActivity.Code MeasureActCode,
    CASE
    WHEN OrgCode2 LIKE 'US%' then 'US'
    WHEN OrgCode2 LIKE 'CA%' then 'CA' END
    CountryCode,
    'ACTUALS_GM101' SOURCESYSTEMID,
    Null CURRENCYCODE,
    'GM101CERT' MEASUREID,
    Null MEASUREDOLLARS,
    CASE
    WHEN GETDATE() Between '20131001 00:00:00' AND '20140930 11:59:59' THEN '2014'
    WHEN GETDATE() Between '20141001 00:00:00' AND '20150930 11:59:59' THEN '2015'
    WHEN GETDATE() Between '20151001 00:00:00' AND '20160930 11:59:59' THEN '2016'
    WHEN GETDATE() Between '20161001 00:00:00' AND '20170930 11:59:59' THEN '2017' END
    FiscalYear,
    CASE
    WHEN MONTH(GETDATE()) = '10' THEN '1'
    WHEN MONTH(GETDATE()) = '11' THEN '2'
    WHEN MONTH(GETDATE()) = '12' THEN '3'
    WHEN MONTH(GETDATE()) = '1' THEN '4'
    WHEN MONTH(GETDATE()) = '2' THEN '5'
    WHEN MONTH(GETDATE()) = '3' THEN '6'
    WHEN MONTH(GETDATE()) = '4' THEN '7'
    WHEN MONTH(GETDATE()) = '5' THEN '8'
    WHEN MONTH(GETDATE()) = '6' THEN '9'
    WHEN MONTH(GETDATE()) = '7' THEN '10'
    WHEN MONTH(GETDATE()) = '8' THEN '11'
    WHEN MONTH(GETDATE()) = '9' THEN '12' END
    FiscalMonthNbr
    from
    dimUser INNER JOIN
    audusers ON audusers.DataSetUsers_EmpFK = dimUser.EmpFK INNER JOIN
    Org ON dimUser.PrimaryDomFK = Org.Org_PK INNER JOIN
    factUserRequiredActivity ON factUserRequiredActivity.UserID = dimUser.ID INNER JOIN
    dimActivity ON dimActivity.ID = factUserRequiredActivity.ActivityID INNER JOIN
    dimRequirementStatus ON factUserRequiredActivity.ReqStatusID = dimRequirementStatus.ID LEFT OUTER JOIN
    UsrOrgs ON dimUser.ID = UsrOrgs.UserID LEFT OUTER JOIN
    UsrDoms ON dimUser.ID = UsrDoms.UserID
    WHERE
    dimActivity.ActivityName = 'GM101 Program Completion'
    AND
    dimRequirementStatus.name = 'Satisfied'
    AND
    (audusersName = @audparam)
    gm101availtbl
    AS
    select
    dimUser.EmpFK MeasureEmpFK,
    RIGHT(OrgCode2, LEN(OrgCode2) - 2) MeasurePC,
    audusersName MeasureAudName,
    Null MeasureActName,
    Null MeasureActCode,
    CASE
    WHEN OrgCode2 LIKE 'US%' then 'US'
    WHEN OrgCode2 LIKE 'CA%' then 'CA' END
    CountryCode,
    'ACTUALS_GM101' SOURCESYSTEMID,
    Null CURRENCYCODE,
    'GM101AVAIL' MEASUREID,
    Null MEASUREDOLLARS,
    CASE
    WHEN GETDATE() Between '20131001 00:00:00' AND '20140930 11:59:59' THEN '2014'
    WHEN GETDATE() Between '20141001 00:00:00' AND '20150930 11:59:59' THEN '2015'
    WHEN GETDATE() Between '20151001 00:00:00' AND '20160930 11:59:59' THEN '2016'
    WHEN GETDATE() Between '20161001 00:00:00' AND '20170930 11:59:59' THEN '2017' END
    FiscalYear,
    CASE
    WHEN MONTH(GETDATE()) = '10' THEN '1'
    WHEN MONTH(GETDATE()) = '11' THEN '2'
    WHEN MONTH(GETDATE()) = '12' THEN '3'
    WHEN MONTH(GETDATE()) = '1' THEN '4'
    WHEN MONTH(GETDATE()) = '2' THEN '5'
    WHEN MONTH(GETDATE()) = '3' THEN '6'
    WHEN MONTH(GETDATE()) = '4' THEN '7'
    WHEN MONTH(GETDATE()) = '5' THEN '8'
    WHEN MONTH(GETDATE()) = '6' THEN '9'
    WHEN MONTH(GETDATE()) = '7' THEN '10'
    WHEN MONTH(GETDATE()) = '8' THEN '11'
    WHEN MONTH(GETDATE()) = '9' THEN '12' END
    FiscalMonthNbr
    from
    dimUser INNER JOIN
    audusers ON audusers.DataSetUsers_EmpFK = dimUser.EmpFK INNER JOIN
    Org ON dimUser.PrimaryDomFK = Org.Org_PK LEFT OUTER JOIN
    UsrOrgs ON dimUser.ID = UsrOrgs.UserID LEFT OUTER JOIN
    UsrDoms ON dimUser.ID = UsrDoms.UserID
    WHERE
    audusersName = @audparam
    missingPC
    AS
    select distinct
    NULL MeasureEmpFK,
    gm101availtbl.MeasurePC,
    gm101availtbl.MeasureAudName,
    gm101availtbl.MeasureActName,
    gm101availtbl.MeasureActCode,
    gm101availtbl.CountryCode,
    gm101availtbl.SOURCESYSTEMID,
    gm101availtbl.CURRENCYCODE,
    'GM101CERT' MEASUREID,
    gm101availtbl.MEASUREDOLLARS,
    gm101availtbl.FiscalYear,
    gm101availtbl.FiscalMonthNbr
    from
    gm101availtbl LEFT OUTER JOIN
    gm101certtbl on gm101certtbl.MeasurePC = gm101availtbl.MeasurePC
    WHERE gm101certtbl.MeasurePC IS NULL
    If anybody can help, I would greatly appreciate it. I'm trying to do this so I can pull these records into a final table to count the records from the other two, but then include these as a 0 count where these departments have nobody certified.
    To test if this was working, I created a query using this Mismatch query instead as the main query. Instead, it seemed to give me the exact opposite. It seemed to be giving me all of the Departments (MeasurePC) where the records were represented.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. We have no sample data, so we cannot even guess. 
    >> In my query, I have created two CTE's. One pulls in the records [sic] of all people who are assigned to an audience. The other pulls in all people who are assigned to the same audience AND completed a certain course. <<
    Please, please learn the basic terms. Rows are not records. And THEN learn what “redundancy” means so you will not write two CTEs in the future. 
    >> What I wanted to do from there, was to do a mismatch query, not to find the PEOPLE, but just the departments that were represented in the audience, but had no people in the list of those who completed the course. (In other words, say the HR Department
    had three people in the audience... two completed the course, one did not. The HR Department should NOT show up in my mismatch query because some of their people completed the course. THEN, say the IT Department had five people in the audience, and none of
    them have completed the course. The IT Department SHOULD show up in my mismatch query. For this case, I don't care about the people who didn't complete it, just the departments where nobody did yet.) <<
    This is a Relational Division. It is one of Dr. Codd's original 8 operations. 
    We do not use the Sybase CURRENT_TIMESTAMP any more. We have DATE data types tody, rtoo. We never tibble in good code; it is a design flaw that used meta-data affixes like “tbl” in schema object _names, PK in column _names, etc. We do not have repeated groups
    like “org_code_2”; we do not use arrays in RDBMS. Why is your data so screwed up you have use 
    CASE 
    WHEN org_code2 LIKE 'US%' THEN 'US'
    WHEN org_code2 LIKE 'CA%' THEN 'CA' END 
    to clean it up in a query; the DDL should have prevented this problem. 
    Why are you doing calendar computing in your query? Where is the Calendar table? 
    “Users.id = UsrOrgs.user_id” says that you have magic, generic “id” that can change its name from table to table. Likewise, a generic, magic “code”, etc. What might be even worse is that totally different data elements have the same name! “Automobiles, squids
    and Lady Gaga” programming is not RDBMS. 
    You have never heard of ISO-11179 and data modeling? 
    Here is a skeleton for fiscal calendar table to replace your current row by row temporal math: 
    CREATE TABLE Calendar 
    (cal_date DATE NOT NULL PRIMARY KEY, 
     fiscal_month CHAR(10) NOT NULL,
    INSERT INTO  Calendar
    VALUES 
    ('2014-10-01', '2015-01-00', ..), 
    ('2014-09-30', '2015-12-00', ..), 
    You can use a spread sheet and a text edit to fill in the table for 50 or 100 years. 
    I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601 data format required by Standard SQL and it is
    language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Cancel Query not working

    Problem Summary
    Cancel Query not working on 11.5.10
    Problem Description
    While finding orders, window pops up the cancel query but when user tries to click the cancel button, query does not cancel.

    jemar98 wrote:
    Problem Summary
    Cancel Query not working on 11.5.10
    Problem Description
    While finding orders, window pops up the cancel query but when user tries to click the cancel button, query does not cancel.Please post the details of the application release, database version and OS.
    Was this working before? If yes, any changes been done recently?
    Please review (Canceling Long Running Queries in Oracle Applications 11i [ID 138159.1]) and make sure you complete all the steps.
    Thanks,
    Hussein

  • Oracle date parameter query not working?

    http://stackoverflow.com/questions/14539489/oracle-date-parameter-query-not-working
    Trying to run the below query, but always fails even though the parameter values matches. I'm thinking there is a precision issue for :xRowVersion_prev parameter. I want too keep as much precision as possible.
    Delete
    from CONCURRENCYTESTITEMS
    where ITEMID = :xItemId
    and ROWVERSION = :xRowVersion_prev
    The Oracle Rowversion is a TimestampLTZ and so is the oracle parameter type.
    The same code & query works in Sql Server, but not Oracle.
    Public Function CreateConnection() As IDbConnection
    Dim sl As New SettingsLoader
    Dim cs As String = sl.ObtainConnectionString
    Dim cn As OracleConnection = New OracleConnection(cs)
    cn.Open()
    Return cn
    End Function
    Public Function CreateCommand(connection As IDbConnection) As IDbCommand
    Dim cmd As OracleCommand = DirectCast(connection.CreateCommand, OracleCommand)
    cmd.BindByName = True
    Return cmd
    End Function
    <TestMethod()>
    <TestCategory("Oracle")> _
    Public Sub Test_POC_Delete()
    Dim connection As IDbConnection = CreateConnection()
    Dim rowver As DateTime = DateTime.Now
    Dim id As Decimal
    Using cmd As IDbCommand = CreateCommand(connection)
    cmd.CommandText = "insert into CONCURRENCYTESTITEMS values(SEQ_CONCURRENCYTESTITEMS.nextval,'bla bla bla',:xRowVersion) returning ITEMID into :myOutputParameter"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.ReturnValue
    p.DbType = DbType.Decimal
    p.ParameterName = "myOutputParameter"
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion"
    v.Value = rowver
    cmd.Parameters.Add(v)
    cmd.ExecuteNonQuery()
    id = CType(p.Value, Decimal)
    End Using
    Using cmd As IDbCommand = m_DBTypesFactory.CreateCommand(connection)
    cmd.CommandText = " Delete from CONCURRENCYTESTITEMS where ITEMID = :xItemId and ROWVERSION = :xRowVersion_prev"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.Input
    p.DbType = DbType.Decimal
    p.ParameterName = "xItemId"
    p.Value = id
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion_prev"
    v.Value = rowver
    v.Precision = 6 '????
    cmd.Parameters.Add(v)
    Dim cnt As Integer = cmd.ExecuteNonQuery()
    If cnt = 0 Then Assert.Fail() 'should delete
    End Using
    connection.Close()
    End Sub
    Schema:
    -- ****** Object: Table SYSTEM.CONCURRENCYTESTITEMS Script Date: 1/26/2013 11:56:50 AM ******
    CREATE TABLE "CONCURRENCYTESTITEMS" (
    "ITEMID" NUMBER(19,0) NOT NULL,
    "NOTES" NCHAR(200) NOT NULL,
    "ROWVERSION" TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL)
    STORAGE (
    NEXT 1048576 )
    Sequence:
    -- ****** Object: Sequence SYSTEM.SEQ_CONCURRENCYTESTITEMS Script Date: 1/26/2013 12:12:48 PM ******
    CREATE SEQUENCE "SEQ_CONCURRENCYTESTITEMS"
    START WITH 1
    CACHE 20
    MAXVALUE 9999999999999999999999999999

    still not comming...
    i have one table each entry is having only one fromdata and one todate only
    i am running below in sql it is showing two rows. ok.
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  '830' and  '850'  and t1.U_frmdate ='20160801'  and  t1.u_todate='20160830'
    in commond promt
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  {?FromEmid} and  {?ToEmid} and t1.U_frmdate ={?FDate} and  t1.u_todate={?TDate}
    still not showing any results..

  • Query not working on BSIS

    SELECT BUKRS HKONT DMBTR FROM BSIS
      INTO  TABLE IT_BSIS
      WHERE HKONT = '511125'
      AND BUKRS = P_VKORG.
    this query not giving any data.. and in bsis table already i found this data..
    if u remove hkont condition it's working fine but with hkont condition giving me 0 data...
    and in table actully data exist for this selection..
    Edited by: Julius Bussche on Sep 10, 2008 10:10 AM

    Hi,
    Check carefully in the BSIS table.
    1. U have to pass the hkont field with leading zeros.
    2. is p_bukrs has some value???
    3. is it p_vkorg or p_bukrs???
    I think second one is causing the problem.
    While executing table u might not be entering BUKRS. But since it is parameter in select query it compares with blank.
    Pass some value to p_bukrs and check. u should get the data.
    another way is instead of parameter declare p_bukrs as below.
    SELECT-OPTIONS so_bukrs FOR bsis-bukrs NO INTERVALS NO-EXTENTION.
    In select query instead of = operator use IN operator
    SELECT .....
    INTO TABLE...
    FROM ...
    WHERE....
    AND bukrs IN so_bukrs.
    Hope it solves ur issue.
    Check this and get back in case of any issues.
    thanks,
    Vinod.

  • OSTC Query Not Showing Correct Percent If Component is Changed

    Hello gurus and experts...here is an interesting question:
    Question:  Why does a query not report proper Sales Tax Code percentage from OSTC table when a component is updated?
    Sales Tax Code (STC) of CA-37B, with a rate of 10.25% is made up of three parts:
    California (CA) State Tax Jurisdiction of "CA" with a rate of 7.00%,
    County Tax Jurisdiction of "CA-37" at a rate of 1.75%,
    City Tax Jurisdiction of "CA-37B" with a rate of 1.50%, and the effective date is set at 31 Dec 2008 (in the past).
    When the City Tax Jurisdiction is changed to 1.00% and date of 31 Dec 2009, the OSTC of CA-37B should be 9.75%.
    However, when a query is run on the OSTC table it strangely reports the old 10.25% (on the Sales Tax Code window it shows correctly as 9.75%).
    Here is the query - very simple...as about as simple as it gets...
    SELECT
    T0.Code,
    T0.Name,
    T0.Rate AS 'Total Tax Percentage',
    T0.Freight AS 'Freight Taxable?'
    FROM OSTC T0
    ORDER BY T0.Code
    IF we go back to the Sales Tax Code Window and change anything (description, one of the components, etc) and hit the update button, then the query reports the correct percentage.
    Am I missing something here?  I would imagine that the system must be doing something and I cannot believe the workaround is just go back and update something in the Sales Tax Code window - there are a ton of updates to do with taxes each year!  Trying to remember which component was updated can cause real confusion.  SAP B1 does a ton of automatic updates all over the system - why would it just be this area of information in OSTC???
    Thanks for reading the post, and many more thanks for your help and suggestions - Zal

    OK - Question Answered - had nothing to do with the query - user did not hit "Update" two times when doing the City Tax Jurisdiction Update...
    I knew SAP would be doing an auto update - has to!!!
    Thanks all - Zal

  • OSD: SCCM 2012 collection which should exclude Windows 7 clients (query not working fine)

    Hi,
    We have an SCCM 2012 collection to which we deploy Windows 7.
    Vista clients get a SCCM 2012 client in SCCM 2007 and once they have it, they get a Windows 7 deployment.
    The group is populated by an AD query and that works fine. However, when we try to exclude Windows 7 machines (query = not Windows NT ... 6.1) the query does not return any result.
    Please advise.
    J.
    Jan Hoedt

    Please check your query. It should be like the following.
    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Version != "6.1.7601"
    Juke Chou
    TechNet Community Support

Maybe you are looking for

  • RH8 importing RH7 project

    When trying to open a RH7 project in RH8 I get the following errors: Error in reading RHFrameStyleMappings.apj file Open Project was cancelled or the application was unable to load database for: PatMob.cpd Any ideas ? Thanks, Tom Whelan eTrainMedia,

  • Is there a way to password protect a single file in numbers?

    Is there a way to passwork protect a single file in Numbers?

  • An unknown error occured (-50).

    A movie I purchased stops downloading almost immediately and the error message above comes up.  The rest of iTunes works properly and my internet connection is fine.  I was downloading numerous TV episodes before and during while this movie was in th

  • [updatedb/mlocate] memory leak[solved]

    Hello, I have a memory leak with updatedb. Do you have the same problems? Is this a known bug? Thanks. ┏━━━┫ root@pc14570 ~ ┣━━━━━━━━━━━━━━━━━━━━ ┗━┫ free -m ; updatedb ;free -m total used free shared buffers cached Mem: 15925 395 15529 47 19 146 -/+

  • Cannot open IPS via IDM

    Issue with IDM access to IPS module To anyone that can assist! I have a situation where I can only connect to via IPS module using the ASA console and opening a session to the module itself. I cannot open an IDM session at all. This device is acting