Random record retrieval problem

At this point I'm sort of desperate as this has been going on
for a few weeks now. I missed this part of the forum an dposted the
problem here:
thread
If anyone can help I would very much apprecfiate that!

tragik,
ahh... the sql part should have read: ORDER BY
'#CreateUUID()#'
None the less it did not work. I think the reason is that the
CreateUUID part is only run once, when the page is fetch and not
every time a record is retrieved. Hence, the value of the unique
hex number is always the same during the whoole sql statement
execution in the database. Correct me if I'm wrong...

Similar Messages

  • Records retrieving problem !!!

    I have a huge amount of records in my database (around 100 000). I want to retrieve all the records and save the records into a file with extension .csv. Since the records are huge, is it possible to retrieve records partially, for example: 10 000 records, save it into a file and then continue retrieve the next 10 000 records and save it until all the records have been successfully retrieved from the database?
    If possible, any similar code example I could refer to?
    Your advice is always welcome! Thanks for help.

    Can you simply do:
        open csv file;
        execute SQL "select ... from ...";
        while (res.next()) {
           fetch the columns of the current row;
           write the row to the file;
        close file and free database connections;That way the program only needs to hold one row at a time in memory, and so the table size doesn't matter.
    Or do you need to do something with the data that needs several rows in memory at once?

  • No records retrieved error when records are there?

    Hi
    This is frm-40350 No records retrieved and it is happening on the detail block even though records are retrieved.
    I am currently testing an enhancement to an existing form that can be called by other forms. I noticed that when calling this form from another, when it is populated with global values the cursor then goes to the detail block and I get the error message at usual place at bottom of screen. There is a new form instance procedure that puts cursor in details block as below. I think this is because the detail block records are only meant to be changed so if a user goes in to that form it puts cursor in the details block.
    BEGIN
    go_block('master');
    IF :CG$CTRL.form_called_from IN ('FORM_X', 'FORM_Y') THEN
    execute_query;
    go_block('detail');
    ELSE
    enter_query;
    END IF;
    END;
    The code above is existing and I have not changed it. I was making a small enhancement to my form in another area that will not have created any such problems as this. it operates ok apart from this error message. Why is it producing this error message?
    Thanks
    user605593

    Hi,
    Basically its not an error message....Its just informative message....according to this your trying to fetch some data from the table that is not there or your search query retrives no rows from the table.....
    If this message is not causing any problem to your operation then you can supress this message by writing the following code in pre-form,
    :SYSTEM.MESSAGE_LEVEL := 5;
    :SYSTEM.SUPPRESS_WORKING := 'TRUE';
    and write the following code in post-form
    :SYSTEM.MESSAGE_LEVEL := 0;
    :SYSTEM.SUPPRESS_WORKING := 'FALSE';
    Thanks,
    Pavan.

  • How can I select the random records in u201Cstep loopu201D.

    Hi, Experts,
    I am using step loop to display the data on screen now I want to select the random records from this step loop display. Like 1st 3rd or 5th record, is there any way to select the records,
    like I did in Table control there was a filed in internal table named marked char length 1, I gave this field name in u201Cw/ SelColumnu201D it fill that field with u2018Xu2019 from where I can get the info about the selected records, in this way I can easily perform the operation on that internal table with the help of that marked field.
    Is there any way to select the records in step loop too ?
    Kind Regards,
    Faisal

    thanks for replay shwetali,
    but i just gave you example of random records with 1st 3rd and 5th my goal is not select only these records. i want to select the random mean any records from the step loop display.
    like we can select from the table control. and when select any record it place 'X' in the given internal table field.
    Thanks and kind Regards,
    Faisal

  • Missing Functionality - Records retrieved by this Query)

    Hi
    The 'Records retrieved by this Query' function which was available in previous versions is now not available in 2007.
    Upon executing the query, the number of records do appear on the left but it can be awkward as the column doesn't size correctly for larger numbers for numbers over 100.
    Please can this be reintroduced.
    Many thanks,
    Caroline

    Hi Caroline,
    The response from SAP support team could be weeks or months if any.  You need more patient.  However, as in my experience, anything taken out from the previous version would have reasons.  Even unknown to most users, to get them back is highly unlikely.
    Thanks,
    Gordon

  • Select Random Records with Group By?

    Hi,
    I currently select random records by using this type of SQL:
    (SELECT *
    FROM ( SELECT *
    FROM ( SELECT *
    FROM TABLEA
    ORDER BY dbms_random.value
    WHERE ROWNUM <= 100
    Based on the following data, I now want to still pick out random records but I only want 1 record from the same ID and START_DATE but where the FLAG could be Y or N.
    So with grouping by ID and START_DATE, I need to still be able to choose the record if it has anything from 1 entry or 10 entries per ID and START_DATE.
    Could this be performed with a GROUP BY?
    ID START_DATE FLAG
    1 12/12/2005 Y
    1 12/12/2005 N
    1 12/12/2005 N
    1 30/12/2005 Y
    1 30/12/2005 N
    1 30/12/2005 N
    2 10/10/2005 Y
    2 07/07/2005 Y
    Thanks for any help.
    Daniel

    Try this [not tested]:
    SELECT *
         FROM
              (SELECT *
                   FROM
                   ( SELECT
                              ID
                             ,START_DATE
                             ,FLAG
                             ,ROW_NUMBER() OVER
                                  (PARTITION BY ID,START_DATE ORDER BY dbms_random.value) RN
                        FROM TABLEA
                   ORDER BY dbms_random.value
         WHERE RN = 1
              AND ROWNUM <= 100
         ;

  • Dynamic Table with Random Records

    What I am trying to do is select random records from a table
    and display them in a dynamic table with max columns set to 3 and
    the 4th record to be on a new row. Below is what I have right now
    and it works to randomly pick records but has no function to set
    columns in a table. If there is an easier way feel free to let me
    know. I have tried various ways to do this but none seem to work.
    <CFQUERY NAME="getItems" DATASOURCE="absi">
    SELECT catfit.*, modcats.*, prodmat.*, prod.* FROM catfit,
    modcats,
    prodmat, prod WHERE prodmat.prodid=catfit.prodid And
    catfit.catid=modcats.catid
    ORDER BY modl ASC </cfquery>
    <cfif getItems.recordCount>
    <cfset showNum = 3>
    <cfif showNum gt getItems.recordCount>
    <cfset showNum = getItems.recordCount>
    </cfif>
    <cfset itemList = "">
    <cfloop from="1" to="#getItems.recordCount#"
    index="i">
    <cfset itemList = ListAppend(itemList, i)>
    </cfloop>
    <cfset randomItems = "">
    <cfset itemCount = ListLen(itemList)>
    <cfloop from="1" to="#itemCount#" index="i">
    <cfset random = ListGetAt(itemList, RandRange(1,
    itemCount))>
    <cfset randomItems = ListAppend(randomItems, random)>
    <cfset itemList = ListDeleteAt(itemList,
    ListFind(itemList, random))>
    <cfset itemCount = ListLen(itemList)>
    </cfloop>
    <cfloop from="1" to="#showNum#" index="i">
    <cfoutput>
    <table width="205" border="0" align="left"
    cellpadding="0" cellspacing="0">
    <tr>
    <td width="235" height="116"> <div
    align="center"><img
    src="../Products/ProductPictures/#getitems.pic[ListGetAt(randomItems,
    i)]#" width="100"></div></td>
    </tr>
    <tr>
    <td
    class="ProdTitle">#getitems.brand[ListGetAt(randomItems,
    i)]# #getitems.modl[ListGetAt(randomItems, i)]#</td>
    </tr>
    <tr>
    <td
    class="paragraph">$#getitems.prc[ListGetAt(randomItems,
    i)]#</td>
    </tr>
    <tr>
    <td><A
    href="../Products/details.cfm?prodid=#getItems.prodid[ListGetAt(randomItems,
    i)]#" class="linkcontact">more
    info</a></td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </cfoutput>
    </cfloop>
    </cfif>

    To start a new row after 3 records, do something like this.
    <table>
    <tr>
    <cfoutput query="something">
    <td>#data#<td>
    <cfif currentrow mod 3 is 0>
    </tr><tr>
    </cfoutput>
    </tr>
    </table>
    You should also know that your approach is very inefficient
    in that you are bringing in to cold fusion more data than you need.
    First of all you are selecting every field from 3 tables when you
    don't appear to be using all of them. Second, you are selecting
    every record and you only want to use 3. There are better ways out
    there, but they are db specific and you did not say what you are
    using.

  • Returning the number of records retrieved by a query

    Hi everyone,
    I did a search on this question, but I'm still unclear as to why it's so difficult to retrieve the number of records returned by a query.
    What is the easiest and most straight-foward way ?
    Thanks,
    Bob

    Shay
    I am confused. I still do not know how to achieve the count of records retrieved in a block. I have viewed the viewlet calculated field demo. I am unclear of what you were refering to when you said use the count as the function.
    I did try setting function to be "get_block_property('myblock',query_hits)", but this always had value of zero. But I do not think this is what you meant.
    Has anybody been able to answer the original question?

  • Display Random Record

    Morning all
    Just a quick one.
    How do I display a random record in DW?
    I have a MySQL statement which is:
    SELECT * FROM
    tablename ORDER BY RAND() LIMIT 0,
    number of records to display
    The error message I get is:
    'Syntax error (missing operator) in query expression RAND()
    LIMIT 0'
    If I alter 'RAND()' to 'RND()', I still get the error. If I
    remove the '0' I still get the error.
    Any ideas how to make this work?
    I'm using Access BTW.
    Regards
    Martin

    Tell your SQL statement what to RAND - right now it doesn't
    know how to
    randomize it, by what field.
    "Pantyboy" <[email protected]> wrote in
    message
    news:ef0and$r7g$[email protected]..
    > Morning all
    >
    > Just a quick one.
    >
    > How do I display a random record in DW?
    >
    > I have a MySQL statement which is:
    >
    > SELECT * FROM
    tablename ORDER BY RAND() LIMIT 0,
    number of
    > records to
    > display
    >
    > The error message I get is:
    >
    > 'Syntax error (missing operator) in query expression
    RAND() LIMIT 0'
    >
    > If I alter 'RAND()' to 'RND()', I still get the error.
    If I remove the '0'
    > I
    > still get the error.
    >
    > Any ideas how to make this work?
    >
    > I'm using Access BTW.
    >
    > Regards
    >
    > Martin
    >

  • Need help: Flex  record webcam problem, how to setting Brightness,Contrast,Saturation and Sharpness

    Hello, dear all
    Please help me!
    Flex  record webcam problem, how to setting Brightness,Contrast,Saturation and Sharpness?
    nsOutGoing=new NetStream(nc);
    nsOutGoing.attachCamera(m_camera);
    nsOutGoing.publish(filename, "record");
    I want to control the Brightness,Contrast,Saturation and Sharpness for the recorded flv file.
    At present, I only can control the videodisplay object, but I can not able to control Camera.
    Thanks very much!!
    kimi
    MSN: [email protected]

    Can I change a Video object to to Camera object, If yes, How do??
    nsOutGoing.attachCamera(video as Camera);// it does not work rightly
    thanks

  • JavaScript error and CATW record locking problem

    Hello,
    We're having two problems with ESS (CATW and Personal Information (PZM3)) in EP 6. We have an ITS-R/3 landscape.
    The JavaScript problem appears intermittently within Personal Data services (Address, Emergency Contact, ...). The actual error reads "object required" and originates from ITS. A user may be able to click through all the ESS services once fine, but on a second click receive the error. Sometimes they can't use the services at all.
    The record locking problem happens in Time Sheet (CATW). Even though a user Saves and Releases the Time Sheet, it remains locked and cannot be approved. Alternatively, some users are experiencing locked records when they try to complete their own time sheets.
    I'm not sure if these are related.
    Has anyone here seen these problems? Any suggestions are most welcome!
    Cheers,
    Colleen

    The best way to nail down the javascript error would be to use the firefox JavaScript debugger extension plugin and put the breakpoints where the problem occurs.
    This will exactly tell you which object it is looking for which is not found. Moreover you might be able to find that when it is working fine as you said. So give that a try and I am sure you will be able to figure out the problem.
    To me this mostly looks like at time some .js file is not coming through to the browser... but this is just a wild guess based on the symptoms.

  • Random Record Selection

    I have a page that I have a recordset on just calling the
    RecordID in the database. How would I have the page or recordset
    select a random record and put that recordID in say a session
    variable?
    Thanks

    MySQL:
    SELECT yourfield FROM yourtable WHERE ... ORDER BY rand()
    LIMIT 1
    MSSQL:
    SELECT TOP 1 yourfield FROM yourtable WHERE ... ORDER BY
    newid()
    MS Access:
    SELECT TOP 1 yourfield FROM yourtable WHERE ... ORDER BY
    RND(yourprimarykey) [warning: this may not be random through
    CF]
    HTH
    Tim Carley
    www.recfusion.com
    [email protected]

  • Random record return

    I have a DB of sites that I need to query and pull in 5
    records that are to be displayed in a random order.
    I can limit the records but I'm struggling with displaying
    them in a random order.
    Any ideas?

    We're using MySQL as the DB and to clarify I need to pull in
    5 random records in a random order.
    I've just been emailed the answer by a friend so I'llpost it
    up here.
    "SELECT *
    FROM tablename
    WHERE somefield='something'
    ORDER BY RAND() LIMIT 5"
    Seems to work fine to me.

  • Random record for ASP

    I would like to have a section on my ASP page to generate a
    random record that pulls from my database. So that each time the
    page is opened/refreshed, a different record is displayed.
    Any ideas?

    "Biggest Dave" <[email protected]> wrote in
    message
    news:e2nn6n$83e$[email protected]..
    >I would like to have a section on my ASP page to generate
    a random record
    >that pulls from my database. So that each time the page
    is
    >opened/refreshed, a different record is displayed.
    >
    > Any ideas?
    Yes.
    Of course, since I don't know what database you're using, any
    or all of
    those ideas could be useless.

  • Random Record + Update

    Looking to create a random record repeat region where the
    random records being pulled updates a hit count. i.e. a simple
    banner rotator that counts how many times it's displayed. not all
    banners being rotated are in one folder... they are simply accounts
    designated as being featured. I tried the order by rand() limit
    5... error. changed to just rand() and that worked... but how do I
    update a file based on that?

    darrel wrote:
    >> i tried the code you provided, the 2 question
    marks... but that didn't seem
    >> to do it either. anyone else have any ideas on how
    to update a hit counter
    >> based on the random record recordset?
    >
    > Instead of being a smart-***, how about actually either
    a) quoting the
    > original question or b) repeating the question.
    >
    > Anyone that's going to be of any help to you uses the
    newsgroup interface,
    > not the crappy web forum, so when you reply to a
    question that's several
    > weeks/months old, we don't see the original post.
    >
    > So, as such, all we saw was your silly question mark.
    I use a newsreader and saw the entire thread as if it was a
    new one.
    There was 3 days between the original posts and his question
    mark. Maybe
    a question mark wasn't the right way to get more attention to
    the post...
    Steve

Maybe you are looking for

  • Missing right parenthesis error when querying using a list of values

    Would anyone know why this statement gives the ORA-00907: missing right parenthesis error..? SELECT FIELD_X FROM TABLE_Y WHERE FIELD_X IN ( 'AJD' 'RED' 'ADF' 'MOI' The reason why I wanted the AJD, RED, ADF, etc values on top of each other is because

  • OBIEE Analytics URL with fully qualified machine name

    Hi All, I have issue with analytics URL, Analytics URL works fine if it is in this form: [<machine-name>:9704/analytics], but for EBS integration purpose, i need to give fully qualified name like: [<machine-name>.<domain-name>.<com>:9704/analytics].

  • Importing library from ipod to computer

    I recently had to rebuild my computer and in the porcess i lost all my iTunes library because it was not backed up. Im wondering if there is a way that i can import my library on my ipod straight into itunes? Please help!!

  • Activating BI statistics

    Hello All, Does anyone please have a whitepaper or tutorial on the activation of BI statistics in BI 7.0? This will be highly appreciated. Regards, Keith Kibuuka

  • Captivate 4, rundown of blogged info ... we are getting close

    Thought you might like to learn a little more about Captivate 4. Here's a rundown of some recent blog posts. http://stevehoward.blogspot.com/2008/11/adobe-shows-off-captivate-4-and-adobe.html http://iconlogic.blogs.com/weblog/2008/11/breaking-news-ad