Date Question
I need to run a query to get certain information from my Oracle table that's over 9 months old. My query doesn't seem to be working properly. Below is my query:
---Getting today's date----
currentDate = new SimpleDateFormat("MM/dd/yyyy").format(new java.util.Date());
-----query to check for drawings that are over 9 months old-------
queryRptchoice = "SELECT Drawing.dwgID, Personnel.prsnlID, Drawing.PMDwgNum, Drawing.dwgSize,";
queryRptchoice += " Drawing.Title, Personnel.fname, Personnel.lname, Checked_Out.modNum,";
queryRptchoice += " Checked_Out.chkoutDate, Checked_Out.Project, Checked_Out.AEFirm, Checked_Out.AEName";
queryRptchoice += " FROM AJM.Drawing, AJM.Personnel, AJM.Checked_Out WHERE Drawing.dwgID = Checked_Out.dwgID";
queryRptchoice += " AND Checked_Out.prsnlID = Personnel.prsnlID AND Drawing.isCheckedOut = 'yes'";
queryRptchoice += " AND Checked_Out.isCheckedOut = 'yes'";
queryRptchoice += " AND chkoutDate <= TO_DATE('" + currentDate + "', 'MM/DD/YYYY')";
queryRptchoice += " AND chkoutDate < ADD_MONTHS(TO_DATE('" + currentDate + "', 'MM/DD/YYYY'), -9)";
Any help would be greatly appreciated.
This is a common question. Go into the JDBC forum and put the words date and oracle in the search forum box. Press search. You have a few options. You can format the date differently or use a preparedstatement.
Similar Messages
-
Unlimited Data Questions...
Hey guys,
I have a few questions regarding ulimited data on my plan. I am on a plan with one other person. We share at total of 400 anytime minutes. We each have our own UNLIMITED data plans at $30 a month. We had both got Droid 1/Milestones when they came out. A year and some went by and i had recieved a Upgrade card in the mail. I used the card to purchase my Droid RAZR on 11/11/11. I was still enrolled in the UNLIMITED data plan at that point. Unlimited data was nixed as a plan on 11/28/11 which didnt effect me then but it does NOW as i am trying to upgrade to a newer phone due to speed and camera clearity. The person i am on the plan with still has their Droid 1/Milestone and ISN'T planning on upgrading ANYTIME soon. I recently recieved a text saying i could upgrade but would lose data. I use anywhere from 4.6-5.8gb of data a month because i do not have WiFi in my place of work, school, or at home.
For my questions:
1.) If i upgrade and renew for 2 years with a new phone i lose my unlimited data, correct?
2.) If the other person on my contract upgrades and then we switch phones she will lose unlimited as well
but will that effect my phone number plan?
3.) I was told that i would be paying $810 total over 18 months if i upgrade to a higher data gb plan because
it would jump from $30 a month to $75 a month which is $45 more. $45 times 18 months equals $810.
Would it be more cost effective to BUY a phone at RETAIL and then activate it?
3a.) Would Verizon charge for that?
3b.) Would that remove my grandfather?
3c.) Was the information i recieved from Verizon correct?Bawkinator wrote:
Hey guys,
For my questions:
1.) If i upgrade and renew for 2 years with a new phone i lose my unlimited data, correct?
2.) If the other person on my contract upgrades and then we switch phones she will lose unlimited as well
but will that effect my phone number plan?
3.) I was told that i would be paying $810 total over 18 months if i upgrade to a higher data gb plan because
it would jump from $30 a month to $75 a month which is $45 more. $45 times 18 months equals $810.
Would it be more cost effective to BUY a phone at RETAIL and then activate it?
3a.) Would Verizon charge for that?
3b.) Would that remove my grandfather?
3c.) Was the information i recieved from Verizon correct?
1) Yes
2) Each line has their own contract. You can swap upgrades dates. The person who the upgrade originally belonged to will lose their unlimited data.
3) Not sure where the 18 months come in since you can only upgrade once every 24 months. The 5 GB plan is $50 a month( or $20 more ) and the 10 GB plan is $80 a month( or $50 more )
3a) Charge for what? data? More data you use the more it costs. That's how a tiered data plan works.
3b) because Verizon wants to get people off of unlimited data plans. This policy has been in effect for nearly 11 months now.
3c) yes and no. -
7.9.6.1 Financial Analytics - JDE - Extract Dates question
Hi all,
Implementation of 7.9.6.1 Financial Analytics + Procurement and Spend Analytics
OLTP: JDE E9
OLAP DB: Oracle 11g
We were trying to adjust the # of prune days for an incremental load, when we discovered the change was having no effect.
Our situation - JDE*
Looking at the parameters in DAC, we found that the incremental condition in the SDEs is:
date >= *$$LAST_EXTRACT_JDEDATE*
In DAC, this parameter expands to:
TO_NUMBER(TO_CHAR(TO_DATE('@DAC_$$TGT_REFRESH_DATE'), 'DDD'))+(TO_NUMBER(TO_CHAR(TO_DATE('@DAC_$$TGT_REFRESH_DATE'), 'YYYY')) -1900) * 1000
If one keeps digging,
+$$TGT_REFRESH_DATE = @DAC_TARGET_REFRESH_TIMESTAMP in custom format, MM/DD/YYYY+
Compared to EBS*
Now, if I look at the *$$LAST_EXTRACT_DATE* parameter (used in EBS SDEs)
It expands to:
+@DAC_SOURCE_PRUNE_REFRESH_TIMESTAMP in custom format, MM/DD/YYYY+
Conclusion and question*
Obviously the Julian date conversion is required in $$LAST_EXTRACT_JDEDATE, but apparently the prune days are being considered in $$LAST_EXTRACT_DATE and not in $$LAST_EXTRACT_JDEDATE.
An obvious fix is to use @DAC_SOURCE_PRUNE_REFRESH_TIMESTAMP in $$LAST_EXTRACT_JDEDATE, but I don't know if that would have any side effects. I'll test it.
I'll raise a SR with Oracle, but wanted to check if you guys had seen this before.
Thanks, regards.-
Alex.-
Edited by: Alejandro Rosales on Feb 22, 2011 5:57 PMHi Alejandro,
Maybe this has been updated/correct in 7.9.6.2. Later today I will be in the office and can check in a VM image.
I'll update the thread as soon as soon as I have checked this out.
Regards,
Marco Siliakus -
Unsubsidized Activation and Unlimited Data Question
I'm currently an AT&T customer, and want to move to Verizon before the tiered data begins. I'd like a 4G phone, but the offerings right now are kind of sparce. So I'm thinking of buying a Droid 2 Global at full cost, and upgrading to the bionic whenever it comes out, but I've got a couple questions:
1. If I buy an unsubsidized phone and don't need to enter into a 2-year contract, will the unlimited data plan for month-to-month still be active after July 7?
2. When the Bionic finally comes out, will I be eligible for the subsidized cost? And can I keep the unlimited data for a 2-year contract?
Thanks!SweetJebus wrote:
I'm currently an AT&T customer, and want to move to Verizon before the tiered data begins. I'd like a 4G phone, but the offerings right now are kind of sparce. So I'm thinking of buying a Droid 2 Global at full cost, and upgrading to the bionic whenever it comes out, but I've got a couple questions:
1. If I buy an unsubsidized phone and don't need to enter into a 2-year contract, will the unlimited data plan for month-to-month still be active after July 7? maybe, they are saying yes, but for ho wlong its not certain
2. When the Bionic finally comes out, will I be eligible for the subsidized cost? And can I keep the unlimited data for a 2-year contract? yes
Thanks! -
I have a question about iPhoto 11 events. My camera was set to the wrong date for part of an event. I went in and did a batch change of the time and date of the affected photos. However, the date range beneath the title of the event still has the old erroneous date, and the event gets sorted by this date range. Is there a way to go in and change that date range under the title of the event? I go to the event and click on info, and the event shows the correct date range for the pics, but it is not changing the date range under the title. Thanks for any help in advance.
Thank you - I had the same problem and found your helpful answer. However, this is actually a work around to a bug in iPhoto - it's not how the Apple Support pages say it works and common sense says that if you change all the dates in an event it should sort to the right place without being re-created. Can you help me with one more thing - how do I bring this to Apple's attention so that they fix it in a future release?
Thanks again for the help. -
hi
how to insert (text) time: 09:44:02 and date:11/09/2007 to date filed in Oracle ?
i have field Tdate (date) and Ttime (date) in oracle
thanks in advance
Edited by: GoldSoft on 16:33 22/08/2011Gold, I think SB has answered your question. You use to_date to pass the character representation of a date to Oracle and identify what format the date is in using a format mask. To get a date data type out of Oracle and present it any way you want you use the to_char function and a format mask to tell Oracle how to display the date information.
You can find the date format mask characters listed in the SQL Language manual. Just look up to_date or to_char and there should be a reference to the available masks.
HTH -- Mark D Powell -- -
This is a LV6.1 question. For an application I'm debugging, flatten data is
being used on a menu ring control. The menu ring data is unflattened using
Variant to Data. What I get back from the unflatten process is the numeric value
of the menu rings index, which is what I would expect, no problem there.
What I'd like to also get back from the unflatten process, would be the
string array of names for the menu ring that was flattened. Can someone
suggest how I can do this?The data is only the number of the element chosen (a blue wire) and not any more data about the element. To get the list of strings you should use the Strings[] property node. Then, you can flatten and save that array.
Another option is to pass (or obtain) the reference to the ring to whereever you're using it and then use a property node to extract the data you need.
A third option is to use an enum which keeps the data inside the wire, but that means you will need to have the exact same enum on the other side (which means it probably won't help you). You can do this by making the enum a typedef.
What are you trying to accomplish?
Try to take over the world! -
Hi!
Can anyone help me with some questions regarding Date and Calendar(GregorianCalendar)?
How do I find the number of days in a month?
How do I find the number of weeks in a month?
(I'm making a calendar... ;)
In advance, thanks!!
JBHi!
Can anyone help me with some questions regarding Date
and Calendar(GregorianCalendar)?
How do I find the number of days in a month?What month? Presumably you mean for any given month and year.
- Construct a date for a given month using '1' for the day of the month.
- Create a calendar
- Use setTime() on the calendar to set it.
- Use getMaximum(Calendar.DAY_OF_MONTH) to get the last day
>
How do I find the number of weeks in a month?
No idea because "week in a month" is an ambigous term...
Full weeks? Does a single day count as a week? Does a week start on sunday, monday, saturday, etc?
If the start day doesn't matter. Then full weeks is "days in month"/7 and partial weeks is ("days in month" + 6)/7 -
Hi Experts,
I do not know ABAP which explains my straight forward question.
I am coding in BI.
Based on an invoice date, I need to work-out the fiscal year.
If the month of the invoice date is >= 4, then the fiscal year, is the current year.
If the month of the invoice date is jan-march, then the fiscal year, it the current year-1.
Thank you.
PYdata: gs_month(2) type c.
gs_month = gs_invoice_date+4(2).
if gs_month GE 4.
gs_fiscal_year = sy-datum+0(4).
elseif gs_month between '01' and '03'.
gs_fiscal_year = sy-datum+0(4) - 1.
endif.
Greetings,
Blag. -
Strange Matrix group by date question
I have the following data:
name
date
value
bob
1/1/2015
5
jane
1/1/2015
7
jim
1/1/2015
9
bob
1/2/2015
2
jane
1/2/2015
5
jim
1/2/2015
5
bob
1/2/2015
4
I am using a matrix with a group by date to produce the following:
1/1/2015
1/2/2015
bob
5
4
jane
7
5
jim
9
5
As you can see it only selected one value for bob on 1/2.
Is is possible to show all of the values while still grouping by date?
I would prefer something like
1/1/2015
1/2/2015
1/2/2015
bob
5
2
4
jane
7
5
jim
9
5Hi ,
I have created sample report based on your question. Steps are listed below:-
Sample query is modified to get one more Column rowid as shown in below SQL query:-
select *,row_number() over(partition by name,date order by date )rowid from
SELECT 'bob' name, '1/1/2015' date ,5 value
UNION
SELECT 'jane' , '1/1/2015' , 7
UNION
SELECT 'jim' , '1/1/2015' , 9
UNION
SELECT 'bob' , '1/2/2015' , 2
UNION
SELECT 'jane' , '1/2/2015' , 5
UNION
SELECT 'jim' , '1/2/2015' , 5
UNION
SELECT 'bob' , '1/2/2015' , 4
)T
Now Create the matrix report rows --> Name
Columns---> Date
Detail---> Value
After creation of matrix, just go to the Group Properties of Column group and add as shown below
After this setting , run the report, it will give result as shown below:-
RDL Code for reference:-
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Tablix Name="matrix1">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox3</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.21in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!value.Value)</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox2</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
<DataElementOutput>Output</DataElementOutput>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_date">
<GroupExpressions>
<GroupExpression>=Fields!date.Value</GroupExpression>
<GroupExpression>=Fields!rowid.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!date.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.21in</Size>
<CellContents>
<Textbox Name="date">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!date.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>date</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="matrix1_name">
<GroupExpressions>
<GroupExpression>=Fields!name.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!name.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>1in</Size>
<CellContents>
<Textbox Name="name">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!name.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>name</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>#6e9eca</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<DataElementOutput>Output</DataElementOutput>
<KeepTogether>true</KeepTogether>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<RepeatRowHeaders>true</RepeatRowHeaders>
<DataSetName>DataSet1</DataSetName>
<Top>0.37in</Top>
<Height>0.42in</Height>
<Width>2in</Width>
<Style />
</Tablix>
<Textbox Name="textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Strange Matrix Group by Date</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>14pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>SteelBlue</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.37in</Height>
<Width>5in</Width>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>1.04in</Height>
<Style />
</Body>
<Width>5in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>DataSource1</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>b2ebe046-5f1b-45c9-82e7-5baa7ed2460a</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText> select *,row_number() over(partition by name,date order by date )rowid from
SELECT 'bob' name, '1/1/2015' date ,5 value
UNION
SELECT 'jane' , '1/1/2015' , 7
UNION
SELECT 'jim' , '1/1/2015' , 9
UNION
SELECT 'bob' , '1/2/2015' , 2
UNION
SELECT 'jane' , '1/2/2015' , 5
UNION
SELECT 'jim' , '1/2/2015' , 5
UNION
SELECT 'bob' , '1/2/2015' , 4
)T</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<Fields>
<Field Name="name">
<DataField>name</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="date">
<DataField>date</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="value">
<DataField>value</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="rowid">
<DataField>rowid</DataField>
<rd:TypeName>System.Int64</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>dfd8f7e8-fcc1-4636-991e-d86824825c30</rd:ReportID>
</Report>
Thanks
Prasad
Mark this as Answer if it helps you to proceed on further. -
Duplicate row data question.
Hello:
I am working on displaying data from ms sql server onto a jsp. data contains metrics about number of views for each portal module/application.
The back end SQL query gives me 5 columns -
1.report_date
2.unique users
3.max_users
4.module_name
5.views
I want to display (in the jsp) one set of row for each report date, but my resultset has multiple data for same date, each with different module_name and views. The other column data (2,3) is the same.
I need to break "views" up under the appropriate module_name column and put there "views".
Is there a way i can use hashmap or arraylist to load the resultset and then create one row per report date with various module_name and there views?
Any useful input will be greatly appreciated.
JharshThanks Mchan, i think my question title is confusing.
I don;t really have duplicate rows, my data has multiple rows but different data under column - module_name,views: for the same "report_date" , and i want to display these in one row for that report_date.
jharsh
This is what i am basically trying to achieve:
report_date max_users max_concur_users module_name views
06/02/2006 10 12 XYZ 6
05/01/2006 13 9 ABC 7
12/23/2005 11 7 EFG 9
12/23/2005 11 7 HIJ 4
I need to diplay this in the jsp in the below format:
report_date max_users max_concur_users XYZ ABC EFG HIJ
06/02/2006 10 12 6 0 0 0
05/01/2006 13 9 0 7 0 0
12/23/2005 11 7 0 0 9 4
Message was edited by:
jharsh -
Hi all,
I'm hitting a wall trying to figure out how to do this, so hopefully someone can point me in the right direction... I'm also a bit new to Cocoa/Obj-c programming so hopefully this isn't too obvious
I'm building a core data document based app and have my data model designed but I realized that quite a bit of the data should be separate and shared across all documents created in the app. I'd think the easiest way would be to put those entities in a separate data store and load it concurrently in any open documents, but have it be part of the base data model. I'll try to clarify what I'm getting at:
The user can have multiple documents, and possibly multiple open at any given time, and I'll try to use a simplified example
The entities for this application are
Project
ExpenseLog
ExpenseLineItem
Categories
Vendors
The relationships are
ExpenseLog <--->> ExpenseLineItem
ExpenseLog <<---> Vendors
ExpenseLineItem <<---> Categories
Each project gets it's own file, and the application is tracking expenses (think of an ExpenseLog row as an invoice.) Most projects will have common categories and common vendors, but the ExpenseLog is unique to the project. If a user adds a vendor or category to a project, it should add it to the Vendors or Categories entity and be available across all other projects.
From what I was able to find so far, there should be a way to do this, but I have yet to find any detail on how... The second question I have, is that for an application like this would it be better (definitely easier, but better in terms of user experience) to just have a single document that contains all projects and set up a Project <-->>ExpenseLog relationship?
thanks!Hrm, let me try to rephrase this and see if I can make it clearer...
The application is a core data document based one. The idea is that there is some data that is common to all documents, and some that is unique. I'd like to store the common data in one file that is loaded and accessable across all open documents, and the unique data in each documents own file.
If I open expenselog1 and expenselog2 both documents should have the same list of vendors and categories. If I add a vendor to expenselog1, it should become available in expenselog2 and vice versa. If I open a new document, expenselog3 it should also see all of the above vendors and categories. If I add an entry to expenselog1, it should only be added to that document and saved in it's own file.
I've found some stuff on entity configurations, but apples documentation (at least what I've found so far) has little substance on this point and contains circular references (i.e. car: see automobile, automobile: see car) Also, it states that you can not create cross store relationships. Is the idea that you put an entity into multiple configurations and then if the entity is updated, both configurations are also updated? Or do you have to write code that updates both configurations discretely? Also, all the references I have found so far say to set the configuration for an entity, but it doesn't say how to configure the configuration to access a particular store.
What I'd like is that there is a common file that contains the common entities and a separate file that contains the individual documents so that the documents have access to the common elements.
Thanks. -
I'm working on a system with a lot of date validations. The validations that I built work fine as long as someone uses the correct format. The code that I'm using is:
DECLARE
DATE_CHECK DATE;
DOB_CHECK DATE;
BEGIN
BEGIN
DOB_CHECK := to_date(:P32_DOB, 'MM/DD/YYYY');
DATE_CHECK := to_date(:P32_DI_UR_DT, 'MM/DD/YYYY');
IF DOB_CHECK > DATE_CHECK
THEN
RETURN 'Urine condition onset date cannot occur before birth date.';
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN 'Urine condition onset date not a valid date.';
END;
END;
Like I said. This works correctly, as long as someone uses the four-digit year. If they only use a two-digit year (08/04/09) it keeps throwing the error that it is occurring before the birth date.
I have used JavaScript in other programs so that I could automatically format any date that is put in to the format that I want. The problem is that I can't use that functionality in this case because it will create an infinite loop.
So, my question is this: How can I isolate the year of the date in PL/SQL so that I can add either 19 or 20 to the beginning of the year so that it conforms to the format I'm using?
Thanks in advance.
JoshI would strongly advise a javascript validation to check the four digit year was supplied.
However the modified code below adds 19 or 20 to the input year.
But what if your software will beyond 2100?
Or what if you have a Dracula patient born before 1900?
DECLARE
date_check DATE;
dob_check DATE;
FUNCTION add_century(p_sdate IN VARCHAR2)
RETURN VARCHAR2
IS
BEGIN
RETURN CASE WHEN LENGTH(p_sdate )<10
THEN CASE WHEN TO_NUMBER(SUBSTR(p_sdate ,-2)) <= TO_NUMBER(TO_CHAR(SYSDATE,'YY'))
THEN SUBSTR(p_sdate ,1,6)||'20'||SUBSTR(p_sdate ,-2)
ELSE SUBSTR(p_sdate ,1,6)||'19'||SUBSTR(p_sdate ,-2)
END
ELSE p_sdate
END;
END;
BEGIN
BEGIN
dob_check := TO_DATE (add_century(:p32_dob), 'MM/DD/YYYY');
date_check := TO_DATE (add_century(:p32_di_ur_dt), 'MM/DD/YYYY');
IF dob_check > date_check
THEN
RETURN 'Urine condition onset date cannot occur before birth date.';
END IF;
EXCEPTION
WHEN OTHERS
THEN
RETURN 'Urine condition onset date not a valid date.';
END;
END; -
Actually I have a few questions so if anyone has any answers they would be greatly appreciated. Right now I have a Samsung Rogue featurephone and am charged $10 for 25MB/month which is fine with this phone. I want to get an iphone but would like to wait to see what the next one will offer and either get that one or a discounted iphone4.
So my first question is if I switch to the $30 unlimited plan before July 7th will I be grandfathered in even though I just have a featurephone or do you have to have the unlimited plan AND a smartphone.
Question two: Does anyone know if the business discount on the $30 unlimited plan will be grandfathered in? I read it will be moved to the new $50 plan but did not know if you could keep it if you already had it. (Don't have it yet but will get it if I switch over before the 7th)
And last question. I have the family share plan. My wife is also on the plan but doesn't want to switch over to the $30 unlimited plan from the $10 plan.(She would use very little data so it's not a big deal if she signs up later for the 2GB) If she ever wanted to switch to the $30/2GB plan would it change my data too or would I get to keep the unlimited. Thanks for any responses.
P.S. I know Verizon hasn't come out with anything official but even an educated guess would help.stoltz316 wrote:
Actually I have a few questions so if anyone has any answers they would be greatly appreciated. Right now I have a Samsung Rogue featurephone and am charged $10 for 25MB/month which is fine with this phone. I want to get an iphone but would like to wait to see what the next one will offer and either get that one or a discounted iphone4.
So my first question is if I switch to the $30 unlimited plan before July 7th will I be grandfathered in even though I just have a featurephone or do you have to have the unlimited plan AND a smartphone.
I cannot imgine that would make a difference. It has never been a requirment that you had to have a smartphone to have the unlimited data but it has been a requirment that you have to have an unlimted data plan to have a smartphone. If you make the switch you should be safe.
Question two: Does anyone know if the business discount on the $30 unlimited plan will be grandfathered in? I read it will be moved to the new $50 plan but did not know if you could keep it if you already had it. (Don't have it yet but will get it if I switch over before the 7th)
The business discount I would think should apply to the $30 plan
And last question. I have the family share plan. My wife is also on the plan but doesn't want to switch over to the $30 unlimited plan from the $10 plan.(She would use very little data so it's not a big deal if she signs up later for the 2GB) If she ever wanted to switch to the $30/2GB plan would it change my data too or would I get to keep the unlimited. Thanks for any responses.
That may depend on who has the primary phone. If it is you then I would think she could switch without effecting you but if her phone is primary it may not work that way. It would be a complete guess on that one though.
P.S. I know Verizon hasn't come out with anything official but even an educated guess would help. -
Java io, sort by date question
I have what I hope is a quick question - I am trying to open the oldest file in a given directory. The filenames are randomly generated, so the only criteria I have to search on is the create/mod date.
Any ideas?
thanks so much!Get all the files into an array. (You can do this with one line of code, have a look at the API documentation for java.io.File.)
Scan the array and keep track of the entry that has the oldest last-modified date.
Maybe you are looking for
-
Hi There I just purchased an Ipad Mini from a retail store close to me in Melbourne and although I mentioned I was a student this year, the store was closing and we processed the payment. Only when I got home did I realise that I am entitled to an iT
-
I updated to 10.8.5 from 10.8.4 and now trackpad won't pair.
I just updated from 10.8.4 to 10.8.5, and now my Trackpad won't pair. It worked just fine right before the update. I've changed the batteries, turned it on and off, etc., but it won't pair. Ideas?
-
Convert String Object to Comparable Object
Getting all types of warnings in Eclipse when I try to cast. I have a method that wants to accept a Comparable<Object> and I would like to pass in a string, float, or integer, and make sure of the Comparable interface.
-
I wanna find out how can i upload imovie in instagram
how can i upload imovie clip in instragram
-
While importing from my digital camera (Olympus XZ-2), it "unexpectedly quits" - seems to happen on slightly larger clips (over 90 seconds) - not sure if it is related to the model camera or iMovie 11'. Any advice?