NodeJS Table Storage where clause prefix with numeric string value

I am looking to make a TableQuery that returns results where a string property starts with a number. I have attempted to use the same prefix method
described on the MSDN but I cannot get any results returned when the characters are numeric.
Here is an example of what I'm trying to do:
    titleQuery = new azure.TableQuery()
    .and 'title ge ?', '1'
    .and 'title lt ?', '2'
Sample title values are "1-something", "something", and "123-something"
Looking at the comments in source, I can see that the query API has been updated, but don't see any examples of doing queries based on prefix.
Any thoughts on how or if this is possible?
David Wesst | MVP http://davidwesst.com | @davidwesst

Received a reply on the GitHub issues site, where I asked the same question.
It appears the issue was a simple oversight by me where I used two '.and' operators instead of a '.where' and an '.and'.
https://github.com/Azure/azure-storage-node/issues/30#issuecomment-61926225
Thanks!
David Wesst | http://davidwesst.com | @davidwesst

Similar Messages

  • Does derived table use where clause fillters inside

    dear all.
    Table "A" has two cols aid and col1 , aid is pk.
    Table "B" has two cols  bid , aid , and colb .
    followin query can be formulated in other ways ,but i wanted to ask something about query processing.
    select aid,aa.ca,aa.cb
    from A
    left join
    (select aid, b.colb ca ,b1.colb  cb
     from A
    left join B on a.aid=b.aid and b.colb='r'
    left join B b1 on a.aid=b1.aid and b1.colb='e'
    ) aa
    where a.aid (1,2)
    i wanted to know if i put the where clause "where a.aid(1,2) in side derived table aa
    then will it change its plan in any case or it is sufficant to put where clasue in last
    or i should put the where clause in side the derive table "aa" also.
    yours sincerley

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior ON SQL forums. Is your boss this rude to you?? 
    CREATE TABLE Alphas
    (alpha_id INTEGER NOT NULL PRIMARY KEY,
     col1 INTEGER NOT NULL);
    Thanks to your rude, poor narrative I have to guess about the second table: 
    CREATE TABLE Betas
    (beta_id INTEGER NOT NULL PRIMARY KEY, 
     alpha_id INTEGER NOT NULL
       REFERENCES Alphas(alpha_id), 
     colb CHAR(1) NOT NULL);
    Your query is awful. OUTER JOINs are rare in a properly designed schemA. The DRI should guarantee inner joins!  We seldom need to re-name columns. 
    >> I wanted to know if I put the where clause WHERE A.alpha_id(1,2) in side derived table aa <<
    That is not a syntactically invalid search condition; did you mean 
    “WHERE A.alpha_id IN (1,2)” ??
    Why did you de-normalize your results? My guess is that you can get the same data with this: 
    SELECT alpha_id, colb
      FROM Betas AS B
     WHERE colb IN ('r', 'e')
       AND alpha_id IN (1, 2);
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • [SQL] Where clause problem with subqueries

    Hi,
    I'm writing a query for an apex application where i have a field (P47_UNNR) for filtering. In my where clause I try to do this:
    ... AND qo.pk_id IN
    CASE
    WHEN :P47_UNNR IS NULL
    THEN
    (SELECT pk_id FROM quote_orders)
    ELSE
    (SELECT QOR.FK_QUOTE_ORDER_ID
    FROM QUOTE_ORDER_RIDS QOR
    JOIN
    RIDS RID
    ON RID.PK_ID = QOR.FK_RID_ID
    WHERE RID.NAME LIKE :P47_UNNR)
    END
    But it gives an error "ORA-01427: single-row subquery returns more than one row"
    I have tried multiple ways to get around this problem but don't seem to be able to do this. Does anyone have a suggestion on how to solve this?

    Hi Niels,
    First try with separating the query.
    First try with:
    CASE
    WHEN :P47_UNNR IS NULL
    THEN
    (SELECT pk_id FROM quote_orders)
    END;check SELECT pk_id FROM quote_orders this query returning only one values or not???
    Then try with
    CASE
    WHEN :P47_UNNR IS NULL
    THEN
    (SELECT pk_id FROM quote_orders)
    ELSE
    (SELECT QOR.FK_QUOTE_ORDER_ID
    FROM QUOTE_ORDER_RIDS QOR
    JOIN
    RIDS RID
    ON RID.PK_ID = QOR.FK_RID_ID
    WHERE RID.NAME LIKE :P47_UNNR)
    ENDCheck this
    SELECT QOR.FK_QUOTE_ORDER_ID
    FROM QUOTE_ORDER_RIDS QOR
    JOIN
    RIDS RID
    ON RID.PK_ID = QOR.FK_RID_ID
    WHERE RID.NAME LIKE :P47_UNNRquery returning one values or not??
    If those returns more than one value , the check whether there is any duplication value's present, remove that duplicate value from your table.
    if you cant remove just add rownum =1 condition in your where clause.
    Cheers,
    San

  • Where clause problem with sub-queries in forms 6i

    where is the best place to put a sub query?? I have been using the set block property, however when running a sub query an alternative method must be used. what are some other options?? I have tried to have the query directly in the data block property palette but to no avail...
    There are 2 tables project and assignment
    maximum resources cannot be exceeded therefore a count of employees
    on the assignment table establishes that there are open spaces on the project.
    This code Here is my code for my where clause on the data block
    project.resources_maximum >
    (Select Count(assignment.employee_ID)
    From assignment
    Where assignment.project_ID = project.project_ID
    group by assignment.project_ID
    and project.end_date>sysdate;
    I was reading that the project table must be defined in the from clause
    to have the query go row by row, otherwise multiple rows are returned
    however I cannot define the project in the from,
    could this be why this doesn't work???
    original SQL that does work
    Need to migrate this to forms
    Select project.project_ID
    from project
    Where project.resources_maximum >
    (Select Count(assignment.employee_ID)
    From assignment
    Where assignment.project_ID = project.project_ID
    group by assignment.project_ID
    and project.end_date>sysdate;

    Looking at your query that works at the bottom, I do not see any reason that you would need to include the Assignment table in the From list. Just use the same where clause in the form:
      Where project.resources_maximum
        > (Select Count(assignment.employee_ID)
           From assignment
           Where assignment.project_ID = project.project_ID
           group by assignment.project_ID  )

  • Can we use Case in Where Clause along with Exists

    Hi Everybody,
    Can we use Case in the where clause with exists? As i have a requirement in which i have to check whether value exists in 6 views, now depending on some value(gns_type )of select clause i have to attach a paticular exists else the performance dies.
    Please go through the query any suggestion appreciated.
    Thanks
    SELECT count(*)
    FROM
    (SELECT eah.changed_date,
    decode(eua.is_deleted, 'N', decode(eah.alert_type, NULL, 'GN', 'R', 'GAR', 'G', 'GAG', 'Y', 'GAY'), 'Y', decode(eah.alert_type, 'R', 'GDR', 'G', 'GDG', 'Y', 'GDY', NULL, 'GN'), NULL, 'GN') AS
    alert_type,
    decode(eac.pta_line, 'N', '') ptaline,
    eac.exp_type_desc,
    eac.supplier_name,
    eac.transaction_id,
    eah.gns_type,
    eac.po_amount,
    eac.po_end_date,
    eah.notes,
    eua.is_deleted,
    eac.expenditure_type,
    eua.gns_alert_summary_id,
    eah.changed_date alert_date,
    eua.user_alert_id,
    eah.reference_number,
    decode(eac.cms_pta_line,'N','',eac.cms_pta_line) cms_pta_line,
    cms_po_amount,
    cms_po_end_date,
    mgns.is_decommitted,
    eac.gns_alert_id,
    eah.gns_type source_name
    FROM xxdl.xxdl_sc_gns_alerts_summary eah,
    xxdl.xxdl_sc_gns_detail_alerts eac,
    xxdl.xxdl_sc_gns_user_alerts eua,
    xxdl.xxdl_sc_manage_gns_master mgns
    WHERE eah.gns_alert_summary_id = eac.gns_alert_summary_id
    AND eah.gns_alert_summary_id = eua.gns_alert_summary_id
    AND eah.transaction_id = eac.transaction_id
    AND eah.transaction_id = mgns.transaction_id)
    a
    WHERE(EXISTS
    (SELECT 1
    FROM xxdl_sc_mng_gns_pta_req_hc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS( SELECT 1
    FROM xxdl_sc_mng_gns_pta_inv_hc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS(SELECT 1
    FROM xxdl_sc_mng_gns_pta_req_sc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS(SELECT 1
    FROM xxdl_sc_mng_gns_pta_inv_sc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS( SELECT 1
    FROM xxdl_sc_mng_gns_pta_po_sc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    OR
    EXISTS (SELECT 1
    FROM xxdl_sc_mng_gns_pta_po_hc_v x
    WHERE x.transaction_id = a.transaction_id
    AND x.source_name = a.source_name
    AND x.project_id = 69309
    AND x.task_id = 242528
    AND x.award_id = 34694)
    AND TRUNC(alert_date) >= TRUNC(add_months(sysdate, -1))
    AND TRUNC(alert_date) <= TRUNC(sysdate)
    AND is_deleted = 'N'
    ORDER BY changed_date DESC

    you can do
    WHERE
    CASE WHEN (something) THEN
      CASE WHEN EXISTS (SELECT * from ...) THEN 1 ELSE 0 END
               WHEN (something else) THEN
         CASE WHEN EXISTS (SELECT * from ...) THEN 1 ELSE 0 END      
    END = 1Looking at your current query, it looks like all those exist statements could be a lot neater, maybe like:
    WHERE (69309,242528,34694) IN
    (SELECT project_id,task_id,award_id FROM
      (Select project_id,task_id,award_id,transaction_id,source_name
      FROM
      xxdl_sc_mng_gns_pta_req_hc_v
      UNION ALL
      Select project_id,task_id,award_id
      xxdl_sc_mng_gns_pta_inv_hc_v
      ...) x
    where a.transaction_id = x.transaction_id
    and a.source_name = x.source_name
    )or put the tuple in the where clause at the bottom

  • Where-Clause-Question using "sets of values"

    Hello,
    I'm using 10gR2
    Is it possible to filter rows by using sets of values in the where-clause?
    E.g. like:
    SELECT a, b, c
      FROM mytable
      WHERE (b,c) IN
          (3,4),
          (6,7),
          (9,1),
          (0,2)
        )...should only retrieve rows from mytable with the sets (pairs) of above list

    Here is a link to the docs: [Expression Lists|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions014.htm#i1033664]
    !http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/img/expression_list.gif!
    The number of expressions in each set must match the number of expressions before the operator in the comparison condition or before the IN keyword in the membership condition.

  • Concatenation of constant charecter as prefix with charecteristics IO value

    Hi Experts,
    I have a infocube with huge data,in which material number is one of the characteristic infoobject namely 'zmatnr'  holds values like 123456789.
    I want to display the material number values in a format like MN123456789 where MN(constant charecter) used as prefix with the material number.
    We cannot do anything at update rule as the cube is being used in other applicaton areas.One option left with us to do the change at query level(Bex designer).
    Kindy give us your valuable inputs on this.
    Proper solution provider will be awarded points.
    Regards........

    Hi,
    One option is generate a export datasource out of the current cube and have another cube on top of it for reporting. You can update its Matnumber per ur req. Since the data is very huge, i dont think this a preferred solution.
    Other thing you can do is, add a characteristic to the exisiting cube and dont update it (set it to no update in the update rules). You can use this new Charateristic added in the Virtual char/KF exit to populate per ur req. This solution would need you to recollect the update rules and cube.
    I am not very sure, but you can also try using a formula variable with customer exit. This might be helpful.
    Hope this helps.
    Kalyan

  • Using for all entries of two internal tables in where clause of the select

    Hi experts,
    My requirement is, need to select Marc-minbe and wrpl-sobst, for all the entries of the two internal tables it_mara , and it_t001w.
    here is the select queries i have used,
    select matnr normt from  mara into it_mara for all entries in it_data where normt = it_data-normt.
    select konnr werks from t001w into it_t001w for all entries in it_data where konnr = it_data-konnr.
    now i need to select minbe of marc table and sobse of wrpl table for all the entries of above internal tables, it_mara and it_t001w, using both matnr of it_mara and werks of it_t001w in where condition.
    Pls advise how i can do it.
    Thanks.
    Moderator message: very basic, please work on this yourself first, these forums are not a substitute for ABAP training.
    Edited by: Thomas Zloch on Dec 6, 2010 9:38 AM

    Hi
    call SE16 with table TFTIT in order to get a full list (it will be long...)
    A list of FMs with parameters can be found in table FUNCT.
    Finally go to sm37rsdf4
    that will give you all the function modules with description
    Here is the list:
    http://www.erpgenie.com/abap/functions.htm
    hope this helps...
    Regards
    CSM Reddy

  • Xmlsequence with where clause or with join condition...

    Hi
    I have a XML as like below:
    <File>
    <FileDetails>
    <Student>
    <RegNo>1001</RegNo>
    <Name>Joseph</Name>
    <ResultDetails>
    <Subjects>
    <SNo>1</SNo>
    <SubjectName>ENGLISH</SubjectName>
    <Marks>80</Marks>
    </Subjects>
    <Subjects>
    <SNo>2</SNo>
    <SubjectName>MATHS</SubjectName>
    <Marks>78</Marks>
    </Subjects>
    </ResultDetails>
    </Student>
    <Student>
    <RegNo>1002</RegNo>
    <Name>Vincent</Name>
    <ResultDetails>
    <Subjects>
    <SNo>1</SNo>
    <SubjectName>ENGLISH</SubjectName>
    <Marks>62</Marks>
    </Subjects>
    <Subjects>
    <SNo>2</SNo>
    <SubjectName>MATHS</SubjectName>
    <Marks>73</Marks>
    </Subjects>
    </ResultDetails>
    </Student>
    </FileDetails>
    </File>
    This XML file has been inserted into a table gtt_xmlfile on column "XML_DATA" of datatype "CLOB(4000)".
    Now i have executed the below query:
    select     
         extract(value(d),'//RegNo/text()').getStringVal(),
         extract(value(d),'//Name/text()').getStringVal(),
         extract(value(d),'//SNo/text()').getStringVal(),
         extract(value(d),'//SubjectName/text()').getStringVal(),
         extract(value(d),'//Marks/text()').getStringVal()
    from gtt_xmlfile x,
    table(xmlsequence(extract(pk_xml.clob_to_xmltype(x.xml_data),'//File/FileDetails/Student'))) d;
    And i got the below output:
    REGNO     NAME     SNO     SUBJECTNAME     MARKS
    1001     Joseph     12     ENGLISHMATHS     8078
    1002     Vincent     12     ENGLISHMATHS     6273
    After i have executed the below query:
    select     
         extract(value(d),'//RegNo/text()').getStringVal() RegNo,
         extract(value(d),'//Name/text()').getStringVal() Name,
         extract(value(e),'//SNo/text()').getStringVal() SNo,
         extract(value(e),'//SubjectName/text()').getStringVal() SubjectName,
         extract(value(e),'//Marks/text()').getStringVal() Marks
    from gtt_xmlfile x,
    table(xmlsequence(extract(pk_xml.clob_to_xmltype(x.xml_data),'//File/FileDetails/Student'))) d,
    table(xmlsequence(extract(pk_xml.clob_to_xmltype(x.xml_data),'//File/FileDetails/Student/ResultDetails/Subjects'))) e
    i get the below output: (Cartesian product)
    REGNO     NAME     SNO     SUBJECTNAME     MARKS
    1001     Joseph     1     ENGLISH     80
    1001     Joseph     2     MATHS     78
    1001     Joseph     1     ENGLISH     62
    1001     Joseph     2     MATHS     73
    1002     Vincent     1     ENGLISH     80
    1002     Vincent     2     MATHS     78
    1002     Vincent     1     ENGLISH     62
    1002     Vincent     2     MATHS     73
    But my required output should be like below:
    REGNO     NAME     SNO     SUBJECTNAME     MARKS
    1001     Joseph     1     ENGLISH     80
    1001     Joseph     2     MATHS     78
    1002     Vincent     1     ENGLISH     62
    1002     Vincent     2     MATHS     73
    How can i achieve that using a join condition??
    Any help would be much appreciated...
    Best Regards
    Muthu

    No
    The above doesn't help me. Because, if the same set repeats, it gives an error:
    XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence.
    Note: Same set means, on the below sample, the student set repeats twice. In this case, that gives me error as mentioned above
    <File>
    <FileDetails>
    <Student>
    <RegNo>1001</RegNo>
    <Name>Joseph</Name>
    <ResultDetails>
    <Subjects>
    <SNo>1</SNo>
    <SubjectName>ENGLISH</SubjectName>
    <Marks>80</Marks>
    </Subjects>
    <Subjects>
    <SNo>2</SNo>
    <SubjectName>MATHS</SubjectName>
    <Marks>78</Marks>
    </Subjects>
    </ResultDetails>
    </Student>
    <Student>
    <RegNo>1002</RegNo>
    <Name>Vincent</Name>
    <ResultDetails>
    <Subjects>
    <SNo>1</SNo>
    <SubjectName>ENGLISH</SubjectName>
    <Marks>62</Marks>
    </Subjects>
    <Subjects>
    <SNo>2</SNo>
    <SubjectName>MATHS</SubjectName>
    <Marks>73</Marks>
    </Subjects>
    </ResultDetails>
    </Student>
    </FileDetails>
    </File>

  • Excise table J_1IEXCDTL not getting updated with Excise Base value.

    Hi All,
    The the field EXBAS of table J_1IEXCDTL is not getting updated for ETT (Transaction Type) DLFC.
    For other transaction types, the same is getting populated.
    Is there a setting for controlling the same?
    If yes, can you please guide me.
    Best Regards
    Debaditya Ghosh

    First you should ensure that it is flowing in your billing document.  If so, automatically, it will also flow in your excise invoice and the field EXBAS will be updated accordingly.
    From your comments, it seems, the amount is not flowing in your billing document and excise invoice.  If so, ensure that you have assigned  the correct tax code in FV11 for your ED condition type.
    thanks
    G. Lakshmipathi

  • How to filter an array with a string value

    I want to filter out all Strings in an array that don't have a certain value in them aka. I want only to see values that start with b or bi or bit etc...
    How can I accomplish this?
    Thanks

    This is another one of those things where I'm surprised it's not in the JDK. It's needed sufficiently frequently, and other languages (esp. scripting languages) seem to support this thing commonly.
    Anyway...when I need something like this (that seems as though many others need it as well and it ought to be in the JDK but isn't), the first thing I do is check Apache Jakarta Commons to see if someone has already written such a thing in a reasonably well-supported toolkit. It's worth a look.

  • Improve the performance in stored procedure using sql server 2008 - esp where clause in very big table - Urgent

    Hi,
    I am looking for inputs in tuning stored procedure using sql server 2008. l am new to performance tuning in sql,plsql and oracle. currently facing issue in stored procedure - need to increase the performance by code optmization/filtering the records using where clause in larger table., the requirement is Stored procedure generate Audit Report which is accessed by approx. 10 Admin Users typically 2-3 times a day by each Admin users.
    It has got CTE ( common table expression ) which is referred 2  time within SP. This CTE is very big and fetches records from several tables without where clause. This causes several records to be fetched from DB and then needed processing. This stored procedure is running in pre prod server which has 6gb of memory and built on virtual server and the same proc ran good in prod server which has 64gb of ram with physical server (40sec). and the execution time in pre prod is 1min 9seconds which needs to be reduced upto 10secs or so will be the solution. and also the exec time differs from time to time. sometimes it is 50sec and sometimes 1min 9seconds..
    Pl provide what is the best option/practise to use where clause to filter the records and tool to be used to tune the procedure like execution plan, sql profiler?? I am using toad for sqlserver 5.7. Here I see execution plan tab available while running the SP. but when i run it throws an error. Pl help and provide inputs.
    Thanks,
    Viji

    You've asked a SQL Server question in an Oracle forum.  I'm expecting that this will get locked momentarily when a moderator drops by.
    Microsoft has its own forums for SQL Server, you'll have more luck over there.  When you do go there, however, you'll almost certainly get more help if you can pare down the problem (or at least better explain what your code is doing).  Very few people want to read hundreds of lines of code, guess what's it's supposed to do, guess what is slow, and then guess at how to improve things.  Posting query plans, the results of profiling, cutting out any code that is unnecessary to the performance problem, etc. will get you much better answers.
    Justin

  • View where clause with "IN"

    Hi,
    Is there a nice way to specify the list eg.
    where itemNo IN(:1/?),
    where i can just set the where clause parameter with a array?

    If TABLE_OF_VARCHAR is a table type declared like this:
    CREATE TYPE TABLE_OF_VARCHAR AS TABLE OF VARCHAR2(2000);
    Then you can do this:
    select ...
    from ...
    where column_value in (select *
    from TABLE(CAST(? as TABLE_OF_VARCHAR)))
    this allows you to set an array-valued bind variable and cast its values into a table to select in the IN clause.
    This lets you have a variable number of args in the IN clause in a way that doesn't change the text of the SQL statement each time.
    I've posted a working sample project at:
    http://www.geocities.com/smuench/ArrayOfStringDomain.zip

  • Performance with unspecific where clause

    Hi gurus,
    at the moment I do have a sql statement on a view with an unspecific where clause like
    select from <view> where <textfield> like %whatIsearch%
    The text field is not in the key fields which are used to create the view. An index on <textfield> does not help, because the where clause starts with a %.
    Other databases like Oracle do finish the statement within seconds, maxdb needs minutes.
    I there a possibility to speedup the statement in MaxDB? (Besides telling the user to use better qualified statments.)
    Why is Oracle that fast?
    Thanks for you help.
    Best regards
    Christian G

    > Other databases like Oracle do finish the statement within seconds, maxdb needs minutes.
    > I there a possibility to speedup the statement in MaxDB? (Besides telling the user to use better qualified statments.)
    > Why is Oracle that fast?
    Hi Christian,
    In that case Oracle can take advantage from beeing able to brute-force read many blocks at once (aka multiblock read).
    When we assume that there is an index on the oracle database available, then Oracle will likely decide to read all blocks of that index into the cache and look for matches then. It's called Fast Full Scan.
    It's not a very efficient method to address specific rows, but for this requirement it works well.
    Anyhow, you should be aware that this way of evaluating rows does not scale very well - in fact it get's more expensive with every block the index grows.
    MaxDB cannot easily read all blocks in a row, due to the fact that the pages are mixed over all data volumes. This way of storing data eliminates the need for reorganisations and evens out I/O traffic, but it comes for the price of beeing less performant when people use such unefficient predicates.
    Because of this and the way who indexes work in MaxDB (primary keys instead of rowids), MaxDB does only consider an index access for like conditions that start with a '%' when the query can be answered by only accessing the index (index only access).
    What you may try out to improve the situation is to activate the experimental read-ahead or prefetch feature, which is currently available in MaxDB 7.6. only (not in 7.5 or in 7.7).
    By setting READAHEAD_TABLE_THRESHOLD to a value >0, say 128, MaxDB can choose to
    perform table scans (no index scans!) in parallel with multiple server tasks for all table scans that are expected to pass the threshold (unit here is pages as visible in the execution plan of your statement).
    That way the usertask running the query can work on checking the data in the pages, while the server task load the pages into the cache.
    Another approach would be to have the DB Cache big enough so that most of the table would be found in the cache.
    regards,
    Lars

  • Populate list by executing query with where clause

    Hi,
    I m populating my list from database table using following command.
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("learning", new HashMap());
    EntityManager em = emf.createEntityManager();
    String query = "select d from Dept d";
    List list = em.createQuery(query).getResultList();
    My list is getting populated with all of rows in my database table(dept). The problem is, I cant use where clause in my query string.
    String query = "select d from Dept d where d.dept_name='ANYNAME'";
    Moreover I cant select even indivisual columns by using following line
    String query = "select d.dept_code,d.dept_name from Dept d";
    It looks like that my query is getting all rows from table as Object.
    What to do to
    1. put some where clause
    2. get some particular colums instead of all columns
    3. apply some table joins in query
    plz help.

    Hi Alex,
    I misunderstood your question. You had mentioned "My list is getting populated with all of rows in my database table(dept). The problem is, I cant use where clause in my query string. "
    I thought you might not have permissions to modify the code in the class, and that's why I suggested that you could write new classes.
    1) write new classes,? means if I need just two columns from a table >(instead of all columns), do I need to write new class with just two >columns (getters and setters)?You can write a SQL statement anyway you want , there are no restrictions in JDBC , so if you need just 2 columns you can write a custom query for that.
    "select column1 as a, column2 as be from table_name where column3 = xyz" etc.
    2) Is not anyway to write SQL statement like
    select dept_code,dept_name from dept where dept_name='anything'The above SQL is correct, it should work.
    3) Stored procedures? can I get some example(code) to get an idea >how to implement complex queries with where clause and joinings >using stored procedures?Stored procedures are specific to the database you are using, Oracle has a particular syntax for store procdures.
    You can call stored procedures from JDBC also, search on Google for
    "Calling stored procedures from JDBC"
    4) I m using hibernate. can I get any example of using hibernate own >query?Tutorial on Hibernate Query Language:
    http://www.hibernate.org/hib_docs/v3/reference/en/html/queryhql.html

Maybe you are looking for

  • Warning while building any DC

    Hello friends.. i am getting following Warning while building or Sync any DC. Any body have any idea how to resolve this <b>Creating Ant build file.. No 'default' JDK_HOME_PATH defined, will use running VM. Please update your configuration.</b>

  • Plsql function to return period and yr values

    Hi All, I have a requirement to develop a function which will accept any date and return the two values period, yr as follows if date is 1st oct 2011 then period should be 1 yr should be 2012 if date is 1st nov 2011 then period should be 2 yr should

  • Frames or not

    Hi We are a group of students who have to build a website using JSP as an assignment. Now there is a discussion in our group if we should use frames or not. We have about 16 beans that will be used throughout the website and we will probebly need ses

  • Accessing / Exporting photo previews ?

    Hello, I inadvertently deleted around 600 photographs. All I have left are the corresponding previews stored in LR 3's preview file. Does anyone know if it is possible to "export" or access these previews and turn them into new photo files (jpeg or d

  • Error message when download

    I've tried to download Edge Animate from https://creative.adobe.com/#apps a few times, but receive the following error message:  "Adobe Genuine Software Validation Failure. The product you are trying to install is not an Adobe Genuine Software and ap