Counting Records as per Dates

Hi ,
I need the data of NOV and DEC 2007. First i need to check in my table whether i have the data of NOV and DEC 2007 .
I am not able to use a proper query to find out the data .
select count(*) from optout_tbl where date between ("2007-11-07" and "2007-12-07");
I am using this please query . but its saying missing expression . I think i am wrong .
Could any one suggest to me to find the data . Moreover its a normal table not a partitioned one.
Thanks

When i am using the below query to get the data between the selected months . I am getting error like missing expression , even i tried with double code' still have the same problem .
plz tell me that which am using queyr have any changes required.
SQL> select count(*)
from optout_tbl
where date between TO_DATE('2007-11-07', 'YYYY-MM-DD')
and TO_DATE('2007-12-07', 'YYYY-MM-DD');
where date between TO_DATE('2007-11-07', 'YYYY-MM-DD')
ERROR at line 3:
ORA-00936: missing expression
Thanks

Similar Messages

  • Count records for current date

    Hi all,
    I wnat to count no of records inserted today,
    this is my query:
    select count(emp_id) as total_records where creation_date = 'sysdate';
    it is throughing following error
    ORA-00904: "CREAITON_DATE": invalid identifier
    Could any body assist me in this.
    Thanks,
    Red.

    select count(emp_id) as total_records from emp where creation_date = 'sysdate';
    this is throwing error.What error? I can think of at least two possibilities:
    (1) your EMP table doesn't have a column called CREATION_DATE
    (2) SYSDATE is a function not a literal.
    If it is (2) then the solution would be something like
    select count(emp_id) as total_records
    from emp
    where creation_date between trunc(sysdate) and trunc(sysdate)+86399/86400 ;Either way, in the future please post the exact error message. There's literally thousands of them and you shouldn't make us guess if you want us to help you.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Counting number of records in a data block

    hi folks,
    Simple question for you guys: How can I count number of records in a data block.
    In other words, say I have 10 detail records listed on a data block (one of my columns is a non-database item for entering a number). Now I just want to do somethin like:
    Select count(*) From <data_block> into lnRecCount
    Where <non-database column> <> 0 ;
    Can I do this in a button trigger? I can't get it to work?
    Thanks,
    bob

    You should make a routine that go through records of the block and count the records that agree with your condition.

  • Count records based on detail row containing a null date field

    i need to count the no of rows where a date field is null and print the result in each group footer. the formula isnull works well in details section  but not when I create a running total to count records where evaluate condition is based on a formula and when i test isnull(field) ?
    works in detail section:
    Global NumberVar numOpen;
    if (IsNull({db.DateField}))
    then numOpen := numOpen + 1;
    does not work in group footer?
    IsNull({db.DateField})

    Abhilash Kumar wrote:
    Well, what database are you reporting off and how did you insert a NULL value to the date column?
    In my case, I have worked with Oracle, Access, and now SQL.,
    and have used several different versions of Crysal (but never XI)
    I/we don't put anything into the date...  the field is simply empty and I use 
    IsNull({datefield})
    also for numbers (&currency)
    IsNull({numberfield})
    For text fields I now use
    IsNull({textfield}) or {textfield} not equal ""
    as SQL is a little funny about the empty text fields. Sometimes one works and sometimes the other so I use both.
    Debi

  • ODS Activation - Number of Records Per Data Package

    Hello,
    We are using the default Global ODS Setting called "Min Num of Data Records"... which defaults to 10,000.
    However, when I activate the ODS and look at the job log, I see that less than 10,000 records are in most of the data packages.  Below is part of the job log.  If the setting says the minimum must be 10,000 then why am i seeing data packages with less?
    Thanks!
    Data pkgs 000027; Added records 2,536; Changed records 0; Deleted records 0
    Data pkgs 000028; Added records 2,436; Changed records 0; Deleted records 0
    Data pkgs 000029; Added records 1,171; Changed records 0; Deleted records 0
    Data pkgs 000030; Added records 1,743; Changed records 0; Deleted records 0
    Data pkgs 000031; Added records 1,552; Changed records 0; Deleted records 0
    Data pkgs 000032; Added records 8,048; Changed records 0; Deleted records 0
    Data pkgs 000033; Added records 10,001; Changed records 0; Deleted records 0
    Data pkgs 000034; Added records 10,001; Changed records 0; Deleted records 0
    Data pkgs 000035; Added records 10,001; Changed records 0; Deleted records 0
    Data pkgs 000036; Added records 10,001; Changed records 0; Deleted records 0

    Hi Fong,
    The settings for 'no of data records' specifies how many records should be transfered in a data package to BW for processing .
    However added records specifies how many records of that data package actually loaded to your data target .
    This may be because of
    1.Key fields:  Your key field settings may lead to elimination of any duplicate records
    2.Update rule: Your update rule may have some filteration of records.
    Hope this makes you clear.
    Regards,
    Prema

  • Record all the data acquired by DAQ

    Hi all,
    I have a problem when I tried to record all the data acquired by the DAQ card. My DAQ is NI 6259, and the Labview version is 2009.
    Basically, what I need do is using multiple channels to get the voltages of different point, then I subtract values of two channel (V+ and V-) to get voltage value between two points. In my vi, the sampling mode is continuous and the rate is 100 KHz, DAQmx reading is inside a while loop, and the numbers of samples per channel is set to be 100. After each loop execution I would get 100 data.  I just used the format into file to write the data into a .txt file. It seems after 1 loop only the last one data is recorded instead of 100.  Previously I averaged the 100 data inside the acquisition loop to get one data, so the writing function is OK but it really slows down the program. So I want to write all the raw data to txt file so later I can process them in Matlab.  Is there any way to achieve this? Thank you very much.
    The attached is the my vi for 2 channels voltage measurement and the current source control sub vi. I am new to Labview so the question really bothers me even after I read some similar topics in the forum.
    Regards,
    Hongxiang
    Solved!
    Go to Solution.
    Attachments:
    Dual Channel Voltage Measurement.vi ‏33 KB
    Current Source 1.vi ‏49 KB

    Thank you for you reply. I tried that, it actually record more data per pulse than before, but less pulses were  recorded (there should be 8 pulses in 20 seconds time but only 2 were recorded), I think it was because the for loop inside slows down the program execution, and sometimes the error 200279 occurred.  I think it would be better to separate the reading and recording process. Someone suggests me rather than writing to the file inside the loop, accumulate the data from all of the loop iterations to generate one large array containing all of the samples then pass that to Format Into File outside the loop. Do you know how to achieve that? I tried the as below, it seems totally wrong , only two data was written. 
    (The subvi nameed 1 (see attachment) converts the 2D array to 1D ) Thanks.
    Attachments:
    2D_Data_Reader.vi ‏9 KB

  • Counting records in Visual Composer

    Hi folks,
    I do have question I cannot find a solution ( maybe due to christmas turkey paralysis )
    I am using VC to call a RFC function in ERP system 'RFC_READ_TABLE' to access data from table.
    The table I access is a customer table containing Delta- Data
    Actually the system RFC function returns all records ( normally between 1 and 10 records).
    On VC side I'd like to display only the number of records to inform if new data is available.
    How can I count records internally in VC?
    ( I do not like to bring in data directly into BI because the application I write will merge BI Query data with non BI data)
    I'D like to use standard RFC function to receive data, but first hand I'd like to decide by number of entries whether to use data or not.
    Any help is appreciated
    TIA

    Hi Prachi,
    that's it.
    I never used that functionality for plain counting records being returned by tables
    It woks perfect.
    The glory shiny points are yours.
    Joerg

  • File content conversion record set per message

    Dear All,
    Problem:- File is of huge size because of which file content conversion is taking longer time and is failing.
    File format:-
    Header
    Detail
    Detail
    Header
    Detail
    Detail
    Detail
    Detail
    Header
    Detail
    Detail
    Trailer
    Trailer has total count of all detail record,header record and there are few checks as well as wrt other fields.
    We need to do all the above validation on the file and if it successful it shud process it otherwise alert shud be raised.
    As a step:-
    I have used record set per message for splitting up the file because of huge size this functionality is working fine but because of spitting of file i am not able to do trailer validation as XI is creating multiple records with different message ID's
    Is any other approch which will help to achieve both Spliting as well as validation
    chirag

    Chirag,
    simplest scenario I can think of is splitting the 2 reqs.
    1. create 2 folders, one for "in process" files and other for "validated" files.
    2. create 2 scenarios:
    2.1. your current sender system to in process folder (whatever to File).
           => In this you just do the validation, without FCC. You could create a simple module for that or even do it at mapping runtime, as you said (mapping may be easier to handle errors), and throw a runtime exception (which will eventually trigger an alert).
           => At the end, only files that go successfully throug the validation will be located in the "In Process" folder.
    2.2. do a simple file to file scenario (from "In Process" to "Validated" folder), this time executing FCC & splitting messages if necessary.
    Of course, this will only work if the module/mapping is able to process the large file anyway (hopefully yes, since it will still be a flat file and not XML yet).
    BR,
    Henrique.

  • BUG: Record Limit per Document doesn't work for PDF in CS4 - does it work in CS5?

    Hey all - I'm attempting to export 100 data merged documents to pdf.  I know i can use "Record Limit per Document" set to 1 to create 100 InDesign files, which isn't what i want to do.  When you select "Export to PDF" in the data merge window, the "record limit per document" option exists, but no matter what, it will always create one giant pdf file - it will NOT separate into 100 different pdf files.  This is a bug in CS4.
    I am wondering if the bug has been fixed in CS5 or if there is a workaround in CS4 to generate the pdfs.
    All I found is this ancient thread in which people say the only workaround is to batch convert the pdf files later, and then degenerates into unrelated discussion:
    http://forums.adobe.com/message/1110826

    g'day there
    has there been any follow-up to this or workarounds?
    i constantly have VDP jobs which have tens of thousands of records, but the chaps printing it only want the PDFs in lots of 500 or so. being able to do ONE merge which splits the merge into bite-size PDFs for our printing section would be preferable to making them through the dialog box in the appropriate lots.
    colly

  • Reg: When trying for [Record Set Per Message] Payload not generating MONI

    Hi,
    Can you please change the value of FCC parameters from
    Record Set Per Message:: 1
    Key Field Value: KF
    Key Field Type: Case Sensitive
    Record Set Per Message:: 1
    Key Field Value: K01
    Key Field Type: Case Sensitive
    Regards,
    Chandra

    Hi,
      If you want to split file according to Record set per message, check below settings with your configuration.
    Ex file:
    Amarsrinivas,Eli,4444,XYZ,3
    Sachin,Tendulkar,29564,ABC,9
    Ajay,Jadeja,5555,PQR,5
    *IR PART*
    See this is the Outbound Data type I have created::
    *ADT_Record_Outbound     Complex Type     *                              
    Record                            Element           0..unbounded(This is used for if Record set per message more then one.Structure Occurance.Not the message type)               
    First_Name            Element       xsd:strin     1                    
    Last_Name            Element     xsd:string     1                    
    EMP_ID                            Element     xsd:string     1                    
    Project_Status            Element     xsd:string     1                    
    Experience            Element     xsd:string     1                    
    THis is the Inboudn Data type I have created::
    ADT_Record_Inbound
    *ADT_Record_Inbound     Complex Type     *
    Record                    Element      0..unbounded(This is used for if Record set per message more then one.Structure Occurance.Not the message type.One to one mapping done)                              
    FullName     Element     xsd:string     1                         
    Global_ID     Element     xsd:string     1                         
    Project     Element     xsd:string     1                         
    IT_Exp     Element     xsd:string     1                         
    This is the Mapping I have done.....
    ForSource Message TYpe I kep Occurancs as 1
    For Target Message Type as I kept Occurances as 1
    ID Part::
    CONTENT CONVERSION PARAMETERS::
    Document Name:: AMT_Record_Outbound
    Document Namespace:: http://xxxxxxxxxxxxxxxxxxxxx
    Document Offset::
    RecordSet Name::Record
    RecordSet Structure: ---:Record,*
    Recordset Sequence,* ::: Assensding
    Record Set Per Message:: (As you required)(According to that target file and message will create)(If you mention 2 each 2 structure one message will flow in SXMB_MONI)
    Key Field Value:
    Key Field Type: Case Sensitive
    Record.fieldSeparator= ,
    Record.endSeparator= nl
    Record.fieldNames= First_Name,Last_Name,EMP_ID,Project_Status,Experience
    ignoreRecordsetName= true
    Regards,
    Prakasu.M

  • Count records; Confirm disable

    Hi!
    I'm using Oracle Forms 6i. Is there way to count number of records in a data block? I mean all records, regardless of their status.
    One more question. I use my own procedures to post data to database, so i don't use commit_form, create_record, etc. Some of my data blocks aren't associated with database. When navigating to other blocks I use clear_block and clear_record. But while navigation I sometimes get message titled "Forms" saying "Do you want to save changes?" Is there way to disable it?
    Thank you.

    your method didn't work. what i did was create a
    function xyz for record status as u suggested,create
    a formula column set its database item
    property>false,calculation mode>formula & in formula
    property called the function xyz.then I created the
    summary column &set its DBitem Prop>false
    calc.mode>summary Summ.function
    prop.>Sum,Summ.Block>my block & Summ.Item>name of
    formula column but the summary column is showing
    value 0 when I check it in pre-insert trigger.
    RegardsIt works but you need to call built-in
    recalculate('your_block.your_item') before you make
    post or commit_form. The reason why it didn't work is
    the formula was not recalculated after you make any insert, which should be 1 but stays 0.

  • Mysql database, counting records

    Hi!
    I have to store measured data to MySQL database. During this process I would like to count a number of records in a database table. It is also necessary to filter records. I'm using the SQL statement as follows:
    SELECT COUNT (fieldname) AS cnt FROM table WHERE condition
    Because I haven't got any result I've created a small database "mysweetdb" and table "icecream" to test my VIs (see picture bellow).
    The VI is attached. The result of counting is a 2D array (DB Tools Fetch Recordset Data.VI output) with one element (one row and one column). This element contains no data.
    I usually don't give up easily so I've created a similar MS ACCESS database and counted data in it. I've got a correct answer: 3. So it might be possible that there is something wrong with MySQL driver. But I've created a small Delphi project and I've counted records in MySQL database and MS ACCESS database. Both results were correct.
    Can anyone explain where is the problem in communication between LabView and MySQL database?
    Versions: XAMPP for Windows 1.7.3, LabView Developer Suite 2010 SP1, MySQL 5.1 ODBC driver
    Thanks in advance for your suggestions.
    Attachments:
    Count records.vi ‏19 KB

    ContDivConsult,
    thank you for your answer. An updated version of my VI is attached. It uses two options: LabSQL library and DB Connectivity Toolkit. LabSQL gives correct results.
    Regards,
    Ljubo.
    Attachments:
    Count records.vi ‏25 KB

  • Error: The sort order specified for distinct count records is incorrect

    When processing a measure group with a distinct count measure in it, i get the following error:
    "The sort order specified for distinct count records is incorrect."
    I have no idea what this means - any ideas?

    I had the same problem and your fix worked.  In more detail, the problematic field was contract_no.  I added a named calculation to the table in the Data Source View with the formula CHECKSUM(contract_no).  Then I created the distinct count measure on that named calculation.  And, lo and behold, the errors disappeared! 
    Thank you to Frank.
     - CindyCindy P Hoskey

  • Count records in cursor

    i have a cursor c1. i want to count the record in cursor. i used following code but showing err.
    for j in c1
    loop
    l_count := l_count + 1;
    end loop;
    error:
    the symbol ":=" was ignored.

    yash_08031983 wrote:
    suppose today there is birthday of 4 employees then birth form open with record of four employee but if there is no employees birthday then no_birth form should be open.I don't think you need cursor here. Normal query should work. For example.
    -- Checking the records for current date...
    SELECT COUNT(Employee_id)
    INTO Variable_Name
    FROM emp
    WHERE birth_date = TRUNC(SYSDATE);
    IF Variable_Name>0 THEN  -- In case if birthdays record found.
      CALL_FORM(...);
    ELSE  -- In case no record found for the current date.
      MESSAGE('Your message goes here...');
    END IF;
    ...Now in the called form set the block's WHERE CLAUSE as below...
    birth_date = TRUNC(SYSDATE)-Ammad

  • COUNTING RECORDS AND DETERMINING AVERAGES IN REPORT WRITER

    I HAVE 10 GROUPS. I WANT TO BE ABLE TO COUNT RECORDS AND DETERMINE THE AVERAGE DAYS FOR EACH GROUP. I GET DAYS BY SUBTRACTING THE RECEIVED DATE FROM THE RESULT DATE. I WANT TO DETERMINE THE AVERAGE DAYS AND THE NUMBER OF RECORDS IN THE TOP 10%, THE TOP 20%, THE TOP 30%, THE TOP 40%, THE TOP 50%, THE TOP 60%, THE TOP 70%, THE TOP 80%, THE TOP 90%, AND THE TOP 100%. HOW DO I CODE MY LOOP IN PLSQL TO DO THIS? CAN I DO THIS IN REPORT WRITER?

    I am not sure about the exact thing that you are requiring. but you can get the top 100 and top 20 or top 300 etc. by using the ROWNUM function in sql statement.
    thanks

Maybe you are looking for

  • Statspack Problem(Please Help)

    Hi, I got the below error from Statspack report run. It runs after every one hour and the database version is 9.2.0.8. Please help how to resolve it. ERROR: Database/Instance does not exist in STATS$DATABASE_INSTANCE ERROR: Begin Snapshot Id specifie

  • Pictures not appearing in Personalized Mail Form

    Dear Friends, In CRM 5.0 under transaction CRMD_EMAIL when i am inserting Logo/pictures from local desktop by insert picture option appearing in the  screen i am unable to do and  a blank screen with crossed sign in the corner image appears always, h

  • Regarding the SELECT_OPTIONS_RESTRICT

    Hi All,        Can anyone tell me how to use the  FM SELECT_OPTIONS_RESTRICT. I have to restrict the select options  for S_RSO FOR STXH-TDTITLE such that the user will be able to enter the values in the SELECT-OPTIO-LOW value and in the extensions ta

  • System requirement for Business Object XI 3.1

    Hi, I am wondering if someone can gives us some basic information regarding the system requirement to setup the Business Object 3.1 enterprise.  We have tried 2CPU & 2GB memory in a VM environment, it ran very very slow and CPU went up 100% very easi

  • Installing Java 6u10 beta on an openSUSE linux computer

    Alright, I hope I posted this in the right spot. I recently started running openSUSE and am clueless as to how to run the package manager for it. So I decided to download the Java 6u10 JDK and install it manually. However, I'm not quite sure how to d