Search Results

Search found 7 results on 1 pages for 'sor'.

Page 1/1 | 1 

  • Aggregate Functions and Group By Problems

    - by David Stein
    If we start with the following simple SQL statement which works. SELECT sor.FPARTNO, sum(sor.FUNETPRICE) FROM sorels sor GROUP BY sor.FPARTNO FPartNo is the part number and the Funetprice is obviously the net price. The user also wants the description and this causes a problem. If I follow up with this: SELECT sor.FPARTNO, sor.fdesc, sum(sor.FUNETPRICE) FROM sorels sor GROUP BY sor.FPARTNO, sor.fdesc If there are multiple variations of the description for that part number, typically very small variations in the text, then I don't actually aggregate on the part number. Make sense? I'm sure this must be simple. How can I return the first fdesc that corresponds to the part number? Any of the description variations would suffice as they are almost entirely identical. Edit: The description is a text field.

    Read the article

  • Make an array of two.

    - by marharépa
    Hello! I'd like to make an array which tells my site's pages where to show in PHP. In $sor["site_id"] i've got two or four chars-lenght strings. example: 23, 42, 13, 1 In my other array (called to $pages_show) i want to give all the site_ids to an other id. $parancs="SELECT * FROM pages ORDER BY id"; $eredmeny=mysql_query($parancs) or die("Hibás SQL:".$parancs); while($sor=mysql_fetch_array($eredmeny)) { $pages[]=array( "id"=>$sor["id"], "name"=>$sor["name"], "title"=>$sor["title"], "description"=>$sor["description"], "keywords"=>$sor["keywords"] ); // this makes my pages array with the information about that page. $shower = explode(", ",$sor["site_id"]); // this is explode my site_id $pages_show[]=array( "id"=>$sor["id"], "where"=>$shower //to 'where' i want to put all the explode's elements one-by-one, to get the result like down ); This script gives me the following result: Array (3) 0 => Array (2) id => "29" where => Array (2) 0 => "17" 1 => "16" 1 => Array (2) id => "30" where => Array (1) 0 => "17" 2 => Array (2) id => "31" where => Array (1) 0 => "17" But in this case I'd like to be this: Array (4) 0 => Array (2) id => "29" where => "17" 1 => Array (2) id => "29" where => "16" 2 => Array (2) id => "30" where => "17" 3 => Array (2) id => "31" where => "17" Thanks for your help.

    Read the article

  • Oracle NoSQL könyv ingyen

    - by Lajos Sarecz
    Ritkán fordul elo, hogy ingyenesen érheto el egy Oracle Press könyv, de erre most sor került. Ingyenesen letöltheto a  Getting Started with Oracle NoSQL Database könyv az Oracle Press oldaláról.  A könyv az alábbi fejezeteket tartalmazza: Overview of Oracle NoSQL Database and Big Data Introducing Oracle NoSQL Database Oracle NoSQL Database Architecture Oracle NoSQL Database Installation and Configuration Getting Started with Oracle NoSQL Database Development Reading and Writing Data Advanced Programming Concepts: Avro Schemas and Bindings Capacity Planning and Sizing Advanced Topics Fontos infó, hogy iPad-en iBooks-ban megnyitva a teljes könyvet le kell tölteni. Sajnos nem számíthatunk túl gyors letöltésre, noha csupán 71 oldalas könyvrol van szó.

    Read the article

  • load multiple directions in parallel in google map

    - by Maneesh
    My aim is to get distance between many locations thru GDirection object. Since I am using multiple objects, am not able to get distnace. Can someone help me out. Below is the code. for(ct=0;ct<size;ct++) { var gd=new GDirections(); gd.load("from: " + address + " to: " + offaddress[ct]); GEvent.addListener(directions,"load", function() { sor[ct]= gd.getDistance().html; }

    Read the article

  • Tömörítés becslése - Compression Advisor

    - by lsarecz
    Az Oracle Database 11g verziójától már OLTP adatbázisok is hatékonyan tömöríthetok az Advanced Compression funkcióval. Nem csak a tárolandó adatok mennyisége csökken ezáltal felére, vagy akár negyedére, de az adatbázis teljesítménye is javulhat, amennyiben I/O korlátos a rendszer (és általában az). Hogy pontosan mekkora tömörítés várható az Advanced Compression bevezetésével, az kiválóan becsülheto a Compression Advisor eszközzel. Ez nem csak az OLTP tömörítés mértékét, de 11gR2 verziótól kezdve a HCC tömörítés arányát is becsülni tudja, amely Exadata Database Machine, Pillar Axiom illetve ZFS Storage alkalmazásával érheto el. A HCC tömörítés becsléséhez csak 11gR2 adatbázisra van szükség, nem kell hozzá a speciális célhardver (Exadata, Pillar, ZFS). A Compression Advisor valójában a DBMS_COMPRESSION package használatával érheto el. A package-hez tartozik 6 konstans, amellyel a kívánt tömörítési szintek választhatók ki: Constant Type Value Description COMP_NOCOMPRESS NUMBER 1 No compression COMP_FOR_OLTP NUMBER 2 OLTP compression COMP_FOR_QUERY_HIGH NUMBER 4 High compression level for query operations COMP_FOR_QUERY_LOW NUMBER 8 Low compression level for query operations COMP_FOR_ARCHIVE_HIGH NUMBER 16 High compression level for archive operations COMP_FOR_ARCHIVE_LOW NUMBER 32 Low compression level for archive operations A GET_COMPRESSION_RATIO tárolt eljárás elemzi a tömöríteni kívánt táblát. Mindig csak egy táblát, vagy opcionálisan annak egy partícióját tudja elemezni úgy, hogy a tábláról készít egy másolatot egy külön erre a célra kijelölt/létrehozott táblatérre. Amennyiben az elemzést egyszerre több tömörítési szintre futtatjuk, úgy a tábláról annyi másolatot készít. A jó közelítésu becslés (+-5%) feltétele, hogy táblánként/partíciónként minimum 1 millió sor legyen. 11gR1 esetében még a DBMS_COMP_ADVISOR csomag GET_RATIO eljárása volt használatos, de ez még nem támogatta a HCC becslést. Érdemes még megnézni és kipróbálni a Tyler Muth blogjában publikált formázó eszközt, amivel a compression advisor kimenete alakítható jól értelmezheto formátumúvá. Végül összegezném mit is tartalmaz az Advanced Compression opció, mivel gyakran nem világos a felhasználóknak miért kell fizetni: Data Guard Network Compression Data Pump Compression (COMPRESSION=METADATA_ONLY does not require the Advanced Compression option) Multiple RMAN Compression Levels (RMAN DEFAULT COMPRESS does not require the Advanced Compression option) OLTP Table Compression SecureFiles Compression and Deduplication Ez alapján RMAN esetében például a default compression (BZIP2) szint ingyen használható, viszont az új ZLIB Advanced Compression opciót igényel. A ZLIB hatékonyabban használja a CPU-t, azaz jóval gyorsabb, viszont kisebb tömörítési arány érheto el vele.

    Read the article

  • xsl key - multiple levels for an element

    - by user1004770
    My previous post was not very meaningful. reposting here. What i am looking for is the QueueManager element, under SORRegion name="default"(which is the parent), within inan.xml. I have used xsl key. In my xsl the value 'default' is hardcoded. here is the xsl i used <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output omit-xml-declaration="yes" indent="yes" method="xml" /> <xsl:key name="CR-lookup" match="Service" use="concat(@ServiceName, '+', SOR/@SORname, '+', */CountryCode/@Ctrycd, '+', */*/SORRegion/@name, '+', */*/*/ConsumerName/@name)"/> <xsl:variable name="CRTable" select="document('inan.xml')"/> <xsl:template match="/"> <Contributor> <ContributorRole> <xsl:for-each select="$CRTable"> <!-- change context document --> <xsl:for-each select="key('CR-lookup', concat('StatementIndicatorsService', '+', 'Globestar', '+', '124', '+', 'default', '+', 'MYCA'))"> <a> <xsl:value-of select="*/*/*/*/QueueManager"/> </a> </xsl:for-each> </xsl:for-each> </ContributorRole> </Contributor> </xsl:template> </xsl:stylesheet> any input xml file is fine. here is my actual output <Contributor> <ContributorRole /> </Contributor> expected output <Contributor> <ContributorRole> <a>MAO1</a> </ContributorRole> </Contributor> inan.xml document <RoutingDetails> <Service ServiceName="StatementIndicatorsService"> <SOR SORname="Globestar"> <CountryCode Ctrycd="124"> <SORRegion name="Test"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146B</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146C</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="default"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKBX1"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKAX4"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO204.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKEX7"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO247.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> </CountryCode> <CountryCode Ctrycd="826"> <SORRegion name="Test"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="default"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKBX1"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKAX4"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO204.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKEX7"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA1146A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA1146A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO247.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> </CountryCode> <CountryCode Ctrycd="724"> <SORRegion name="Test"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO239.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="default"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO239.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKBX1"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.ICS.DP.DHIPO211.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKAX4"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO204.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> <SORRegion name="CICDKEX7"> <ConsumerName name="MYCA"> <AutomationIds> <PreAutoId> <AutomationId>XA4248A</AutomationId> <AutomationId>XA1146A</AutomationId> </PreAutoId> <DefaultAutoId> <AutomationId>XA4248A</AutomationId> </DefaultAutoId> </AutomationIds> </ConsumerName> <QueueDetails> <QueueManager>MAO1</QueueManager> <ReplyQueueManager>MAO1</ReplyQueueManager> <RequestQueue>GSTAR.GDAS.DHIPO247.REQUEST</RequestQueue> <ReplyQueue>ICS.DP.REPLY</ReplyQueue> </QueueDetails> </SORRegion> </CountryCode> </SOR> </Service> </RoutingDetails>

    Read the article

1