Select returns negative values for unsigned datatypes in MySQL DB

Hi, I have a table in a MySQL database where some fields are declared as "unsigned".
Example:
CREATE TABLE countries (
Country_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
Number SMALLINT UNSIGNED NOT NULL
My problem is when inside a .xsql file, I try to do a select:
<xsql:query>
select Number from countries where Country_id="15"
</xsql:query>
If inside the Database, Number always goes from 0 to 65535 (UNSIGNED SMALLINT),
the resulting XML of that query will always show negative values if Number is
bigger than 32767 (so it ignores the "UNSIGNED").
Have you seen something like this before? Do you kwno what I'm doing wrong or what
can I do to retrieve the values unsigned?
Thanks a lot!
David

hi muneer
>
We are facing a strange issue in our R12.1.3 Ebiz instance (DB 11.2.0.1) - Solaris Sparc 64 bit - 2 node (1 node Apps, 1 node DB).
Some of the purchase orders are having a negative purchase order number.
SQL> select segment1 from PO_HEADERS_ALL where segment1 < '0';
SEGMENT1
-7951814
-8960847please see
Error: Purchase Order Creation Could Not Be Initiated, But PO Was Created With Negative PO Number And No Distributions [ID 789464.1]     To Bottom     
PO Creation Process Failed In Sourcing And Creates Document With Negative Numbers [ID 1479616.1]
Purchase Order Receipt FAQ (P4312) [ID 1306869.1]
How it could happen. Any suggestions please !looks like a bug
Can a Purchase Order (PO) Be Created With Negative Quantity or Price? [ID 241389.1]
AppsMasti
Sharing is caring

Similar Messages

  • [svn:fx-3.x] 18471: bug fix for 2749575 The API -- mx.messaging.messages. MessagePerformanceUtils; associated attributes/ properties like totalTime are returning negative values

    Revision: 18471
    Revision: 18471
    Author:   [email protected]
    Date:     2010-11-05 10:22:11 -0700 (Fri, 05 Nov 2010)
    Log Message:
    bug fix for 2749575 The API -- mx.messaging.messages.MessagePerformanceUtils; associated attributes/properties like totalTime are returning negative values
    Change adding set method for receive time to avoid it override the value set by detecting it is an OUT infoType
    BlazeDS checkintests pass
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanc eInfo.as

    Dear Pallavi,
    Very useful post!
    I am looking for similar accelerators for
    Software Inventory Accelerator
    Hardware Inventory Accelerator
    Interfaces Inventory
    Customization Assessment Accelerator
    Sizing Tool
    Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
    Request help on such accelerators... Any clues?
    Any reply, help is highly appreciated.
    Regards
    Manish Madhav

  • Negative Values for Stock Quantity in BI

    Dear Experts,
    I have a report based on Inventory Management Multiprovider which is executed to check the Valuated Stock Quantity for single day input entry. ( Valuated Stock Qty is a non cumulative Key figure with Inflow as Quantity Received into Valuated Stock and outflow as Quantity Issued from Valuated Stock )
    So Valuated Stock Qty for a particular day = (Quantity Received into Valuated Stock till that day) - (Quantity Issued from Valuated Stock till that day).  So i think, checking the cube data in BI will not help to resolve the issue.
    Issue: : When I execute the report in BI for some dates I am getting Negative Values for Valuated Stock Quantity which is wrong output.
    Can this issue be resolved by filling set up tables and loading it to BI, say for last month?
    Could you please suggest any other solutions available?
    Also it will be helpful if you could explain what needs to be analyzed in ECC side (with T Codes)
    Thanks in advance
    Vinod

    Hi Vinod,
    try these transactions on the ECC side:
    MMBE to view stock of a material
    MB51 to view all material documents for your selection (i.e. material)
    The business content stock reporting in BW is mainly using datasource 2LIS_03_BF for movements and 2LIS_03_UM for revaluations. For this to work you will have to have all material documents loaded into your cube.
    Also have a look at this How To paper if you haven't yet.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
    Best,
    Ralf

  • Issue with Negative Value for Total valuated stock 0VALSTCKQTY.

    Hi Experts,
    we loaded the Cube with datasources 2LIS_03_BX, 2LIS_03_BF and 2LIS_03_UM.
    We mapped the quanity field from 2LIS_03_BF in transformation either into Key figures "Quantity issued from valuated stock" (0ISSVALSTCK) or "Quantity received into valuated stock" (0RECVALSTCK ) of the cube.
    For obtaining the Total Valuated stock, we used the Key figure 0VALSTCKQTY. This key figure is having the Inflow and Out flow values as 0RECVALSTCK and 0ISSVALSTCK. When i tried to check the content of 0VALSTCKQTY, the key figure  0VALSTCKQTY is not present in the infoCube content. I understood that the value for this key figure would be calculated at the time of query execution with the formula
    { Last obtained Valuated stock + (Received Valuated Stock u2013 Issued Valuated Stock ) }.
    The issue is the first records in the query is obtained with negative value for the total valuated stock 0VALSTCKQTY even though the values of Received Valuated Stock  and  Issued Valuated Stock are with Zero.  Could any one please help me on how the first record in the query is with a negative value eventhough the inflow and out flow fields of it are with Zero.
    Many Thanks in advance.
    Jeswanth

    Hi Srini,
    I observed an interresting reason for the stock being with negative in the first record.
    Issue : While executing the BEx report, we have the first record with a negative value.
    Let me explain with an example
    Material  : XYZ
    Plant      : A
    Date of Stock Initialization for data source 2LIS_03_BX -
    >  12th April 2009.
    So on 12 Th April 2009 consider that we have a stock in store with a value of 2640.
    Then we have loaded wih Data source 2LIS_03_BF for all Historic Movement types.
    At the time of query execution we will have the first record with a negative of available stock present on the day of initialization .
    So, as we have initilized the data source 2LIS_03_BX on 12 th April 2009, we have at that time a stock of 2640 in availability.
    Exactly with the same value of 2640, we are having a negative value i.e. -2640.
    and also one more point to be noted is ...as we have initialized the data source 2LIS_03_BX on 12 th APril 2009...it has created a
    opening balance of 2640 on the day of initiailization i.e on 12 th April 2009 in infocube....(which is an extra record...)...so if the previous record of 12,04,2009 is having some value in it..then it will get added to 2640 EA..which will give incorrect stock
    So in the query the records will appear in the below following manner
    Calendar Day     Total stock                                                                Received stock                                          Issued Stock         
    28.12.2005 --->  - 2640 EA
    29.12.2005 --->    2000 EA                                                                       640 EA                                                        0
    10.04.2009 --->      0                                                                                0                                                               2000 EA      
    11.04.2009 -
    >    0                                                                                0                                                                0          
                                 (For making
                                  the earlier record of  initilization to 0  a negative value -2640 EA is created in the first record )
    12.04.2009 (Initializtion day) --->  2640 EA                                                 0                                                                0
    13.04.2009 
    the day before initialization the total stock will be 0 due to the negative effect introduced by the first record and from the day of initialization the records will be the accurate values...  On 12 th april 2009 we can see that a stock of 2640 is brought into the total stock. In fact if there is no negative value i.e. -2640 in the first record then ...the value on 11.04.2009 will be 2640 Ea and this will get summed up with the Opening balance of 2640 EA created by 2LIS_03_BX on the day of intitialization. So on 12 .04. 2009 the total stock will be shown as 5280 EA...so in order to prevent the double value only we observed that the first record is created with the negative of available stock present on the initialization ...to make the record before the day of initialization i.e. 11.04.2009...to be 0...so that from 12 th April 2009 ..will start to see the actual total stock in the query result...
    This is happening only if we use  both the data sources 2LIS_03_BX and 2LIS_03_BF  for loading into BW.....
    If we load alone by 2LIS_03_BF ...then as 2LIS_03_BX is ruled out in the loading...then no negative of available stock will be created ...because there will be bno opening balance created on the day of initialization.....and the opeing balance available will be flowing into consecutive records due to the movement types and 12 th April 2009 will be shown with avaialable total stock of 2640 EA.
    Kindly let us know your opinions on this...
    Thanks.
    regards,
    Jeswanth

  • PercentLoaded returns negative value

    Hi there,
    I use some javascript on the website I'm working on to check if a swf file is loaded. I use the PercentLoaded method like explained here How should I judge that the flash has been loaded completed
    It works well except that sometimes the file loads until 50-70% and then PercentLoaded starts to return negative values. This seems to only happen with really large swf files, usually bigger than 30MB.
    Is there a reason to that? Is it a known issue? Is there a workaround?
    Thanks!

    Hello!
    We have the same issue.
    In our case the swf that is returning a negative value is 20Mb.
    Any solution/workaround?
    Thanks!

  • SQL-Developer  4.0.0.13.80 Bug? No negative values for axis scale accepted

    I reported this problem already for the versions EA1 and EA2 of SQL-Developer 4 (4.0EA1 No negative values for axis scales in diagrams) but it still exists in 4.0.0.13.80:  Even if it is now possible to define the minimum and maximum values for the y-axis of a diagram, I found no way to enter negative values for the minimum value. Neither -100 nor (100) is accepted. The value always switches to 0. I have a report which shows values from -97 to 387. Automatic scaling sets the y-axis from -200 to 500 but I would prefer a scale from -100 to 400. How is this possible?
    btw.: the German translation for "scale" in the diagram settings is bad. It is translated with "Nachkommastellen" but it should be "Skalierung".

    In 4.0EA2 this topic is still not fixed.

  • FPGA returning negative values

    Hello,
     I have a question regarding an FPGA program,
    the following attachments show the files and configuration I have been working on. When the laser light falls on the detector , the ADC converts to its values and gives me the output. And it returns positive values.
    Everything was working fine and now it seems the opposite. When light falls on the detector it returns negative values and when there is less/no light, I get positive values.
    I have no idea. why this is happening. Please advise.
    PS : I can provide the program if necessary.
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    configuration.ppt ‏123 KB

    What changed when this started happening?  Did you modify your experiment at all?
    In my opinion the most likely situation is that the positive and negative analog inputs got swapped - is that possible?  Are the wires somewhere that someone could have bumped them, and then plugged them back in to make it look like nothing happened but reversed them?

  • Will a sequence return same value for two different sessions?

    Is there a possibility that a sequence will return same value to two different sessions when it is referred exactly at the same instance of time?

    @Justin... Thanks for your insight; indeed, we too feel this shouldn't ever happen and never heard of it either, but there it is. (No, we haven't logged a TAR yet -- whatever that is -- partly because it didn't occur to us and partly because we only recently came across the issue and sensibly want to do some testing before we cry foul.)
    However, the code is pretty straight-forward, much like this (inside a FOR EACH ROW trigger body):
    SELECT <seqname>.NEXTVAL INTO <keyvar> FROM DUAL;
    INSERT INTO <tblname> (<keyfield>, <... some other fields>)
    VALUES(<keyvar>, <... some other values> );
    (where <tblname> is NOT the table on which the trigger is fired). This is the only place where the sequence is ever accessed. The sequence state is way below its limits (either MAXVALUE or <keyfield>/<keyvar> datatype size).
    In this setup, end users sometimes got an out-of-the-blue SQL error to the effect that uniqueness constraint has been violated -- as I said, we used to have a unique index on <keyfield> -- which leads us to assume that the sequence generated a duplicate key (only way for the constraint to be violated, AFAIK). We released the constraint and indeed, using a simple SELECT <keyfield>, COUNT(*) FROM <tblname> GROUP BY <keyfield> HAVING COUNT(*)>1 got us some results.
    Unfortunately, the <tblname> table gets regularly purged by a consumer process so it's hard to trace; now we created a logger trigger, on <tblname> this time, which tracks cases of duplicate <keyfield> inserts... We'll see how it goes.
    @Laurent... winks at the CYCLE thing Our sequence is (needless to say) declared as NOCYCLE and the datatype is large enough to hold MAXVALUE.

  • Return multiple values for the popup LOV

    Hi folks,
    I have one challange. I have a search engine and there is an popup lov and its having three Display and 3 Retun value such as
    select
    p.A || ', ' || pi.B|| ', ' || km.C|| ' ' d, p.A || ', ' || pi.B|| ', ' || km.C|| ' ' r
    from tableA km,tableB p,tableC pi
    where km.col1=p.id and km.col1=pi.id and km.C is not null
    when i click on the pop lov it will display 3 values shuch as SAP+DBA+HR and in popup lov iteam its will return 3 values
    such as SAP+DBA+HR this return values are from 3 cloumn names from same table ie. A column, B column, C column
    and when i click on submit button this return values from 3 columns values should assign to the 3 column such as
    A=SAP, B=DBA and C=HR and search fetchs the result in a Report.
    Its some thing new, is it possible..:)
    ok will be waiting for your reply..:D
    Regards,
    Suri
    Edited by: user634694 on Feb 25, 2009 3:14 AM

    Hi Varad,
    am facing problems i wrote dynamic sql its working fine for 2 and 3 fields like (SAP+ORCL) and (SAP+ORCL+HRA) but for the single value like SAP the results are not comming properly. my code is
    If (:P25_TEST Is not Null ) THEN
    V_Sql := V_Sql||q'!
    And
    (multipleInstr1(R.Pillar,:P25_TEST)&gt;0 )
    or INSTR ( '+' || Upper(:P25_TEST) || '+', Upper(R.Pillar))&gt;0 ) and
    ((multipleInstr1(R.Product_Line,:P25_TEST)&gt;0 )
    or INSTR ( '+' || Upper(:P25_TEST) || '+', Upper(R.Product_Line))&gt;0) and
    ((multipleInstr1(R.Category,:P25_TEST)&gt;0 ) or (R.Category is null)
    or INSTR ( '+' || Upper(:P25_TEST) || '+', Upper(R.Category))&gt;0 )
    End If;
    where multipleInstr1 is a function created to search results even its delimited by '+' it ignors '+' delimiter and
    :p25_test is the popup iteam which takes values like SAP+ORCL+HRA or SAP+ORCL or SAP how its possible to get this results.
    Its turning too complicated for cheking condetion for a single popup iteam, can we get any solution for this or not..
    Hope will do respond
    Thanks and Regards,
    Suri

  • FileInputStream.read returning negative values

    I'm trying to read binary data from a file and convert it to decimal. If I use a hex editor, through one section, I'll see the values as they actually are. Using read() on a FileInputStream object seems to randomly create negative values which are sometimes correct if I use Math.abs(), and sometimes theyre not. I don't have a clue what's going on and it's getting frustrating, as FileInputStream.read() supposedly returns an integer between 0 ane 255, which is what I'm expecting.
    Thanks for the help!

    Are you doing something like this...
    byte value = in.read();
    int useIt = value;If the value is being stored in a byte and then cast to an int, the sign bit will be extended and it will become negative. This is because a java byte is actualy +/- 127.
    To solve it, you do this..
    int useIt = value & 0xff;or never store it as a byte in the first place.
    This is what you have to do when reading bytes out of byte arrays...
    int useIt = byteArray[index] & 0xff;

  • Java returning incorrect values for width and height of a Tiff image

    I have some TIFF images (sorry, I cannot post them b/c of there confidential nature) that are returning the incorrect values for the width and height. I am using Image.getWidth(null) and have tried the relevant methods from BufferedImage. When I open the same files in external viewers (Irfanview, MS Office Document Imaging) they look fine and report the "correct" dimensions. When I re-save the files, my code works fine. Obviously, there is something wrong with the files, but why would the Java code fail and not the external viewers? Is there some way I can detect file problems?
    Here is the code, the relevant section is in the print() routine.
    * ImagePrinter.java
    * Created on Feb 27, 2008
    * Created by tso1207
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.print.PageFormat;
    import java.awt.print.PrinterException;
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.FileImageInputStream;
    import javax.imageio.stream.ImageInputStream;
    import com.shelter.io.FileTypeIdentifier;
    public class ImagePrinter extends FilePrintable
       private final ImageReader _reader;
       private final int _pageCount;
       private final boolean _isTiff;
       //for speed we will hold current page info in memory
       private Image _image = null;
       private int _imgWidth = 0;
       private int _imgHeight = 0;
       private int _currentPage = -1;
       public ImagePrinter(File imageFile) throws IOException
          super(imageFile);
          ImageInputStream fis = new FileImageInputStream(getFile());
          Iterator readerIter = ImageIO.getImageReaders(fis);
          ImageReader reader = null;
          while (readerIter.hasNext())
             reader = (ImageReader) readerIter.next();
          reader.setInput(fis);
          _reader = reader;
          int pageCount = 1;
          String mimeType = FileTypeIdentifier.getMimeType(imageFile, true);
          if (mimeType.equalsIgnoreCase("image/tiff"))
             _isTiff = true;
             pageCount = reader.getNumImages(true);
          else
             _isTiff = false;
          _pageCount = pageCount;
       public int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex)
          throws java.awt.print.PrinterException
          int drawX = 0, drawY = 0;
          double scaleRatio = 1;
          if (getCurrentPage() != (pageIndex - getPageOffset()))
             try
                setCurrentPage(pageIndex - getPageOffset());
                setImage(_reader.read(getCurrentPage()));
                setImgWidth(getImage().getWidth(null));
                setImgHeight(getImage().getHeight(null));
             catch (IndexOutOfBoundsException e)
                return NO_SUCH_PAGE;
             catch (IOException e)
                throw new PrinterException(e.getLocalizedMessage());
             if (!_isTiff && getImgWidth() > getImgHeight())
                pf.setOrientation(PageFormat.LANDSCAPE);
             else
                pf.setOrientation(PageFormat.PORTRAIT);
          Graphics2D g2 = (Graphics2D) g;
          g2.translate(pf.getImageableX(), pf.getImageableY());
          g2.setClip(0, 0, (int) pf.getImageableWidth(), (int) pf.getImageableHeight());
          scaleRatio =
             (double) ((getImgWidth() > getImgHeight())
                ? (pf.getImageableWidth() / getImgWidth())
                : (pf.getImageableHeight() / getImgHeight()));
          //check the scale ratio to make sure that we will not write something off the page
          if ((getImgWidth() * scaleRatio) > pf.getImageableWidth())
             scaleRatio = (pf.getImageableWidth() / getImgWidth());
          else if ((getImgHeight() * scaleRatio) > pf.getImageableHeight())
             scaleRatio = (pf.getImageableHeight() / getImgHeight());
          int drawWidth = getImgWidth();
          int drawHeight = getImgHeight();
          //center image
          if (scaleRatio < 1)
             drawX = (int) ((pf.getImageableWidth() - (getImgWidth() * scaleRatio)) / 2);
             drawY = (int) ((pf.getImageableHeight() - (getImgHeight() * scaleRatio)) / 2);
             drawWidth = (int) (getImgWidth() * scaleRatio);
             drawHeight = (int) (getImgHeight() * scaleRatio);
          else
             drawX = (int) (pf.getImageableWidth() - getImgWidth()) / 2;
             drawY = (int) (pf.getImageableHeight() - getImgHeight()) / 2;
          g2.drawImage(getImage(), drawX, drawY, drawWidth, drawHeight, null);
          g2.dispose();
          return PAGE_EXISTS;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since version XXX
        * @return
       public int getPageCount()
          return _pageCount;
       public void destroy()
          setImage(null);
          try
             _reader.reset();
             _reader.dispose();
          catch (Exception e)
          System.gc();
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public Image getImage()
          return _image;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getImgHeight()
          return _imgHeight;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getImgWidth()
          return _imgWidth;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param image
       public void setImage(Image image)
          _image = image;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setImgHeight(int i)
          _imgHeight = i;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setImgWidth(int i)
          _imgWidth = i;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @return
       public int getCurrentPage()
          return _currentPage;
        * <br><br>
        * Created By: TSO1207 - John Loyd
        * @since Mar 25, 2008
        * @param i
       public void setCurrentPage(int i)
          _currentPage = i;
    }Edited by: jloyd01 on Jul 3, 2008 8:26 AM

    Figured it out. The files have a different vertical and horizontal resolutions. In this case the horizontal resolution is 200 DPI and the vertical is 100 DPI. The imgage width and height values are based on those resolution values. I wrote a section of code to take care of the problem (at least for TIFF 6.0)
       private void setPageSize(int pageNum) throws IOException
          IIOMetadata imageMetadata = _reader.getImageMetadata(pageNum);
          //Get the IFD (Image File Directory) which is the root of all the tags
          //for this image. From here we can get all the tags in the image.
          TIFFDirectory ifd = TIFFDirectory.createFromMetadata(imageMetadata);
          double xPixles = ifd.getTIFFField(256).getAsDouble(0);
          double yPixles = ifd.getTIFFField(257).getAsDouble(0);
          double xRes = ifd.getTIFFField(282).getAsDouble(0);
          double yres = ifd.getTIFFField(283).getAsDouble(0);
          int resUnits = ifd.getTIFFField(296).getAsInt(0);
          double imageWidth = xPixles / xRes;
          double imageHeight = yPixles / yres;
          //if units are in CM convert ot inches
          if (resUnits == 3)
             imageWidth = imageWidth * 0.3937;
             imageHeight = imageHeight * 0.3937;
          //convert to pixles in 72 DPI
          imageWidth = imageWidth * 72;
          imageHeight = imageHeight * 72;
          setImgWidth((int) Math.round(imageWidth));
          setImgHeight((int) Math.round(imageHeight));
          setImgAspectRatio(imageWidth / imageHeight);
       }

  • SCCM 2012 Reporting Code Returns Same Value For Total Number Of Required Updates Per Computer

    I'm trying to make a custom report in SCCM 2012 R2 with SQL 2012 since Microsoft took out the ability to list the number of updates needed per computer. This was in WSUS reporting but is not in SCCM reporting. I've made a custom report for this but can't
    quite get it to work. The report runs but the same value for total number of updates needed shows up for every computer. I took a query from one report and am trying to get it to run inside the select statement from another report. Here is the code as it is
    right now:
    declare @CI_ID int; select @CI_ID=CI_ID from fn_rbac_ConfigurationItems(@UserSIDs)  where CIType_ID=9 and CI_UniqueID=@AuthListID
              declare @StateID int
              select @StateID=StateID from fn_rbac_StateNames(@UserSIDs)  sn where sn.StateName=@StateName and TopicType=300
              declare @RequiredUpdateCount int
              select @RequiredUpdateCount=Count(v_StateNames.Statename) from   
    v_StateNames,   
    v_Update_ComplianceStatusAll   
    Inner Join v_R_System On (v_R_System.ResourceID = v_Update_ComplianceStatusAll.ResourceID)   
    Inner Join v_UpdateInfo On (v_UpdateInfo.CI_ID = v_Update_ComplianceStatusAll.CI_ID)   
    where   
    v_StateNames.TopicType = 500 and   
    v_StateNames.StateID = v_Update_ComplianceStatusAll.Status and   
    v_StateNames.Statename = 'Update is required'   
    Group By v_R_System.Name0
              select
                ccm.ResourceID,
                rs.Name0+isnull('.'+rs.Resource_Domain_or_Workgr0, '') as MachineName,
                rs.User_Domain0+'\'+User_Name0 as LastLoggedOnUser,
                asite.SMS_Assigned_Sites0 as AssignedSite,
                rs.Client_Version0 as ClientVersion,
    @RequiredUpdateCount as RequiredUpdates  
              from fn_rbac_ClientCollectionMembers(@UserSIDs)  ccm
              join fn_rbac_Update_ComplianceStatusAll(@UserSIDs)  cs on cs.CI_ID=@CI_ID and cs.ResourceID=ccm.ResourceID
                and (@StateID=0 and cs.Status=0 or @StateID=1 and cs.Status in (1,3) or @StateID=2 and cs.Status=2)
              join fn_rbac_R_System(@UserSIDs)  rs on rs.ResourceID = ccm.ResourceID
              left join fn_rbac_RA_System_SMSAssignedSites(@UserSIDs)  asite on asite.ResourceID = ccm.ResourceID
              where ccm.CollectionID=@CollID
              order by MachineName
    Ben JohnsonWY

    There's plenty wrong with it. It gives you no idea of how many patches each box needs. Then you have to click on each computer, click the sort arrow by the "required" column, and count the number needed. When you have hundreds of computers to work on this
    is a big deal as it's very time consuming. What's great about the view in WSUS that had this is that it listed this for you and you could sort the required column. So if have most computers needing 2 patches, you can go find the one that needs 40 and 150 (to
    over exaggerate) and put the time on them needed to see why they're so far behind. The WSUS format was quick, easy, and informative. SCCM makes getting this info a royal PITA which is why I'm (and many others) so royally peeved at MicroShaft for removing this
    functionality, but that's what we've all come to expect from MicroShaft--just like when then took the nice colorful themes out of Office 2010 and replaced them in Office 2013 with just white, gray, and a darker gray. That's super boring and actually hurts
    my eyes.
    Ben JohnsonWY

  • Hi how will get subquery returns multiple values for main query

    Hi all ;
    here i given one sql query
    1)select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '|| initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b.name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100;
    if i run this above query returning multiple values depend on sa.mgr values.
    like output coming like this
    yes:2000-anbarasan
    yes:2700-anb
    yes:2000-rasan
    yes:2807-anbarasan
    yes:2700-anbanu
    yes:2000-null
    2) this sub query i am passing with main query
    select sa.mgrid,sa.sal,(select decode(a.FLG,'Y','yes','N','no','null')||'] '||a.p_type||' : '||
    initcap(replace(substr(b.mgr,0,instr(b.mgr,'@')-1),'.',' '))||' - '||
    b .name||' ('|| substr(a.name,0,instr(a.name,'-')-1)||')'
    from table1 a
    join table3 c on c.emptype = a.emptype
    left outer join table2 b on a.name = b.name
    where a.mgrid = 100)" test " from table4 sa,table5 te ,table6 ft where sa.id(+)=te.id and sa.mgr=ft.mgr;
    my final out put required like this:
    mgrid sal test
    100 20000 yes:2000-anbarasan
    yes:2700-anb
    yes:2000-rasan
    yes:2807-anbarasan
    yes:2700-anbanu
    yes:2000-null
    but i am getting erro:
    1)missing paranths
    2)single row subquery return more then one row.
    hi kindly give me answer to me as soon as possible
    Edited by: anbarasan on Sep 29, 2008 9:48 PM

    I refuse to read all of that code and guess what error message you are getting. Apparently others feel the same way.
    Run the final SQL statement and then cut and paste the code and full error statement into a post.
    Also include your full version number to three decimal places.
    My refusal is not an unwillingness to help you but rather an unwillingness to spend 10 minutes reconstructing what you could have pasted in in a fraction of a second. We are all volunteers here and there are many people that need help. I hope you understand.

  • Qry return same value for a particular column for each row but not all time

    hi,
    We recently migrated to Oracle Database 10.2.0.3.0 from 9i. We were using a sql to populate a table and it had been running fine. After migration the same sql is fetching / population incorrect values, but not everytime. If we run the same sql again it gives a correct result.
    Ex:
    insert into a1 ( col1, col2, col3 )
    select a.field1, b.field2, c.field
    from tab1 a, tab2 b, tab3 c
    where a.field = b.field
    and b.field (+) = c.field
    something like this. Let us assume it fetches 200 rows
    But sometimes the col1 has the same value for all the 200 rows and col2, col3 has correct values. If we run the same sql next time, the col1 fetches the correct value and everything is correct.
    Could someone help on the above issue.

    I know it's difficult but can you put together a small test case for us to reproduce this behaviour? Did you contact Oracle Support?
    Any special constructs used behind the scenes? Virtual private database? Views?Materialized Views? Anything else?

  • Authorization check for Selection of Filter Values for Query Definition

    I am looking for a solution to the following problem:
    Assuming you have confidential master data in your development system.
    How can I protect a query developer to see only master data values, that he is allowed to see when e.g. creating a restricted key figure.
    I know that you can enable a setting in the "Business Explorer" tab that says "Query Def. Filter Value Selection". The help says:
    This field describes how the selection of filter values and the restriction of characteristics function when you define queries.
    The values from the master data table are normally displayed when you restrict characteristics. For characteristics without a master data table, the values from the SID table are displayed instead. In a number of cases, however, it could be better to display only the values that are in the InfoProvider. The setting "InfoProvider Values Only" is permitted for this reason.
    This would almost do it, but it can be overwritten in the BEx Query Designer.
    Is there a way of preventing Query Developers from seeing all InfoObject values when creating restricted key figures?
    Thanks for your replies.

    Hi,
    Thanks for the points. I am not too sure how you guys go about implementing SAP. Sorry I am not trying to be rude but you're not suppose to see any "real" data in DEV where all development takes place. You can't prevent query developers to see data. Without data there is no way they know their queries are right or wrong. Ask ECC guys to load dummy data to DEV environment that closely resemble those data currently in legacy e.g. real data. Sorry it was my mistake at the beginning when i thought it was preventing specific end users to see data that are not belong to them.

Maybe you are looking for

  • LSMW Background schedule

    Dear friends, How i can schedule LSMW to process in background for a particular time. Regards, Praveen Lobo

  • Exposure control errors when recording videos with...

    I noticed that when I record videos, the exposure sometimes is not adjusted properly. If lighting conditions change, exposure remains at the same level, and records became over or underexposed. This is especially noticeable outdoors. I have a few min

  • Issue with Teradata access from Business Objects AIX Machine

    Hi, I am using BO  XI.31 which is installed on AIX 5.3 machine. I have installed Teradata driver on the machine and I have created the require ODBC.ini entry to point Teradata database. While refreshing the report I am getting below error message. A

  • Get error 403 when trying to download from MAS

    Hi! When I'm trying to download any program from MAS, I get 403 error. The same with update. App Store for iOS works fine. I tried: - reboot - reinstall MAS - different account - hide with tor - change password - change language Using 10.6.6 with all

  • Will Gnome 3 be compatible with OSS4 eventually?

    As the title asks, I'm curious if Gnome 3 will be moved into the stable repository while it is still dependent on pulseaudio. I really cannot stand pulseaudio as I keep having trouble with it whereas OSS seemed to just work for me. Are there plans to