Using all days in a month
Hi, how I make to use all days in a select that has only a few days.
e.g.: in a select return 5 days (01-02-08, 01-04-08, 01-12-08, 01-21-08, 01-25-08) but i need all days 01-01-08 .. 01-31-08 as a table.
Days..........Production
01-01-08....0
01-02-08....150
01-03-08....0
01-04-08....201
01-05-08....0
01-06-08....0
01-07-08....0
01-08-08....0
01-09-08....0
01-10-08....0
01-31-08....0
Edited by: user622983 on 28/01/2009 02:44
Edited by: user622983 on 28/01/2009 02:45
SELECT v.newdt, NVL (z.production, 0)
FROM (WITH d AS
(SELECT TRUNC (TO_DATE ('jan-2009', 'MON-YYYY'), 'MM')
- 1 AS dt
FROM DUAL)
SELECT dt + LEVEL newdt
FROM d
CONNECT BY LEVEL <= ADD_MONTHS (dt, 1) - dt) v,
(SELECT *
FROM (WITH t AS
(SELECT TO_DATE ('01-jan-2009', 'dd-mon-yyyy') dt,
10 production
FROM DUAL
UNION
SELECT TO_DATE ('05-jan-2009', 'dd-mon-yyyy') dt,
20 production
FROM DUAL)
SELECT *
FROM t)) z
WHERE v.newdt = z.dt(+)
ORDER BY 1;
Similar Messages
-
ICal multi-day (not all day) event in Month view not displayed over days
What is it when I have an event that starts on a Wednesday and 4:00pm and goes to Friday at 6:00pm (not clicked as an All Day Event), (in Month view) the only day showing the event is the first day?! Shouldn't it show it over the course of the 3 days!? Outlook does that (I can't believe I just referenced Outlook in an Apple Discussion... in a positive light no less). Is it a setting?
Yes, Apple any help for this would be great. The only way I've come to work around is to use multiple events. So for a flight out of town would be one event, and the return another. I would create a third event then for the actual time out of town. There must be some way to easily fix this.
-
Hi guys
I am newbie in vb net and I want your help to solve a problem.
I have this datagridview with two columns and all days of a month in custom columns.
[IMG]http://i59.tinypic.com/2qwpj15.png[/IMG]
I also have one combobox to change Year and a combobox to change Month.
Here is the code to load data
Private Sub fill_plan()
dgMonth.Rows.Clear()
Try
Dim i As Integer = 0
Dim query As String = "SELECT MonID,Unitname,Personel,Udate FROM tblMonth ORDER BY Unitname"
con.Open()
cmd = New OleDbCommand(query, con)
myDR = cmd.ExecuteReader
If myDR.HasRows Then
While myDR.Read
dgMonth.Rows.Add()
dgMonth.Rows(i).Cells(0).Value = myDR.GetInt32(myDR.GetOrdinal("MonID"))
dgMonth.Rows(i).Cells(1).Value = myDR.GetString(myDR.GetOrdinal("Unitname"))
dgMonth.Rows(i).Cells(2).Value = myDR.GetInt32(myDR.GetOrdinal("Personel"))
i = i + 1
End While
End If
myDR.Close() : con.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
End Sub
With
this code the
personel column
loads the first
day of the month.
I want to load
the column the date that is
in the database.Hello,
This can be done with less code
Private Sub fill_plan()
dgMonth.DataSource = Nothing
Dim dt As New DataTable
Try
Dim query As String = "SELECT MonID,Unitname,Personel,Udate FROM tblMonth ORDER BY Unitname"
con.Open()
cmd = New OleDbCommand(query, con)
dt.Load(cmd.ExecuteReader)
dgMonth.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
End Sub
The above loads all rows, if you want to limit the rows placed in the DataGridView this is best done in the SQL via WHERE conditions and/or with SELECT TOP x.
Formatting of the data is best done via the property window for the DataGridView on whatever column you want too. Using the above you now need to set the data property for each column and set dgMonth.AutoGenerateColumns = False, in the end we end up with
less code
edit is there a reason for returning the primary key? If so then using my method we can hide that field but I see no reason for having it in this case
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
Showing more All-Day Events in Month View?
Even with the iCal window maximized, when more than 4 All-Day events take place on the same day, Month View shows "..." instead of the usual All-Day colour bar, even if there's still half the space left in 'box' for that day....
To be clear: it shows the first 4 colour bars for the corresponding all-day events, then "..." at the top to show there are more, you have to switch to Week or Day view to see them
I looked at the plist and can't figure what could be changed.... any tips? It would really be convenient to see the maximum possible number of All-Day events even in Month view.
Merci!
François
iBook G4 Mac OS X (10.4.5)Unfortunately, it appears that this is intentional. The iCal Help file states:
"If you're in Month view and you see three dots (an ellipsis) at the top of the day, there is not enough room to show all the events on that day. To see all the events in Day view, double-click the ellipsis."
I suspect that half of the box is saved for all-day events and half for timed events. On my iMac G3, I get three dots and 3 events, on my G5 with a much larger screen I get three dots and 4 events. If anyone figures out how to alot more space to all-day events, it would be a big help. -
When I have more than two all-day events (Just one day) that are in different categories in one day, only two show. The others are hidden and you have to open the week or day calendar to view them. When the events are regular events there is not a problem, but I would like to know how to be able to view three all-day events or more from the month view. Is this even possible?
Same problem here; if I EVER find out the solution I will post it here.
-
Variable to show ALL days of the month
I have a data provider that looks like this:
OID Name Occurence
1 Lemons 20/10/2009
2 Apples 21/10/2009
3 Pearss 24/10/2009
4 Lemons 20/10/2009
5 Apples 21/10/2009
I want produce a cross tab that INCLUDES the count for each day of the month even if an occurence has not happened on that date:
Date 01/10 through to 30/10
Lemons
Apples
Pears
er how do I do this?Joe,
Insert an extra dataprovider for all the days in the month with a dummy value. You can then add that dummy value in your
crosstab and hide it.
Cheers,
Harry
PS,
Please post your mesage only once instead of 2 or 3 times. -
Show all days in a month select
hello
i have a ckeckin - checkout table as
id number pk,
emp_id number fk,
checkin date , -- user date enters
checkout date -- user logsout
totalhours number ,
totalminutes number,
state varchar2(3) default 'in'
it keeps totalhours and mins of an employer .i need
a select based on that table of one month
but i want to see the days in the month
(if a user did not enter one day iwant to see o hours , 0 minutes )
select totalhours , totalminutes , checkindate
from checkin_table
where to_char(checkindate,'mon')='FEB'
and emp_id='2'
order by checkindate
and i need something like
7,59, 1-feb
0,0,2-feb
0,0,3feb
8,04,4-feb
best regards
Aris dc
andWhat I like in that case is the pipelined function. You can see an example usage Re: Can a view be created within the BEGIN and END block of a procedure
Nicolas. -
"the importer reported a generic error" on a psd file i have been using all day.
have been editing all day on a 3 minute video for a client, then all of a sudden, a PSD file with several layers for my graphics went off line... nothing else.. just the psd file.
tried to ReLink but all I get is this
"the importer reported a generic error"
I have tried resaving the project as something else and still it wont relink.Resave psd file in Photoshop to another name and re-import.
Replace the psd on the timeline.
See if that will work. -
How to select all days in a month
I want to select all the days from 1 to the end of the monht of a month.
Something like
select day
From dual
where month = 'oct-2005'
This should give 31 records from 1-oct-2005 till 31-oct-2005 ...
Has anyone a good idea ?SELECT ename, dat
FROM emp,
(SELECT TRUNC (SYSDATE, 'MM') + LEVEL - 1 dat
FROM DUAL
CONNECT BY TRUNC (SYSDATE, 'MM') + LEVEL - 1 <
LAST_DAY (TRUNC (SYSDATE, 'MM'))
+ 1)
ORDER BY ename, datfor more SQL problems & questions, please visit
http://cafe.daum.net/oraclesqltuning -
Firefox won't allow my email to refresh (I have to click 'allow' every time). Also, I use my Webster's dictionary online account every 5-15 minutes for work, and Firefox now redirects me to 'log in' every third or fouth use (neither of these things ever happen with IE8). I'm new to Firefox and wonder how to designate sites as 'safe' (or whatever) so this doesn't happen (using XP on PC with 29). Thanks.
See:
*Firefox > Options/Preferences > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
The setting in "Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
See also:
*https://support.mozilla.org/kb/settings-network-updates-and-encryption#w_general-tab
*http://kb.mozillazine.org/accessibility.blockautorefresh
*http://kb.mozillazine.org/Accessibility_features_of_Firefox
You can try these steps in case of issues with web pages:
You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
*Hold down the Shift key and left-click the Reload button
*Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
*Press "Command + Shift + R" (Mac)
Clear the cache and cookies only from websites that cause problems.
"Clear the Cache":
*Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
"Remove Cookies" from sites causing problems:
*Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe Mode start window.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes -
List all days of a month in single SQL
I want a single SQL which should output
01/Oct/2003
02/Oct/2003
30/Oct/2003
31/Oct/2003
Is that possible?I did:
SQL> explain plan for
2 select trunc(sysdate,'Mon') + rownum -1 from all_objects
3 where rownum<=to_number(to_char(last_day(sysdate),'DD'));
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | | | |
|* 1 | COUNT STOPKEY | | | | |
|* 2 | FILTER | | | | |
| 3 | TABLE ACCESS BY INDEX ROWID| OBJ$ | | | |
| 4 | NESTED LOOPS | | | | |
| 5 | TABLE ACCESS FULL | USER$ | | | |
|* 6 | INDEX RANGE SCAN | I_OBJ2 | | | |
|* 7 | TABLE ACCESS BY INDEX ROWID| IND$ | | | |
|* 8 | INDEX UNIQUE SCAN | I_IND1 | | | |
|* 9 | TABLE ACCESS BY INDEX ROWID| OBJAUTH$ | | | |
| 10 | NESTED LOOPS | | | | |
| 11 | FIXED TABLE FULL | X$KZSRO | | | |
|* 12 | INDEX RANGE SCAN | I_OBJAUTH2 | | | |
|* 13 | FIXED TABLE FULL | X$KZSPR | | | |
|* 14 | FIXED TABLE FULL | X$KZSPR | | | |
|* 15 | FIXED TABLE FULL | X$KZSPR | | | |
|* 16 | FIXED TABLE FULL | X$KZSPR | | | |
|* 17 | FIXED TABLE FULL | X$KZSPR | | | |
|* 18 | FIXED TABLE FULL | X$KZSPR | | | |
|* 19 | FIXED TABLE FULL | X$KZSPR | | | |
|* 20 | FIXED TABLE FULL | X$KZSPR | | | |
|* 21 | FIXED TABLE FULL | X$KZSPR | | | |
|* 22 | FIXED TABLE FULL | X$KZSPR | | | |
|* 23 | FIXED TABLE FULL | X$KZSPR | | | |
|* 24 | FIXED TABLE FULL | X$KZSPR | | | |
|* 25 | FIXED TABLE FULL | X$KZSPR | | | |
|* 26 | FIXED TABLE FULL | X$KZSPR | | | |
|* 27 | FIXED TABLE FULL | X$KZSPR | | | |
|* 28 | FIXED TABLE FULL | X$KZSPR | | | |
|* 29 | FIXED TABLE FULL | X$KZSPR | | | |
Predicate Information (identified by operation id):
1 - filter(ROWNUM<=TO_NUMBER(TO_CHAR(LAST_DAY(SYSDATE@!),'DD')))
2 - filter(("SYS_ALIAS_2"."TYPE#"<>1 AND "SYS_ALIAS_2"."TYPE#"<>10 OR "
PLAN_TABLE_OUTPUT
SYS_ALIAS_2"."TYPE#"=1 AND (SELECT 1 FROM "SYS"."IND$" "I"
WHERE "I"."OBJ#"=:B1 AND ("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR
"I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE
#"=7 OR "I"."TYPE#"=9))=1) AND ("SYS_ALIAS_2"."OWNER#"=:B2 O
R "SYS_ALIAS_2"."OWNER#"=1 OR "SYS_ALIAS_2"."TYPE#"<>11 AND
"SYS_ALIAS_2"."TYPE#"<>14 AND EXISTS (SELECT 0 FROM "SYS"."
OBJAUTH$" "OBJAUTH$","X$KZSRO" "X$KZSRO" WHERE "OBJAUTH$"."O
BJ#"=:B3 AND "OBJAUTH$"."GRANTEE#"="X$KZSRO"."KZSROROL" AND
("OBJAUTH$"."PRIVILEGE#"=3 OR "OBJAUTH$"."PRIVILEGE#"=6 OR "
OBJAUTH$"."PRIVILEGE#"=7 OR "OBJAUTH$"."PRIVILEGE#"=9 OR "OB
JAUTH$"."PRIVILEGE#"=10 OR "OBJAUTH$"."PRIVILEGE#"=12 OR "OB
JAUTH$"."PRIVILEGE#"=11 OR "OBJAUTH$"."PRIVILEGE#"=16 OR "OB
JAUTH$"."PRIVILEGE#"=17 OR "OBJAUTH$"."PRIVILEGE#"=18)) OR (
"SYS_ALIAS_2"."TYPE#"=7 OR "SYS_ALIAS_2"."TYPE#"=8 OR "SYS_A
LIAS_2"."TYPE#"=9 OR "SYS_ALIAS_2"."TYPE#"=28 OR "SYS_ALIAS_
2"."TYPE#"=29 OR "SYS_ALIAS_2"."TYPE#"=30 OR "SYS_ALIAS_2"."
TYPE#"=56) AND EXISTS (SELECT /*+ */ 0 FROM "X$KZSPR" "X$KZ
SPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B
4 AND ((-"X$KZSPR"."INDX")=(-144) OR (-"X$KZSPR"."INDX")=(-1
41))) OR "SYS_ALIAS_2"."TYPE#"=12 AND EXISTS (SELECT /*+ */
0 FROM "X$KZSPR" "X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND
"X$KZSPR"."INST_ID"=:B5 AND (-"X$KZSPR"."INDX")=(-152)) OR
"SYS_ALIAS_2"."TYPE#"=11 AND EXISTS (SELECT /*+ */ 0 FROM "
X$KZSPR" "X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR
"."INST_ID"=:B6 AND (-"X$KZSPR"."INDX")=(-141)) OR "SYS_ALIA
S_2"."TYPE#"=22 AND EXISTS (SELECT /*+ */ 0 FROM "X$KZSPR"
"X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_I
D"=:B7 AND ((-"X$KZSPR"."INDX")=(-189) OR (-"X$KZSPR"."INDX"
)=(-190) OR (-"X$KZSPR"."INDX")=(-191) OR (-"X$KZSPR"."INDX"
)=(-192))) OR ("SYS_ALIAS_2"."TYPE#"=1 OR "SYS_ALIAS_2"."TYP
E#"=2 OR "SYS_ALIAS_2"."TYPE#"=4 OR "SYS_ALIAS_2"."TYPE#"=5
OR "SYS_ALIAS_2"."TYPE#"=19 OR "SYS_ALIAS_2"."TYPE#"=20 OR "
SYS_ALIAS_2"."TYPE#"=34 OR "SYS_ALIAS_2"."TYPE#"=35) AND EX
ISTS (SELECT /*+ */ 0 FROM "X$KZSPR" "X$KZSPR" WHERE "X$KZSP
R"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B8 AND ((-"X$KZSPR"
."INDX")=(-45) OR (-"X$KZSPR"."INDX")=(-47) OR (-"X$KZSPR"."
INDX")=(-48) OR (-"X$KZSPR"."INDX")=(-49) OR (-"X$KZSPR"."IN
DX")=(-50))) OR "SYS_ALIAS_2"."TYPE#"=6 AND EXISTS (SELECT
/*+ */ 0 FROM "X$KZSPR" "X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"
=1 AND "X$KZSPR"."INST_ID"=:B9 AND (-"X$KZSPR"."INDX")=(-109
)) OR "SYS_ALIAS_2"."TYPE#"=13 AND EXISTS (SELECT /*+ */ 0
PLAN_TABLE_OUTPUT
FROM "X$KZSPR" "X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND "X
$KZSPR"."INST_ID"=:B10 AND ((-"X$KZSPR"."INDX")=(-184) OR (-
"X$KZSPR"."INDX")=(-181))) OR "SYS_ALIAS_2"."TYPE#"=14 AND
EXISTS (SELECT /*+ */ 0 FROM "X$KZSPR" "X$KZSPR" WHERE "X$KZ
SPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B11 AND (-"X$KZSP
R"."INDX")=(-181)) OR "SYS_ALIAS_2"."TYPE#"=23 AND EXISTS (
SELECT /*+ */ 0 FROM "X$KZSPR" "X$KZSPR" WHERE "X$KZSPR"."KZ
SPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B12 AND ((-"X$KZSPR"."IND
X")=(-177) OR (-"X$KZSPR"."INDX")=(-178))) OR "SYS_ALIAS_2".
"TYPE#"=42 AND EXISTS (SELECT /*+ */ 0 FROM "X$KZSPR" "X$KZ
SPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B
13 AND ((-"X$KZSPR"."INDX")=(-45) OR (-"X$KZSPR"."INDX")=(-4
7) OR (-"X$KZSPR"."INDX")=(-48) OR (-"X$KZSPR"."INDX")=(-49)
OR (-"X$KZSPR"."INDX")=(-50))) OR "SYS_ALIAS_2"."TYPE#"=32
AND EXISTS (SELECT /*+ */ 0 FROM "X$KZSPR" "X$KZSPR" WHERE
"X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B14 AND ((-"
X$KZSPR"."INDX")=(-205) OR (-"X$KZSPR"."INDX")=(-206) OR (-"
X$KZSPR"."INDX")=(-207) OR (-"X$KZSPR"."INDX")=(-208))) OR "
SYS_ALIAS_2"."TYPE#"=33 AND EXISTS (SELECT /*+ */ 0 FROM "X
$KZSPR" "X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"
."INST_ID"=:B15 AND ((-"X$KZSPR"."INDX")=(-200) OR (-"X$KZSP
R"."INDX")=(-201) OR (-"X$KZSPR"."INDX")=(-202) OR (-"X$KZSP
R"."INDX")=(-203) OR (-"X$KZSPR"."INDX")=(-204))) OR "SYS_AL
IAS_2"."TYPE#"=44 AND EXISTS (SELECT /*+ */ 0 FROM "X$KZSPR
" "X$KZSPR" WHERE "X$KZSPR"."KZSPRPRV"=)
6 - access("SYS_ALIAS_2"."OWNER#"="U"."USER#" AND "SYS_ALIAS_2"."LINKNA
ME" IS NULL)
filter("SYS_ALIAS_2"."LINKNAME" IS NULL AND "SYS_ALIAS_2"."NAME"<>'
defaultauditing_options_' AND "SYS_ALIAS_2"."NAME"<>'_NEXT
_OBJECT')
7 - filter("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE
#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9)
8 - access("I"."OBJ#"=:B1)
9 - filter("OBJAUTH$"."PRIVILEGE#"=3 OR "OBJAUTH$"."PRIVILEGE#"=6 OR "O
BJAUTH$"."PRIVILEGE#"=7 OR "OBJAUTH$"."PRIVILEGE#"=9 OR "OBJ
AUTH$"."PRIVILEGE#"=10 OR "OBJAUTH$"."PRIVILEGE#"=12 OR "OBJ
AUTH$"."PRIVILEGE#"=11 OR "OBJAUTH$"."PRIVILEGE#"=16 OR "OBJ
AUTH$"."PRIVILEGE#"=17 OR "OBJAUTH$"."PRIVILEGE#"=18)
12 - access("OBJAUTH$"."GRANTEE#"="X$KZSRO"."KZSROROL" AND "OBJAUTH$"."O
BJ#"=:B1)
13 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
PLAN_TABLE_OUTPUT
$KZSPR"."INDX")=(-144) OR (-"X$KZSPR"."INDX")=(-141)))
14 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND (-"X$
KZSPR"."INDX")=(-152))
15 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND (-"X$
KZSPR"."INDX")=(-141))
16 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-189) OR (-"X$KZSPR"."INDX")=(-190) OR (-"X
$KZSPR"."INDX")=(-191) OR (-"X$KZSPR"."INDX")=(-192)))
17 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-45) OR (-"X$KZSPR"."INDX")=(-47) OR (-"X$K
ZSPR"."INDX")=(-48) OR (-"X$KZSPR"."INDX")=(-49) OR (-"X$KZS
PR"."INDX")=(-50)))
18 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND (-"X$
KZSPR"."INDX")=(-109))
19 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-184) OR (-"X$KZSPR"."INDX")=(-181)))
20 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND (-"X$
KZSPR"."INDX")=(-181))
21 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-177) OR (-"X$KZSPR"."INDX")=(-178)))
22 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-45) OR (-"X$KZSPR"."INDX")=(-47) OR (-"X$K
ZSPR"."INDX")=(-48) OR (-"X$KZSPR"."INDX")=(-49) OR (-"X$KZS
PR"."INDX")=(-50)))
23 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-205) OR (-"X$KZSPR"."INDX")=(-206) OR (-"X
$KZSPR"."INDX")=(-207) OR (-"X$KZSPR"."INDX")=(-208)))
24 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-200) OR (-"X$KZSPR"."INDX")=(-201) OR (-"X
$KZSPR"."INDX")=(-202) OR (-"X$KZSPR"."INDX")=(-203) OR (-"X
$KZSPR"."INDX")=(-204)))
25 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-222) OR (-"X$KZSPR"."INDX")=(-223)))
26 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND (-"X$
KZSPR"."INDX")=12)
27 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-251) OR (-"X$KZSPR"."INDX")=(-252) OR (-"X
$KZSPR"."INDX")=(-253) OR (-"X$KZSPR"."INDX")=(-254)))
28 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-65) OR (-"X$KZSPR"."INDX")=(-66) OR (-"X$K
ZSPR"."INDX")=(-67) OR (-"X$KZSPR"."INDX")=(-68)))
PLAN_TABLE_OUTPUT
29 - filter("X$KZSPR"."KZSPRPRV"=1 AND "X$KZSPR"."INST_ID"=:B1 AND ((-"X
$KZSPR"."INDX")=(-246) OR (-"X$KZSPR"."INDX")=(-247) OR (-"X
$KZSPR"."INDX")=(-248) OR (-"X$KZSPR"."INDX")=(-249)))
Note: rule based optimization
169 rijen zijn geselecteerd.
SQL> -
Calculate all days in month from schedule line delivery date for 12 mths
Hi experts,
I am trying to solve a problem and would appreciate any help! Im on BI7.
The user will input a date for the schedule line delivery date via a variable.
From this date I need to go forward 12 months exactly and display a key figure (outstanding value) by months but the first and last months must only use the days in that month i.e not the whole month if not selected by the user.
I.e if the user types in 13.05.2008
The display need to show (columns)
May 08 (13th to end of May 2008)
June 08 (All)
July 08 (All)
August 08 (All)
Sept 08 (All)
Oct 08 (All)
Nov 08 (All)
Dec 08 (All)
Jan 09 (All)
Feb 09 (All)
Mar 09 (All)
April 09 (All)
May 09 (1st to 12)
So I neen to restrict the key figure (Outstanding Value) by Schedule Line Delivery Date and display as above on a 12 month forecast basis from the day (sch line delivery daye) entered as a variable by the user.
I also need the first month to only show the dates in the month remaining including the date entered as a variable. The last month must go up to the day before exactly a year in front.
I have created the 12 months as a structure and can include the key figure and the schedule line delivery date. The schedule line delivery date for each period needs to be restricted. How can I do this to achieve the above?
Thanks in advance. Will assign good points for a speedy solution.
Best
Steve.Hi,
Check "OVLY" and "OVLZ" and If the sceduling is active for he shipping point /sales document type. Check "OVXD" and see If the Loading time/ Pick/pack time is determined from it. If they are getting determined from shipping point check the shipping point calender in "SCAL" .If it has saturday and sunday as holidays ,then you may have to change them. And check If the customer has goods recieving hours assigned to him (In customer master unloading point). If he has only 5 working days and If he accepts only goods at 8 am in the morining then system would propose like this.Kindly please let me know If you need any more Information on this.
Regards
Ram Pedarla -
Function to retrieve all days of the previous month.
Hi,
Yes, it's a monthly report i've been given the task to achieve.
So, all I need is all days of previous month (even if there is no data for this day)
I've been instructed to use the following code, but it does not return any value:
DECLARE
CURSOR CUR_LAST_DAY IS
SELECT TO_CHAR (LAST_DAY (ADD_MONTHS (SYSDATE, -1) ), 'DD')
FROM DUAL;
VVA_LAST_DAY VARCHAR2 (2);
VNU_JOUR NUMBER := 0;
BEGIN
OPEN CUR_LAST_DAY;
FETCH CUR_LAST_DAY
INTO VVA_LAST_DAY;
CLOSE CUR_LAST_DAY;
WHILE VNU_JOUR <= TO_NUMBER (VVA_LAST_DAY) - 1
LOOP
VNU_JOUR := VNU_JOUR + 1;
END LOOP;
END;
--CLOSE CUR_LAST_DAY
--DEALLOCATE CUR_LAST_DAY-----
On the other end, i've developped this code:
SELECT TO_CHAR(SYSDATE,'dd')
FROM DUAL
WHERE TO_CHAR(SYSDATE,'dd') >= to_char(to_date(to_char(ADD_MONTHS(SYSDATE, -1),'yyyy-mm')||'-01'),'yyyy-mm-dd')
AND TO_CHAR(SYSDATE,'dd') < to_char(LAST_DAY(to_date(to_date(to_char(ADD_MONTHS(SYSDATE, -1),'yyyy-mm')||'-01'),'yyyy-mm-dd')));Which is returning a null value. :(
RegardsHello,
You want to retrieve complete days of last month from one query...so here it is..
SELECT
TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY') COMP_DATE,
TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'DD') ONLY_DD,
TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'MM') ONLY_MM,
TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'YY') ONLY_YY
FROM DUAL
CONNECT BY LEVEL <= TO_NUMBER(TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-1)),'DD'))I am not at database machine so therefore not tested.
But one thing keep in mind that this forum only for reports there is separate forum for sql and pl/sql.
Function to retrieve all days of the previous month.
-Ammad
Edited by: Ammad Ahmed on Apr 22, 2010 10:53 PM
Spelling Mistake -
Schedule Executed weekly except for a specific day of the month
Hi all,
I need to create a schedule that run weekly every sunday at 9 PM, except for 2nd day of the month it will run at 7 AM.
I have created 2 schedules:
1. One to run weekly every sunday at 9 PM, but i don't know from where i can specify the days of the month the schedule will be inactive on it.
* I have tried By Month Day option, and choose all days of the month except second day of the month to run on it.
FREQ=WEEKLY; BYMONTHDAY=1,3,4,5,..,31; BYDAY= SUN; BYHOUR=21;
But, on the schedule preview window as i have designed the schedule from oracle warehouse builder, shows sunday, 02, July for example.
as an execution date for this schedule.
which is not appropriate.
2. Another job is created to run monthly on the 2nd day of the month,
FREQ=MONTHLY; BYMONTHDAY=2; BYDAY= SUN; BYHOUR=7;
So, please advice how to create schedules daily or weekly and neglect some days of month from it.Hi,
You can use the exclude clause introduced in 10gR2 for this by creating a schedule when your job should not run and excluding it. An example is given below.
Hope this helps,
Ravi.
create or replace procedure print_schedule_dates
schedule in varchar2,
start_date in timestamp with time zone default dbms_scheduler.stime(),
number_of_dates in pls_integer default 10
is
date_after timestamp with time zone := start_date - interval '1' second;
next_date timestamp with time zone;
begin
for i in 1 .. number_of_dates
loop
dbms_scheduler.evaluate_calendar_string
(schedule, start_date, date_after, next_date);
dbms_output.put_line(to_char(next_date,
'DY DD-MON-YYYY (DDD-IW) HH24:MI:SS TZH:TZM TZR'));
date_after := next_date;
end loop;
end;
begin
dbms_scheduler.create_schedule('monthday2',
repeat_interval=>'freq=monthly;bymonthday=2');
end;
exec print_schedule_dates('FREQ=WEEKLY;BYDAY=SUN;BYHOUR=21;exclude=monthday2',sysdate+1,30);
exec print_schedule_dates('FREQ=WEEKLY;BYDAY=SUN;BYHOUR=21',sysdate+1,30); -
3 Dots in Corner Of Day Box in Month View
When in the month view of iCal several days of every month have 3 periods/dots in the upper left hand corner of the day box that can't be deleted. Ever see this and can they be erased.
ThanksMy problem is related, and I would like to display these. Is there an override? There seems to be at least 1/2 of each daily box empty.
ical: show all-day events on monthly view?
I use iCal to track rentals in a couple of vacation apartments I manage. I have separate calendars for each, and more for personal items, etc., and a typical event would cover 7 days as an all-day event. When I checkmark 4 calendars, only 3 events will show up in the monthly view, the other(s) being designated as 3 dashes instead of the info (---). Is there a way to override this so I can quickly see what is booked for an entire month? Switching back and forth to weekly view doesn't cut it, when I need to answer availability questions quickly.
Maybe you are looking for
-
Windows Movie Maker - no sound on QT video clips
I'm trying to combine QuickTime video clips (downloaded from Casio camera) into one movie, using Windows Movie Maker (Vista). All the clips have sound when I open them in their folder but after importing the clips in to MovieMaker, there is no sound.
-
Multiple 3D frames simultaneously
Can I display at the same time more then 1 3D frame with JDK1.3 / 3D1.2.1_03 ? When I try to instanciate the second Canvas3D, I become a null pointer exception. Thanks in advance
-
Flash CS3 crashing with copy/paste between 2 files
Hi. I am a flash games developer, and I am currently working on a game that is truly massive. The main file size is over 250MB. It's been a work in progress for about 4 months of solid work. Due to the size of the file, I prefer to create things like
-
Loading Hierarchies using flat file
Hi experts, I have requirement to load hierarchies using flat file. I have to create hier on Person Responsible, sub nodes are Sales Office, Project Definition, Project Type and Project Definition Description. I have file, i need to load into BW. I d
-
hi all, im working on cheque printing in se71...there i want to change my text font differently for each text field in one window. i.e., for Pay/Beared Name : Font should be big and (Courier 10,say example) for Rupess field: less than the size