Count the number of entries per calendar
Wondering if there is any way to know how many entries I have in a specific calendar.
Would like to be able to delete the empty ones.
Thanks!
Try this in Script Editor:
AK
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "iCal"
repeat with ThisCal in calendars
set EventCount to count of events of ThisCal
set ToDoCount to count of todos of ThisCal
display dialog (name of ThisCal & " - Events: " & EventCount & " ToDos: " & ToDoCount)
end repeat
end tell</pre>
Similar Messages
-
Give me a way to count the number of entries in a Database Table
Hello All,
I am writing a code to determine the number of entries in a SAP/Custom table.
Can you please suggest a proper approach and a good query.
Thanks in advance.Hi,
If you want to do it in a more generic way you can do the following:
DATA: tblname(50),
tp_rows TYPE i.
tblname = 'MARA'.
SELECT COUNT(*)
FROM (tblname)
INTO tp_rows.
IF sy-subrc <> 0.
CLEAR tp_rows.
ENDIF.
At runtime the table is being determined and in this case it's set to MARA. The value of the number of rows is in the variable tp_rows.
Best regards,
Guido Koopmann -
Powershell commnd to count the number of mailboxes per database in Exchange 2010
Guys,
Do yu have any script or powershell command to display the number of mailbox count per database, database size and last backup report.
Regards
Krishna Stry this one:
Get-MailboxServer|foreach{Get-MailboxDatabase-status|selectserver,name,backupinprogress,lastfullbackup,@{n="Mailboxes";e={$_.count}},@{N="DatabaseSize
GB";E={"$([math]::round($_.DatabaseSize.Tobytes()/1Gb,2))GB"}}}
|ft -
Create a field routine to calculate the number of days per month
Hi Experts,
I need to create a field routine to count the number of days per month based on 0CALMONTH. Could you give me some inputs on how to do it?
Thanks!Hi,
Create InfoObejct and then insert it in InfoSource/InfoCube/DSO then write simp,e code for that based on your 0CALMONTH values.
You just copy and pas this in SE38 and see the result and implement for your requirements.
REPORT ztest1.
Data: zsydt type sy-datum,
zd(2) type n,
zm(2) type n,
zy(4) type n,
zcmnth TYPE /bi0/oicalmonth,
znds TYPE /osp/dt_day.
zsydt = sy-datum.
zd = '01'.
zm = zsydt+4(2).
zy = zsydt+0(4).
CONCATENATE zy zm zd INTO zsydt.
CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
EXPORTING
iv_date = zsydt
IMPORTING
ev_days = znds. "No.of days in month.
write:/ zd.
write:/ zm.
write:/ zy.
write:/ zsydt.
write:/ znds.
Thanks
Reddy -
How to find the number of records per months in cube
Hi,
how to find the number of records per months for my all cubes?
Can i use the ListCube transaction to find totl number f records per cube monthwise ?
JimmyHi,
Here is a program to generate no of records and list of ODS and Cubes in Active version.Schedule this program in background and create a cube to load this information and schedule to the data from the file generated by the program. Schedule this all per you requirement.
1.Copy the code into your Z<programname> from Se38.
2.change the FILENAME in CALL FUNCTION 'GUI_DOWNLOAD' in the program to the location from where you can pick the information to load data to cube(eg Application server).
3.Save program.
4.Schedule the program in background as required
5.Create cube with infoobjects to hold no of records and Infoprovider name
6.Load this cube based on event after the program job is done.
Hence you can report on this cube to see no of records in CUBE or ODS in your box.
Please find the code below.
Cheers,
Kavitha Kamesh.
types: begin of itabs ,
tabname type dd02l-tabname,
end of itabs.
data: itab type itabs occurs 0 with header line.
data: counter type i.
data: begin of itab1 occurs 0,
tabname type dd02l-tabname,
counter type i,
end of itab1.
DATA: ITABTABNAME TYPE STRING.
DATA: LENGTH TYPE I.
DATA: OBJECT(30).
data: str(6) type c.
select tabname from dd02l into table itab where ( tabname LIKE '/BIC/F%' or tabname LIKE '/BIC/A%00' )
and TABCLASS = 'TRANSP' and AS4LOCAL = 'A'.
loop at itab.
select count(*) from (itab-tabname) into counter.
str = itab-tabname.
if str = '/BIC/F'.
LENGTH = STRLEN( ITAB-TABNAME ).
SHIFT itab-tabname BY 6 PLACES LEFT.
ELSEIf str = '/BIC/A'.
SHIFT itab-tabname BY 6 PLACES LEFT.
LENGTH = STRLEN( ITAB-TABNAME ).
LENGTH = LENGTH - 2.
endif.
itab1-tabname = itab-tabname(LENGTH).
append itab1.
itab1-counter = counter.
clear itab-tabname.
clear: COUNTER.
endloop.
*********** itab1
loop at itab1.
write:/ itab1-tabname, itab1-counter.
endloop.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = 'c:records.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = ','
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = itab1
* FIELDNAMES =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How do I count the number of records returned in the CMIS query
How do I count the number of records returned in the query CMIS?
SELECT COUNT(*) FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = \'RD_PROJETOS_EXCLUSIVOS\''}
Euler HomeroHi Euler,
interestingly enough, the reference guide for CMIS ( http://wiki.alfresco.com/wiki/CMIS_Query_Language ) that I found does not mention the COUNT function at all. On the other hand it states that: "The SELECT clause identifies which virtual columns to return in the result set. It can be either a comma-separated list of one or more queryNames of properties that are defined by queryable object types or * for all virtual columns."
There are, however, some other posts like e.g. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-sql/ which state that they could make it working.
Having asked in the WebCenter Portal forum, I assume that your content repository is WebCenter Content. The CMIS doc for the Content is available here: http://docs.oracle.com/cd/E23943_01/doc.1111/e15813.pdf (no COUNT there either). It does, however, mention explicitly that "CMIS queries return a Result Set where each Entry object will contain only the properties that were specified in the query.". This means your could rather investigate the Result Set. Note that there are also other means than CMIS how to get the requested result set (e.g. calling a search service directly via so-called RIDC).
In the given context I am also interested what your use case is. OOTB CMIS in WebCenter Portal is used, for instance, in Content Presenter, where it is content rather than "parameters" what's displayed. -
Count the number of comments in a PDF file automatically?
Hello O Experts,
My documentation team members use Acrobat and Reader 8, and frequently need to count the number of comments in a PDF file. Is it possible to count the number of comments automatically? We can't find this functionality anywhere, and have to resort to manual counting. Since our PDFs can contain thousands of comments, this is very time-consuming. I've tried searching the Web and these forums, but the words "count" and "comments" are too frequent in other contexts to find anything useful...
Thanks and best regards,
--M.T.Hi again sypark,
That is a great idea, and it works!
I would actually search on a more unique phrase - for instance, "Subject:" - that definitively occurs a single time per comment. The reason is:
There are many types of comments, not just sticky notes... you have highlights, text deletions, text insertions, replacement text, attachments, callouts, and so on. But each of them has a "Subject:" in the summary.
It's best to avoid searching for the comment names because they differ by language (an important issue when you work with colleagues in multiple countries). For example, the name of the "Highlight" comment type in French is "Texte surligné" - so you'd have to search for the latter term to get an accurate count.
In any case, your method is flexible and allows for easy customization of comment counts. Many thanks for your effective help!
Cheers,
--Michael -
Display number of entries per sort order
G'day all.
Does anybody know how I can display number of entries per sort order in
ALV grid.
i.e. ABC 2000
2000
2000
3 (entries) 6000
DEF 1000
HIJ 2000
2 (Entries) 3000
5 (Total Entries) 9000Hi,
The way I did it I used "AT END OF " statement and added my amount to a
variable and then move my variable in work area and then modified your
internal table from work area transporting that field or depending on
your requirement that you need to add a separate line for totals append
the internal table which you are going to use it for first display. Then
after the set_table_for_first_display I added the alv_build_sort
criteria. And call method alv_list->set_sort_criteria exporting the
internal table i_sort.
Cheers,
Chaitanya -
How to count the number of Fridays and Saturdays between two dates
Hi every one ... If we want to count the number of Fridays and Saturdays between two dates, how would we do that ? !
Dates are ( 11-Feb-2010) to (19-May-2010)
how to do it in SQL
Edited by: khalidoracleit on Jul 28, 2010 5:51 AMsome nice coding here, I'm still amazed with what some people can do with "connect by". But I agree with some statements here that this can take "time", and to be honest, it's funny to see it working, but if you do not have a computer, just a calendar and some paper, would you go for "counting" so there must be a better solution?
The best working math in here is done by Aketi Jyuuzou, who writes so good English that I wonder why he still insists that he doesn't ;-)
Anyhow I "translated" that code to English, and I really like that math. Math is math and data is data.
ALTER SESSION SET NLS_DATE_LANGUAGE='ENGLISH';
WITH my_dates AS (
SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100519','yyyymmdd') end_date FROM DUAL
UNION ALL
SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100214','yyyymmdd') end_date FROM DUAL
UNION ALL
SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100213','yyyymmdd') end_date FROM DUAL
UNION ALL
SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100212','yyyymmdd') end_date FROM DUAL
SELECT to_char(start_date,'DD.MM.YYYY') start_date,to_char(end_date,'DD.MM.YYYY') end_date,
to_char(start_date,'DAY') start_weekday,to_char(end_date,'DAY') end_weekday,
end_date-start_date day_difference,
(next_day(end_date,'FRIDAY')-7
-next_day(start_date -1,'FRIDAY'))/7+1
+(next_day(end_date,'SATURDAY')-7
-next_day(start_date -1,'SATURDAY'))/7+1 as count_of_fr_and_sat
FROM my_dates;
START_DATE END_DATE START_WEEKDAY END_WEEKDAY DAY_DIFFERENCE COUNT_OF_FR_AND_SAT
11.02.2010 19.05.2010 THURSDAY WEDNESDAY 97 28
11.02.2010 14.02.2010 THURSDAY SUNDAY 3 2
11.02.2010 13.02.2010 THURSDAY SATURDAY 2 2
11.02.2010 12.02.2010 THURSDAY FRIDAY 1 1 -- andy -
Count the number of extracted lines
Access vekp with vekp-objkey = mkpf-xblnr and vekp-vpobj = '03' and vekp-uevel = blank.
Get field vekp-venum.
Access again vekp with vekp-vpobjkey = mkpf-xblnr and vekp-uevel = vekp-venum.
Count the number of extracted lines.Hi,
First u should start writing the code on ur own:
here's some sketch:
tables: vekp, mkpf.
data: begin of itab_vekp occurs 0,
venum like vekp-venum,
end of itab_vekp.
data: begin of itab_mkpf occurs 0,
xblnr like mkpf-xblnr,
end of itab_mkpf.
data: count type i.
select-options: s_xblnr for mkpf-xblnr.
select xblnr from mkpf into table itab_mkpf where xblnr in s_xblnr.
select venum from vekp
into table itab_vekp
* for all entries in itab_mkpf
where vpobjkey = itab_mkpf-xblnr
and vpobj = '03'
and uevel = ' '.
if sy-subrc eq 0.
count = sy-dbcnt.
endif.
Edited by: Mahesh Reddy on Mar 4, 2009 7:07 AM -
How can I re-establish the notification of the number of mails per folder?
The number of emails per folder always was shown in thunderbird but with the last updates regularly is lost. In the past the columns shown with the folders could be chosen - how can this be done in the new version (v.24.6.0 under windows 8.1)?
Do you have this add-in installed:
https://addons.mozilla.org/en-US/thunderbird/addon/extra-folder-columns/
I've never had problems displaying the columns, with various TB versions or themes, but maybe you have another add-on that is causing the problem, or your pane layout has changed. What happens if you re-install the EFC add-on? -
Is there a way to count the number of times an array moves from positive to negative?
I have an array of values, and I need to find the number of times that the array changes signs (from positive to negative, or vice versa). In other words from a graphical standpoint, how many times a certain line crosses the x-axis. Counting the number of times the array equals zero does not help however, because the array does not always equal exactly zero when it crosses the axis (ie, the points could move from .1 to -.1).
Thanks for you help. Feel free to email me at [email protected] I only have lv 5.1.1 so if you attach any files, they cannot be version 6.0.Attached is a VI showing the # of Pos and Neg numbers in an array, with 0 considered as non-Pos. It is easily modifiable to other parameters - including using the X-axis value as your compare point versus only Zero.
This is a modified VI from LV (Separate Array.vi)
Compare this with your other responses to find the best fit.
Doug
Attachments:
arraysizesposneg.vi 40 KB -
How to set the number of rows per page dynamically
Hello all,
i urgent need the option to set the number of rows per page dynamically.
I've got a parameter.
In dependence of the value of this paramter i want to set the number of rows per page of a repeating frame.
The Reports Builder version i use is 10.1.2.0.2
I defined a report trigger.
My code so far:
function R_G_BEMERKUNGFormatTrigger return boolean is
begin
if :vYN_Display_one_per_page = 'Y' then
--what i've to write right here??
return (TRUE);
else
return (TRUE);
end if;
return (TRUE);
end;
Can anyone help me please??
Best regards
FlorianDo you just need to change back and forth between 1 and some other number? If so, you can create two identical layouts, one with the "number of rows per page" preperty (on the repeating frame) set to 1 and the other layout set to whatever. You would have to have duplicate layouts for each group you wanted to do this with. Your format trigger on the outermost master group frame where num of rows was 1 would look like:
function M_G_ename_GRPFRFormatTrigger return boolean is
begin
if :vYN_Display_one_per_page = 'Y' then
return (TRUE);
else
return (FALSE);
end if;
end;Your format trigger on the outermost master group frame where num of rows was whatever would look like:
function M_G_ename_GRPFR1FormatTrigger return boolean is
begin
if :vYN_Display_one_per_page = 'N' then
return (TRUE);
else
return (FALSE);
end if;
return (TRUE);
end; -
How to count the number of rows in a cube!!??
Experts,
I can somebody tell me how do I count the number of rows in my cube when i am using listcube???..
Thanks
AshwinHi,
have a look ath this theard too
Number of Records in Cube
regards -
How to count the number of rows in a resultser object?
hi there
how to count the number of rows in a resultser object which may contains millions of rows? besides using a while loop? thanksYou don't, you execute a query whose result is the record count of those records that match the search and then you execute the actual query to create your record set. Typically you do
select count(id) from YourTable where [filter]
from the resulting ResultSet do
int res.getInt(1);
which gives you the count and then
select id from YourTable where [filter]
to produce the actual result set.
in the second query the id part can be substituted with the actual fields you want.
Maybe you are looking for
-
Can I run two thunderbolt display monitors off of my new 27" iMac?
Can I run two thunderbolt display monitors off of my new 27" iMac?
-
SOAP:ENV Error: Resource..not found on this server
I created a simple java class with a method that returns org.w3c.dom.Element type. Created web service for this class and method in Jdeveloper. Deployed this web service in OC4J locally (as explained by other web services examples). Then I created a
-
Block - Why are you hiding?
Hello! I have a problem with component SRQM_INCIDENT_H. Am trying to add Notes as a Block. This block is available in the View Configuration: However when displaying or editing a Service Request (Support Ticket), this block is not available: Any idea
-
My home button doesn't work at all, what should I do to close my apps?
The home button on my iPod doesn't work at all, even wen I press on it really hard. Any suggestions on what I should do?
-
Hi, I am running a data guard environment with a primary and a physical standby database. Is it possible to not replicate a particular schema with its objects (tables, views, packages etc) and associated tablespaces. Will changing to logical standby