Simplest way to get count

What is the simplest way to record a count of hits to a Web
page that is platform-independent, secure and client-friendly?

DECLARE
  CURSOR c_tablename IS
    SELECT table_name FROM user_tables WHERE table_name = 'EDI_850_HDR';
  v_count     NUMBER := NULL;
BEGIN
  FOR r_tablename IN c_tablename
  LOOP
    EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || r_tablename.table_name
      INTO v_count;
    DBMS_OUTPUT.put_line('v_tablename : ' || v_tablename || ' : count : ' ||
                         v_count);
  END LOOP;
END;

Similar Messages

  • What is the simplest  way to get a xml-file from 10g R2 -database ?

    Hi,
    I'm new in xml, there are so many tools to work with xml:
    what is the simplest way to get a xml-file from 10g R2 -database ?
    I have : 10g R2 and a xsd.file to describe the xml-structure
    thank you
    Norbert

    There is no automatic way to generate XML documents from an arbitary set of relational tables using the information contained in an XML Schema. Typically the easiest way to generate XML from relational data is to use the SQL/XML operators (XMLElement, XMLAGG, XMLAttribtues, XMLForest). There are many examples of using these operators in the forums You can validate the generated XML against the XML Schema by registering the XML Schema with XML DB and then using the XMLType.SchemaValidate() method

  • The simplest way to get a line chart

    Hi there. Could You tell me what's the simplest way to get such effect as below:
    http://docs.xuiframework.com/xchart/images/lineChart.jpg
    A piece of code would be very helpful. I'm not thinking of GFW_PRES_SHOW FModule, because it has limitations 32 data elements whilst I need more than 32.
    I'd be very thankful for suggestions. Greetings.

    Amitava De
    I need to put chart into screen container
    a®s
    Unfortunately not

  • What is the simplest way to get video from mini DV tapes into computer

    My computer has no firewire connection. What is the simplest way to get the video from my camera (JVC GR-D340EK) ?

    Mikeathome
    Thanks for the reply.
    The reason that I asked if this was a one time thing or not was related to my thoughts about asking you to look at the relative costs of have the DV data capture firewire done professional or by a friend versus going through looking for slots on your computer for a firewire card or purchasing a computer that still comes with a firewire port.
    We will be watching for further developments.
    Thanks.
    ATR

  • [Solved]Simplest way to get PPPoE working.

    I'm building a computer for my grandfather and he'll be using Bell which provides DSL internet. I don't use Bell at my home so I can't test if it'll connect before I take it over. So what is the simplest way to get PPPoE working?
    Also is it possible to install only OpenOffice Writer and not the other stuff?
    Last edited by jordanwb (2008-12-17 18:00:40)

    a) Install the pppoe pkg and then run pppoe-setup.
    b) Afaik no. Use Abiword instead.

  • EFFECIENT WAY OF GETTING COUNT

    Hi All,
    I have a table with millions of records with approximately 50-60 thousand new records being inserted everyday.
    There is a DATE(RUN_DATE) field where the in which current days date is populated when records are being inserted.
    Please let me know an effecient and optimized way of getting a count of the records that are being inserted.
    Currently I am taking a count on TRUNC(RUN_DATE) = TRUNC(SYSDATE) which is not optimized and taking a lot of time.
    Please suggest an efficient way of taking the count.
    Thanks & Regards.

    >
    I have a table with millions of records with approximately 50-60 thousand new records being inserted everyday.
    There is a DATE(RUN_DATE) field where the in which current days date is populated when records are being inserted.
    Please let me know an effecient and optimized way of getting a count of the records that are being inserted.
    >
    What process are you using to insert those records? SQL*Loader? External Table? PL/SQL? Other?
    The best time to get the count of inserted records is when the records are first inserted.
    Modify the load process that inserts the records to capture the count.
    If you use sql*loader or external tables they provide the counts for the inserts.
    And if you use PL/SQL then the INSERT query will return the count in the %ROWCOUNT cursor attribute. Capture the count immediately after the query executes and write it to a table (assuming you COMMIT the transaction).
    See the PL/SQL Language Doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/sql_cursor.htm
    >
    %ROWCOUNT
    Returns the number of rows affected by an INSERT, UPDATE, or DELETE statement, or returned by a SELECT INTO statement.
    >
    If you have to manually get the count then just run your query once a week to get the counts for the week. It seems unlikely that you really need to have the count every single day.

  • Simplest way to get column names

    i need to retrieve column names in a rowset, let me explain a bit;
    i can simply retrieve a column name by using IColumnsInfo::GetColumsInfo, but the problem is when i use "AS" keyword in the select statement such like;
    SELECT identification AS  id FROM test_table_a
    i see alias name of that column instead the internal column name.
    as you can guess the qestion is; how can i get both alias and internal name at the same time and of course what is the *usual* way to get it.
    thanks in advance

    Getting 'real' column names from a table:
    Code Snippet
    SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'Products'

  • Fastest way to get count

    Hi
    I am having big table "BT" around 5,00,000 records in a table. this table is having various columns
    a, b,c,d,e,f,g .....etc
    I am having following indexes on a table
    1/ unique index a, b, c, d, e, f, g
    2/ index a, b, c, d
    3/ index a, b
    4/ index a, o,p,q
    5/ index r, s, t, u, v
    I am doing count(*) on a table where e = < some condition > and g = dt
    It is doing fast index full table scan. But it is taking more than 30 mins.
    I can not activate parallel query option. Can it be done faster way ?
    thanks & regards
    PJP

    The only index that contains both e and g is the first one and it's pretty wide. I agree with cd, you should try an index on g,e or e,g. remember, the order of columns in an index is a strategic decision so you need to consider things like the uniqueness of e and g. In general put the more unique one first. You also need to consider how often e and g are used in other queries. In general, the column referenced in the where cluse of the most queries should be placed first. The 2 general recommendations I mention sometimes contradict each other and that is where you need to make a judgement call

  • The simplest way to get more performance on select on xmltype column?

    We have a table with xmltype column:
    CREATE TABLE "TK"."PLAN_2" ("UNID" NUMBER NOT
    NULL,
    "XMLSTRING" "TK"."XMLTYPE",
    CONSTRAINT "SYS_C001142583" PRIMARY KEY("UNID")
    USING INDEX
    TABLESPACE "TX"
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
    The data in column xmlstring looks like this:
    <Agent>
    <OP End="2520000" Id="001_8232_0_91" Origin="Autos" Quantity="1.0 ea" Start="2520000">
    <OSP Key="ADM_ID" String="001_8232_0" />
    <OSP Key="AddAutoNr" String="0" />
    <OSP Key="CURRENT_STATE" String="Tages-Vorgabe" />
    <OLP Key="ChUser">
    <OIP Key="(T_SP) test2" Long="1218125408541" />
    <OIP Key="(T_SP) admin" Long="1219071385346" />
    <OIP Key="(T_SP) test2" Long="1237540381906" />
    </OLP>
    <OSP Key="Debicode" String="9903" />
    <OSP Key="Resource" String="SBN" />
    <OSP Key="TrafficDay" String="91" />
    <OSP Key="AutoNrSchema" String="001" />
    <OSP Key="AutoNumber" String="8232" />
    <OPE End="0" Id="Prod" Origin="Autos|Prod" Start="0">
    <OProd Duration="0" End="0" Id="Produce" OriginDirect="Autos|Prod|Produce" Quantity="1.0 ea" Start="0" Type="Produce">
    <OSP Key="RESelection.Parameter" String="Resource" />
    <Resource Id="Autos" />
    <Alloc From="OP|001_8232_0_91|Prod|Produce" Id="" Quantity="1.0 ea" To="CO|001_8232_0_91|001_8232_0_91" Type="PRODUCEREQ_TO_CONSUMEREQ" />
    </OProd>
    </OPE>
    <OPE End="2520000" Id="Step_0" Origin="Autos|Step" Start="0">
    <OQP Key="Delay" Overridden="true" Quantity="0.0 s" />
    <OQP Key="Distance" Quantity="44.84 km" />
    <OQP Key="Duration" Quantity="2520.0 s" />
    <OQP Key="Fahrt" Quantity="2520.0 s" />
    <OSP Key="From" String="BS" />
    <OSP Key="I1" String="0" />
    <OSP Key="PLACE" String="1" />
    <OQP Key="StartDelay" Overridden="true" Quantity="0.0 s" />
    <OQP Key="TWait" Overridden="true" Quantity="0.0 s" />
    <OSP Key="To" String="OL" />
    <OUse Duration="2520000" End="2520000" Id="LStep_0" Name="L" OriginDirect="Autos|Step|LStep" Quantity="1.0 ea" Start="0" Type="Step">
    <OSP Key="I2" String="0" />
    <OIP Key="LPOSITION" Long="1" Overridden="true" />
    <OSP Key="PLACE" String="1" />
    <OQP Key="Wait" Overridden="true" Quantity="0.0 s" />
    <Resource Id="vs_RABe525_13" />
    </OUse>
    <OUse Duration="480000" End="0" Id="LPre_0" Name="L" OriginDirect="Autos|Step|LPre" Quantity="1.0 ea" Start="-480000" Type="Pre">
    <OQP Key="Fahrbereit" Overridden="true" Quantity="2 min" />
    <OSP Key="From" Overridden="true" String="BS" />
    <OSP Key="I2" String="0" />
    <OSP Key="PLACE" String="1" />
    <OSP Key="StepIndex" String="0" />
    <OSP Key="To" Overridden="true" String="BS" />
    <OQP Key="Vorbereitung" Overridden="true" Quantity="6 min" />
    <Resource Id="vs_RABe525_13" />
    </OUse>
    <OUse Duration="600000" End="3120000" Id="LPost_0" Name="L" OriginDirect="Autos|Step|LPost" Quantity="1.0 ea" Start="2520000" Type="Post">
    <OQP Key="Abstellzeit" Overridden="true" Quantity="4 min" />
    <OSP Key="From" Overridden="true" String="OL" />
    <OSP Key="I2" String="0" />
    <OQP Key="Nachbereitung" Overridden="true" Quantity="6 min" />
    <OSP Key="PLACE" String="1" />
    <OSP Key="StepIndex" String="0" />
    <OSP Key="To" Overridden="true" String="OL" />
    <Resource Id="vs_RABe525_13" />
    </OUse>
    <OUse Duration="2520000" End="2520000" Id="FStep_0" Name="F" OriginDirect="Autos|Step|FStep" Quantity="1.0 ea" Start="0" Type="Step">
    <OSP Key="I2" String="0" />
    <OSP Key="PLACE" String="1" />
    <OQP Key="Wait" Overridden="true" Quantity="0.0 s" />
    <Resource Id="ps_P112" />
    </OUse>
    <OUse Duration="480000" End="0" Id="FPre_0" Name="F" OriginDirect="Autos|Step|FPre" Quantity="1.0 ea" Start="-480000" Type="Pre">
    <OQP Key="Fahrbereit" Overridden="true" Quantity="2 min" />
    <OSP Key="From" Overridden="true" String="BS" />
    <OSP Key="I2" String="0" />
    <OSP Key="PLACE" String="1" />
    <OSP Key="StepIndex" String="0" />
    <OQP Key="Taxi" Overridden="true" Quantity="0 s" />
    <OSP Key="To" Overridden="true" String="BS" />
    <OQP Key="Vorbereitung" O verridden="true" Quantity="6 min" />
    <OQP Key="Wegzeit" Overridden="true" Quantity="0 s" />
    <Resource Id="ps_P112" />
    </OUse>
    <OUse Duration="600000" End="3120000" Id="FPost_0" Name="F" OriginDirect="Autos|Step|FPost" Quantity="1.0 ea" Start="2520000" Type="Post">
    <OQP Key="Abstellzeit" Overridden="true" Quantity="4 min" />
    <OSP Key="From" Overridden="true" String="OL" />
    <OSP Key="I2" String="0" />
    <OQP Key="Nachbereitung" Overridden="true" Quantity="6 min" />
    <OSP Key="PLACE" String="1" />
    <OSP Key="StepIndex" String="0" />
    <OQP Key="Taxi" Overridden="true" Quantity="0 s" />
    <OSP Key="To" Overridden="true" String="OL" />
    <OQP Key="Wegzeit" Overridden="true" Quantity="0 s" />
    <Resource Id="ps_P112" />
    </OUse>
    </OPE>
    </OP>
    </Agent>
    We try to select:
    SELECT UNID, extractValue(value(OUSE_XMLSTRING), '/OUse/Resource/@Id') OUSE_RESOURCE,
    extract(XMLSTRING, '/Agent/OP/OSP[@Key = "TrafficDay"]/@String') TT_DAY,
    extract(XMLSTRING, '/Agent/OP/@Start') OP_START,
    extract(XMLSTRING, '/Agent/OP/@End') OP_END,
    extract(XMLSTRING, '/Agent/OP/OSP[@Key = "ADM_ID"]/@String') ADM_ID,
    extractValue(value(OUSE_XMLSTRING), '/OUse/@Start') OUSE_START,
    extractValue(value(OUSE_XMLSTRING), '/OUse/@End') OUSE_END
    FROM tk.plan_2, table(XMLSequence(extract(XMLSTRING, '//Agent/OP//OPE//OUse'))) OUSE_XMLSTRING
    where extractValue(value(OUSE_XMLSTRING), '/OUse/Resource/@Id') = 'vs_RABe525_13';
    with this explain plan:
    PLAN_TABLE_OUTPUT
    Plan hash value: 3476314316
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 101 | 22018 | 31 (0)| 00:00:01 |
    | 1 | NESTED LOOPS | | 101 | 22018 | 31 (0)| 00:00:01 |
    | 2 | TABLE ACCESS FULL | PLAN_2 | 2 | 432 | 2 (0)| 00:00:01 |
    |* 3 | COLLECTION ITERATOR PICKLER FETCH| XMLSEQUENCEFROMXMLTYPE | | | | |
    Predicate Information (identified by operation id):
    3 - filter(EXTRACTVALUE(VALUE(KOKBF$),'/OUse/Resource/@Id')='vs_RABe525_13')
    We want to select on the 'ID', which occurs more than once in the xmlstring and the table gonna be big, so we think we need some kind of index on the ID-Identifier. What will be the best way to do this?

    Which version of Oracle (4 digits)?
    If 10.2 or greater, look into using XMLTable and that is the replacement for the table(XMLSequence(extract()) approach. Also, avoid the use of // unless you really need it. I doubt it will make a difference in your situation but just a good performance approach in general.
    We want to select on the 'ID', which occurs more than once in the xmlstringI assume you are going to want the count(...) > 1 from the XML to tell you which you are selecting?
    I also have questions about what that XMLType is being stored as but that depends upon what your version is regarding what storage options you have.
    Edited by: A_Non on Jun 7, 2010 10:55 AM
    Forgot to add, look in the FAQ (under your sign-in name on the upper right) for how to use the tag to better format your posts.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • THE SIMPLEST WAY TO GET A DVD MOVIE IN IPOD VIDEO IN 2-3 HRS

    I just got the Ipod video and got Quick time 7pro and everything but it is not the right software to play a DVD or get a dvd movie into ipod. So i tell you exactly what to do: go to carrydvd.com, find the version for use on symbian and psp. download it to test it or buy it to be able to convert a whole dvd movie. When you have the software ready you just put the DVD in, on the screen go where it says select video quality: PSP (MP4) Hi quality. go to screen size select 320X240 (PSP, PALM OR WINCE) PRESS PLAY BUTTON AND IT WILL COMPRESS. WHEN FINISH YOU GO TO ITUNES AND IN FILE GO TO ADD FILE TO LIBRARY, LOCATE THE MOVIE YOU JUST COMPRESSED AND ADD IT TO THE LIBRARY, THEN CONNECT THE IPOD AND JUST PUT THE MOVIE FROM THE LIBRARY TO THE IPOD AND IS READY. I JUST GOT IN MY IPOD TROY WITH THE QUALITY OF A BOUGHT VIDEO OF ITUNES MUSIC STORE.

    Have you checked this:
    sehested, "Tutorial: How to get DVD's on your iPod", 12:50pm Nov 8, 2005 CDT

  • What is the quickest simplest way to get my flash app (swf) into Facebook?

    I tried uploading an app to Facebook but it seems quite tedious and in fact, is not happening.

    Firstly, thank you very much for your help! My footage is a mixture of 1080p 25fps and 1080p 50fps.
    Here are my sequence settings:
    1920x1080
    50fps
    Square Pixels
    Progressive Scan
    And here are my settings I am using to export mpeg2-DVD directly out of Premiere:
    MPEG2-DVD
    720x576
    Quality:100
    Frame Rate: 25
    Progressive
    Widescreen 16:9
    PAL
    VBR, 2 Pass
    Minimum 2.25 Mbps
    Target 5.7 Mbps
    Maximum 8Mbps
    GOP Settings
    M Frames 3
    N Frames 12
    Rendering at maximum depth
    Using maximum render quality
    HERE ARE SOME EXAMPLES:
    1) Mpeg2-DVD directly out of Premiere. (Notice the distortion around moving subjects)
    http://forum.videohelp.com/attachments/31390-1429900116/Clip1%20Mpeg2-DVD.m2v
    2) Lossless export out of Premiere and then encoded to mpeg2-DVD using Apply Compressor. (Notice NO DISTORTION!)
    http://forum.videohelp.com/attachments/31391-1429900209/Clip1%20Lossless%3EApple%20Compres sor.m2v
    3) The lossless export
    http://forum.videohelp.com/attachments/31398-1429903684/Clip1%20Lossless.mov
    4) A H.264 export in case you don't want to download the LARGE lossless file
    http://forum.videohelp.com/attachments/31398-1429903684/Clip1%20Lossless.mov

  • How to get xml-document in 10g in simplest way ?

    Hi,
    I'm new in xml, there are so many tools to work with xml:
    what is the simplest way to get a xml-file from 10g-database ?
    I have : 10g R2 and a xsd.file to describe the xml-structure
    thank you
    Norbert

    There is no automatic way to generate XML documents from an arbitary set of relational tables using the information contained in an XML Schema. Typically the easiest way to generate XML from relational data is to use the SQL/XML operators (XMLElement, XMLAGG, XMLAttribtues, XMLForest). There are many examples of using these operators in the forums You can validate the generated XML against the XML Schema by registering the XML Schema with XML DB and then using the XMLType.SchemaValidate() method

  • Simplest way to protect the boot disk

    I have a solaris T2000 machine.
    It has two internal disks - and it boots off one of these. The disks are not in an hardware or software RAID configuration. There is nothing on the second disk that I cannot move. Please don't ask why this wasn't setup from the start - I had no control over it.
    So, what is the simplest way of getting around this single point of failure with the minimum of disruption to the service the box provides?
    1) To implement hardware RAID using raidctl would require a re-install of the OS - I do not want to have to do this
    2) Is it possible to create a new disk from the SAN, copy the boot areas etc and make then make the machine boot from the SAN?
    3) Use solaris volume manager to implement some kind of software RAID on the second disk?
    4) The boot disk is currently an ufs file system - could we convert this to zfs and then implement zpool mirroring without the need for a reinstall?
    Many thanks

    In my opinion, the simplest is option 3. Here's some instructions on how to accomplish:
    http://wikis.sun.com/display/BigAdmin/Mirroring+root+With+Solaris+Volume+Manager+in+the+Solaris+9+and+10+OS
    However, if I were in your position, I would do option 4. Use liveupgrade to convert to zfs and use zpool mirroring.

  • Most efficient way to get row count with a where clause

    Have not found a definitive answer on how to do this.  Is there a better way to get a row count from a large table that needs to satisfy a where clause like so:
    SELECT COUNT(*) FROM BigTable WHERE TypeName = 'ABC'
    I have seen several posts suggesting something like 
    SELECT COUNT(*) FROM BigTable(NOLOCK);
    and 
    selectOBJECT_NAME(object_id),row_count from sys.dm_db_partition_stats
    whereOBJECT_NAME(object_id)='BigTable'but I need the row count that satisfies my where clause (i.e.: WHERE TypeName = 'ABC')

    It needs index to improve the performance. 
    - create index on typename column
    - create a indexed view to do the count in advance
    -partition on type name (although it's unlikely) then get count from the system tables...
    all those 3 solutions are about indexing.
    Regards
    John Huang, MVP-SQL, MCM-SQL, http://www.sqlnotes.info

  • Just got girlfriend a new iPad2. Her iMac is a PowerPC G5 (Tiger version 10.4.11) with 512 mb RAM. What's the simplest, most efficient way to get her iPad2 up and running and synced to her Mac?

    Just got girlfriend a new iPad2. Her iMac is a PowerPC G5 (Tiger version 10.4.11) with 512 mb RAM. What's the simplest, most efficient way to get her iPad2 up and running and synced to her Mac?

    Most of the Apple store sales people and some of the genius bar people are only knowledgable on Apple's more recent offerings. They are not very knowledgable, I found, on older PowerPC based Apple computers, I'm afraid.
    Here's the real scoop.
    Your girlfriend's G5 can only install up to OS X 10.5 Leopard. This is the last compatible OS X version for PowerPC users.
    OS X 10.6 Snow Leopard and OS X10.7 Lion are for newer Intel CPU Apple computers.
    Early iMac G5's can only have up to 2 GBs of RAM.
    Later iMac G5's (2005-2006) could take up to 2.5 GBs of RAM
    2 GBs of RAM will run OS X 10.5 Leopard just fine.
    The very latest iTunes (10.5.2) can be installed and runs on both PowerPC and Intel CPU Macs.
    However, there are certain new iTunes feature that won't work without an Intel Mac.
    One of iOS and iTunes feature is sync'g wirelessly over WiFi.
    This will not work unless you have an iDevice running iOS 5 and Intel Mac running 10.6 Snow Leopard or better.
    Although, I was disappointed I would not be able to do this with my G4 Mac, it's not a biggie problem for me.
    So, your girlfriend's computer should be fine for what she intends to use it for.
    The Apple people either just plain didn't know or we're trying to get you to think about buying a new Mac.
    At least, as of now, not truly necessary.
    If Apple, at some later point, drops support for PowerPC users running 10.5, then would be the time to consider a new or "newer" Intel CPU Mac.
    My planned Mac computer upgrade is seeking out a " newer" last version G5 for my "new" Mac.
    I can't afford, right now, to replace all of my core PowerPC software with Intel versions, so I need to stick with the older PowerPC Macs for the time being. The last of the G5's is what I seek.

Maybe you are looking for

  • How to look for bundle based on its content (actions)?

    Hello, I want to have a list of all bundles that use a specific system variable, for exemple ${NSSREPO}. It is possible to make an SQL query to do it or do you know a way to get such list? I do not want to export all bundles on XML files and then loo

  • Cluster and licences

    Hello ! I'm totally new at Oracle DB, and I really would appreciate if someone could help me to solve, what I would qualify as an "licence understanding problem" ;-).For our corporate we would like to completely switch to Oracle and we want to set up

  • Swf stops part way through in browser

    my swf stops part way through when in the browser always at the same frame...in flash it plays fine...here's a link to the web page... http://www.karlyoder.com/wiredchemi...r_symmetry.html and here's a link to the fla (it was too big to attach)... ht

  • Ms Project shows wrong time duration

    Hi, I'm new user for ms Project. I realized there is something wrong with the duration. it should be 3 day, but it was written down 5 days instead. Task Name Duration Start Finish Chemical Cleaning Phase 5 days Fri 7/10/15 Sun 7/12/15 does anybody kn

  • Fetching The more then One Company ID by using PLSQL Table on Block B1(FORM

    I have two blocks in Form (Forms 10g) .On the Block B2 I have populated the Company Id by using the PLSQL Table.Now I selected more than two company ID from that Block ...I just want to keep the Company ID in the Temp Field on the Block B1.which I ha