Select data from table where field is initial

I have table that has 10 million records.
I want to select data from this table where certain date field is blank.
*SELECT * FROM table*
INTO TABLE internal table
WHERE PSTNG_DATE = BLANK.
Does anybody know how to select data from data base table when certain field is blank.
I cont select all data once and delete which i dont want, the table is big, it will blow up app server.
thanks in advance,
Sachin
Moderator: Pls do not lock the posting instead provide me the link, its disrespecting.

Respect the forum rules and common sense, and you will be respected.
"how to select data from a database table when the field is blank" is very basic, and basic questions will be locked, because they have been asked many times and you can find the answer yourself with a little effort. There is nothing disrespectful about it.
Thread locked.
Thomas

Similar Messages

  • Selecting datas from tables where tbale name is store in a row

    Hi
    I need to select datas from several different table (QE01, QE02, QE06, QEXXetc.).
    The code of the tables I need to select from is store in another table.
    Here's an example:
    In the table JOURNAL, I have several entries:
    01
    06
    21
    31
    These are the codes of the tables I need to select datas from:
    QE01
    QE06
    QE21
    QE31
    I can't use variables in here, how could that be done ?

    Hi,
    This should not be a question on how to query data, but rather on how to store them.
    You did not mention any version, but I suggest you read about partitioning,
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25789/schemaob.htm#CNCPT112
    Could be that especially exchange partition is interesting.
    My guess is that these tables are created on the fly as part of data loads?
    If so, complete that ETL process by exchanging the just loaded data into a partioned table. And your problem of what to query has disappeared.
    Regards
    Peter

  • Select data from table not in another table

    Hi,
    I want to select data from table A which is not in table B.
    Currently I am doing:
    select
    snoA,
    nameA,
    dobA
    from A
    where snoA not in
    (select snoB from A, B
    where snoA = snoB
    and nameA = nameB)
    But above is very slow.
    Can I do something like:
    select
    snoA,
    nameA,
    dobA
    from A, B
    where
    EXCLUDE ( snoA = snoB and nameA = nameB)
    Please note that I need the where condition on both the columns.
    any help will be appreciated.
    -- Harvey

    What are the approximate data volumes in A and B?
    What is "very slow"?
    What version of Oracle?
    What is the query plan?
    Without knowing anything about your system, my first thought would be to see if a NOT EXISTS happened to be faster for your data
    SELECT snoA,
           nameA,
           dobA
      FROM a
    WHERE NOT EXISTS (
        SELECT 1
          FROM b
         WHERE a.snoA = b.snoB
           AND a.nameA = b.nameB )Of course, I'm not sure why you are joining A & B in your NOT IN subquery. It would seem like you would just need a correlated subquery, i.e.
    SELECT snoA,
           nameA,
           dobA
      FROM a
    WHERE snoA NOT IN (
        SELECT snoB
          FROM b
         WHERE a.snoA = b.snoB
           AND a.nameA = b.nameB )That should be more efficient than the original query. The NOT EXISTS version may or may not be more efficient than the NOT IN depending on data volumes.
    Justin

  • Probel while selecting data from table

    Hi,
      As per my below code i want to select data from table AFKO  where  PLNBEZ = it_mat-matnr, and  GETRI  IS BLANK , but data is not comingin IT_AFKO
    **********************CODE
    select AUFNR RSNUM GAMNG PLNBEZ From AFKO into table it_afko for all entries in it_mat
                                                              where PLNBEZ = it_mat-matnr
                                                                and GETRI =  '  '.
    regards,
    zafar

    Hi,
    Try below code
    select AUFNR RSNUM GAMNG PLNBEZ From AFKO into table it_afko for all entries in it_mat
    where PLNBEZ = it_mat-matnr
    and GETRI = '00000000'.
    Hope you need the records for which GETRI is not updated.
    Regards
    Vinod

  • Can a procedure select data from tables on other schemas?

    Can a procedure select data from tables on other schemas?
    If it is posible, which syntax should I use to identify the tables and schemas on the SELECT query?

    Yes , it is possible..unless the current user has the right privileges on others' db objects schema.
    Now , as regards the syntax....
    1) The more descriptive way is to use the format ... <owner_schema>.<obj_name>.
    2) If you have declared public synonyms of other schema's objects then you can refer to them as just <obj.name>.... but the <owner_schema>.<obj_name> is not wrong.
    3) If the db objects reside on another database you must have declared a db link.... then the syntax is <owner_schema>.<obj_name>@<db_link_name>.
    Regards,
    Simon

  • Selecting date from table of type c.

    hi,
    i have a field  in table type c.......the field contain date in fallowing format 02.07.2007 ,if i have to write a select query for that table ,for selecting all entrie between two dates ...how can i do.....
    note : date in the table is of type char.i cant change the table type it is standard.i now the lenght process.please suggest me the short format

    Check if below code can give you some lead:
    PARAMETERS: p_date1 TYPE datum,
                p_date2 TYPE datum.
    DATA: l_date1 TYPE char10,
          l_date2 TYPE char10.
    START-OF-SELECTION.
      CONCATENATE: p_date1+6(2) p_date1+4(2) p_date(4) INTO l_date1
                      SEPARATED BY '.',
                   p_date2+6(2) p_date2+4(2) p_date(4) INTO l_date2
                      SEPARATED BY '.'.
      SELECT <fld1> <fld2> ...
             INTO <itab>
             FROM <table>
             WHERE date bt (l_date1, l_date2)
             AND...

  • Select datas from table in horizontal

    Hi all,
    I have this table PARAPROV where the fields is
    CODI_PROV NOT NULL VARCHAR2(3)
    CODI_REGI NOT NULL VARCHAR2(3)
    CODI_SIGL_PROV NOT NULL VARCHAR2(2)
    And I run this statment
    select codi_sigl_prov SIGLA from paraprov
    where codi_regi = (select codi_regi
    from paraprov where codi_sigl_prov='LT');where the result is
    SIGLA
    FR
    LT
    RI
    RM
    VT
    How can I have as result, one record, like this?
    SIGLA
    FR/LT/RI/RM/VT
    It's possible?
    Thank's a lot
    Paolo from Madrid

    SQL>
    SQL> With t As
      2  (
      3    Select 'FR' col From dual Union All
      4    Select 'LT' From dual Union All
      5    Select 'RI' From dual Union All
      6    Select 'RM' From dual Union All
      7    Select 'VT' From dual
      8  )
      9  Select ltrim(max(SYS_CONNECT_BY_PATH(col,'/')),'/') "Col"
    10  From
    11  (
    12     Select col,
    13           row_number() over (Order By col) As curr,
    14           row_number() over (Order By col) -1 As prev
    15    From t
    16  )
    17  Connect By prev = Prior curr
    18  Start With curr = 1;
    Col
    FR/LT/RI/RM/VT
    SQL>

  • Select data from table depending on date range

    i have first table with following data, This is calender for a year
    I have 2nd table , user created period from 1st table
    I want to select acctstartdate from 1st tale which are not within 2nd table period.
    I want to select acctstartdate as jan to aug only. I dont want to select acctstartdate for sept and oct-dec.
    Same with acctenddate. I want to select Jan-aug only
    How to do this ??
    h2007

    Do you mean this?
    SELECT *
    FROM Table1 t1
    WHERE NOT EXISTS (SELECT 1
    FROM Table2
    WHERE ACCTYRID = t1.ACCTYRID
    AND ACCTYR = t1.ACCTYR
    AND (t1.ACCTSTARTDATE BETWEEN ACCTSTARTDATE AND ACCTENDDATE
    OR t1.ACCTENDDATE BETWEEN ACCTSTARTDATE AND ACCTENDDATE
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How do you select data from tables not in the Properties table list?

    Hi I am new to SAP B1.
    I am amending the production order and wish to add fields from the Bill of Materials table Itt1.  However this table is not in the list of tables for this report.
    1. Do I have to redo the whole report in Crystal or is there a way of using the PLD report?
    2. This table join needs to have 2 fields in the join the father and the child item codes.  How many joins can the PLD report look after?  I assume that Relate to is the first join and next segment is a second join.  Am I right or not as I have been unable to find any reasonable documentation on creating and maintaining PLD reports.
    3. Where can I find information if any on System Variables and what data they represent?
    Thanks
    Chris

    Hi Cris,
    welcome to Sdn forum!
    For question 1, i think you can do this using pld.
    For question 2, to be able to view other tables, you will need to hold the ALT button and press the database table(Properties section on the lower right portion of the PLD screen), you can now view other tables. then to join other tables you will need to RELATE to and Next Segment, you can also find this under Properties and go to Content Tab.
    for question 3, you will need to create a query that will lead you to the exact field name, say for example SELECT Price from POR1, this price is actually variable 81 from purchase order line and the equivalent value is the por1.price..
    Regards,
    Darius Gragasin

  • How to select data from table having date in timestamp

    hi All,
    I have table and having one field date in type (Timestamp(6))
    Date Timestamp(6)
    I want to select the data from this table for yesterday or current date or someother day
    Please let me know the query for the same.
    Regards
    Kumar

    Do you really have a column named "DATE"? That is a reserved word in Oracle-- you cannot (easily) use it as a column name
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engin
    e options
    SQL> create table abc (
      2    date timestamp(6)
      3  );
      date timestamp(6)
    ERROR at line 2:
    ORA-00904: : invalid identifierIt wouldn't be helpful to have a column named DATE either.
    If you have a table ABC and a column TABLE_TIMESTAMP_FIELD, you would simply do as Bruce has suggested
    SELECT *
      FROM abc
    WHERE table_timestamp_field > systimestamp - 1will give you all rows from ABC where TABLE_TIMESTAMP_FIELD is from the last 24 hours. If you want all rows where TABLE_TIMESTAMP_FIELD was some time yesterday
    SELECT *
      FROM abc
    WHERE table_timestamp_field >= trunc(systimestamp - 1)
        AND table_timestamp_field < trunc(systimestamp)Justin

  • Select dates from table

    Hello,
    this is my table
    CREATE TABLE TEMP_LEAP
        "DATE_FROM" DATE
      )Data in it is inserted with procedure that takes 2 parameters of date format:
    CREATE OR REPLACE
    PROCEDURE  "T_PROC" (p_dat_from date, p_dat_to date) IS
    BEGIN
    DECLARE
      day       number     := 0;
      st           NUMBER := 0;
    BEGIN
    day := p_dat_to+1 - p_dat_from;
    for p in 1 .. day    
    loop  
       insert into temp_leapp (date_from) values (p_dat_from+st);   
        st := st+1; 
    end loop; 
    commit;
    END;
    END; Now lets fill up the data in table:
    execute T_PROC(TO_DATE('01.01.2010','DD.MM.YYYY'),TO_DATE('17.08.2013','DD.MM.YYYY'));Data is now filled in the table.
    What i want to do is make a select statment that will do the following output data:
    01.01.2010 - 31.12.2011
    01.01.2012 - 31.12.2012
    01.01.2013 - 17.08.2013What i want is get the leap year if there is one. I only need days of the year so dont mind the months.
    I need to check if there is a leap year in given period p_dat_from and p_dat_to.
    If its not then we will get only one record from our select statment and it will be made of values of: p_dat_from - p_dat_to.
    If there is a leap year in our given period we will get folowing statments (example above).
    01.01.2010 - 31.12.2011 <- first date is p_dat_from and second is the last day before leap year
    01.01.2012 - 31.12.2012 <- this is leap year. First date is start of leap year and last date is end of leap year or p_date_to (if it ends in leap year).
    01.01.2013 - 17.08.2013 <- and this is the period after leap year.
    This is a scrap of code i came ou with so far:
    SELECT
    MIN(date_from),
    MAX(date_from)
    FROM temp_leap
    WHERE remainder(to_number(to_char(date_from,'yyyy')),4) = 0
    union
    SELECT
    MIN(date_from) over (partition by to_char(date_from,'yyyy')),
    MAX(date_from) OVER (PARTITION BY to_char(date_from,'yyyy'))
    FROM temp_leap
    WHERE remainder(to_number(to_char(date_from,'yyyy')),4) <> 0
    ORDER BY 1,2;Ok thats it. I hope its understandable what i need to do.
    If you got any questions please ask away.
    PS there is all i need to do. Dont bother with questions "what i february is after before etc" i do not care about that. All the other logic is already fixed all i need is what i wrote above.
    Thanks.
    Edited by: BluShadow on 14-Mar-2013 08:24
    fixed code tags

    Here's one way...
    SQL> create table temp_leap(date_from DATE)
      2  /
    Table created.
    SQL>
    SQL> insert into temp_leap
      2  select date '2010-01-01' + rownum - 1
      3  from dual
      4  connect by rownum <= (date '2013-08-17' - date '2010-01-01') + 1
      5  /
    1325 rows created.
    SQL>
    SQL> commit
      2  /
    Commit complete.
    SQL> ed
    Wrote file afiedt.buf
      1  select min(date_from)||' - '||max(date_from)
      2  from
      3        (select date_from
      4              ,sum(leap_yr_switch) over (order by date_from) as leap_yr_switch_cnt
      5        from (
      6              select date_from
      7                    ,case when lag(leap_yr) over (order by date_from) != leap_yr then 1 else 0 end as leap_yr_switch
      8              from (
      9                    select date_from
    10                          ,case when mod(to_number(to_char(date_from,'YYYY')),400) = 0
    11                                 or (    mod(to_number(to_char(date_from,'YYYY')),4) = 0
    12                                     and mod(to_number(to_char(date_from,'YYYY')),100) != 0
    13                                    )
    14                           then 1 else 0 end as leap_yr
    15                    from temp_leap
    16                   )
    17             )
    18       )
    19  group by leap_yr_switch_cnt
    20* order by min(date_from)
    SQL> /
    MIN(DATE_FROM)||'-'||MAX(DATE_FROM)
    01-JAN-2010 00:00:00 - 31-DEC-2011 00:00:00
    01-JAN-2012 00:00:00 - 31-DEC-2012 00:00:00
    01-JAN-2013 00:00:00 - 17-AUG-2013 00:00:00Edited by: BluShadow on 14-Mar-2013 08:51
    slight correction to the leap year calculation, forgot about the 100 yrs not being leap years.

  • Heterogeneous Connectivity: Error when select data from table

    Hi all,
    I use Heterogeneous Connectivity in Oracle 10g Linux to connect SQL server Database. I use FeeTDS ODBC driver. After configuration, I create database link in Oracle, Database link is active.
    But in SQLplus, I write: select * from all_catalog@DBL; It views all tables and views in sql server database.
    When I write: select * from AA@DBL; It produce error:
    ORA-00942: table or view does not exist
    [Generic Connectivity Using ODBC]Record AA has no fields. Loading failed
    ORA-02063: preceding 2 lines from DBL
    Please help me. Thank you very much!

    I am sorry, i did not go through the entire message of yours
    Does AA exist, does not contain columns, describe the table please.
    Maybe you should not try Select * from ,,,, rather Select specific fields.. Also if in the remote database, the field and tablename are written in lower case you may want to try
    select "field_name" , from "aa" etc
    ammar sajdi

  • Select from table where field contains the first 3 character

    The value of the field contains leading zeros like 0000000123, 0000001123, 0000011123.
    Now we need to check the table for entries that contains the first three characters excluding the zeros.
    If we are looking for '123' then we should be retrieving 0000000123 and not 0000001123 or 0000011123.
    Is there a way to get that value in SQL statement with only the exact result?
    Thanks.

    P156550 wrote:>
    > We've tried to use LIKE in our SQL statements and filtered it but there are a bunch of data and we want to get the exact row to improve the performance.
    Hello Adjhan,
    Yes, you need not use LIKE.
    You can use CONVERSION EXIT. I see that the length of your data is CHAR10.
    So try to use the code i have suggested & revert back if any doubts.
    @Soumyaprakash:
    If read the original post carefully, the OP has said:
    If we are looking for '123' then we should be retrieving 0000000123 and not 0000001123 or 0000011123.
    So LIKE does not come into the picture.
    Good Luck,
    Suhas

  • Regarding selecting data from tables in report?

    How to read the data into the report which is stored in the cluster form in the database its urgent please reply me?

    Retrived from a Clustered Table
         IMPORT letter = my_table_in
            FROM DATABASE zlmetext(lm) ID text_idx.
    You'll have to find where the data was EXPORTed to find the values for some of the parms.
    IMPORT letter = my_table_in
      here, I used
          EXPORT letterdesc  FROM zlmetext-letterdesc
                 letteravail FROM zlmetext-letteravail
                 subject     FROM zlmetext-subject
                 erdat       FROM zlmetext-erdat
                 ernam       FROM zlmetext-ernam
                 aedat       FROM zlmetext-aedat
                 aenam       FROM zlmetext-aenam
                 letter      FROM it_ltr_text
            TO DATABASE zlmetext(lm) ID text_idx.
    In this case, all the fields except letter were stored in the base portion of the table record.   Only Letter was stored in the clustered area.
    Becaue I used LETTER, the "key" to the clustered area is now LETTER and my import uses LETTER as the key to find the table that i stored using letter.
    in this part
    FROM DATABASE zlmetext(lm) ID text_idx.
    the lm is the cluster and must be the same as the export.  This value can NOT be a variable and must be hardcoded as shown.
    text_idx is the built key to retrieve and this is the code I used to create it
    DATA:
      BEGIN OF text_idx,
        appl     LIKE zlmetext-appl,
        letterid LIKE zlmetext-letterid,
        srtf2    LIKE zlmetext-srtf2,
      END OF text_idx.
      text_idx-appl     = zlmetext-appl.
      text_idx-letterid = zlmetext-letterid.
      CLEAR: text_idx-srtf2.

  • Selecting data from table

    Hi just have a Labview programming question that I'm not too sure how to implement.
    Right now I have a VI that takes in an Excel file and dumps the values
    onto a 2D table. I'm extracting individual columns of values from the
    table by using "delete from array." I have 18 columns (18 arrays). I
    then group 2 arrays together to get 9 2D arrays and use them to do some
    mathematical analysis (polynomial fit). In addition the user can select
    which row in this table they want to start and the length of the array
    they want to use.
    Ideally this is what I want to do:
    Load the values onto the 2D table. The user can select (ctrl or shift?)
    the values they want to use and the program uses these values to do the
    mathematical analysis.
    For example
    Table
    2   4   5   6   7    9    10  15
    3   5   3   3   3    34  11  11
    0   0   1   5   6    11    2  10
    2   2   2   1   0      0    1    7
    Say the user want to select all the values to do the analysis except 0.
    Is this possible to do? I tried selecting values on my existing program
    but it seems that I can only exclude either the entire row or the
    entire column.
    Attachments:
    Fit Data.vi ‏674 KB

    The best way to implement this functionality would be to use a multicolumn listbox instead of a table to display your 2D data. The multicolumn listbox stores text data and outputs either a scalar or an array value for the row(s) selected.
    You could first convert your numbers to strings for display purposes and input them into the multicolumn listbox by using a property node for the listbox with the Item Names property selected. Then change it to write and wire a 2D string array into it to populate the list box. Then the user can select a row, which you could index out of the 2D string array accordingly and input into a 1D listbox so the user can select a subarray for analysis. Alternatively, you could have simply have the user select an offset and length for the subarray.
    Unfortunately there are no means of selecting or deselecting certain columns directly using the listbox, but this idea will at least deliver the desired functionality. I've attached a quick example that sums a selected set of numbers in LabVIEW 7.0. Let me know if you need an earlier version.
    Jarrod S.
    National Instruments
    Attachments:
    Table_Selection.vi ‏31 KB

Maybe you are looking for

  • Alert message 1611

    Could someone help me to exit from a recovery mode for my iphone? I've searched through many website and tried many ways but still can't have the problem fixed. An alert message 1611 comes out when I wanted to get an updated itunes. I tried re-bootin

  • Am I able to re-sync my contacts onto iMessage?

    I was messing around on my iMessage settings on my macbook, and somehow un-synced all of my contacts. It is now only bringing up numbers, instead of their names. My contact book still has all of my contacts in it, but I don't know how to get it to re

  • Not able to connect wifi after ios5 upadate

    Hi i updated my ipod with ios 5 after updation is successfully done i am not able to connect with my wifi network. the thing is my i pod is getting connected with my system but when open safari it shows error msg like this "Safari cannot open the pag

  • PDF appearing as gibberish for one user

    Hello, we produced an index PDF file using Acrobat, but one of our users, when opening it, sees just gibberish. Instead of Smith, John, it appears as Dehslgosdf dfs. She has a WinXP machine with the latest version of Adobe Reader, just like the rest

  • Security Logs

    As local admin or domain admin that equipped the right to browse domain computer file remotely. Is there any log can track or audit such access?