In MS SQL SEVER.dateadd(month,1,dateordatetypevariable)What in ORACLE
EXPERTS!
In MS SQL Server to add a month in a date or date type
variable there is dateadd(month,1,'27-Oct-2001') function
which return 27-Nov-2001 & we can directly assign it as,
select @variable = dateadd(month,1,'27-Oct-2001').
WHAT IS THE EQUAL IN ORACLE FOR THAT ?
Pleas help
Many thanks!
IM.
From SQL, try:
SELECT ADD_MONTHS('27-OCT-01',1)
FROM dual ;
Or, from PL/SQL:
target_date := ADD_MONTHS('27-OCT-01',1) ;
HTH
Similar Messages
-
SQL Query find month/year and then calculate difference from start date
Hi All,
Assume I have a table with a column Start_Date. I like to know how we can build a query to so we can find the end of the month date based on the start_ date and then calculate the difference
For example lets say we have a date 12/06/2014 and now based on this we should get the end of the month date which is 30/06/2014. Now we can get the difference which is 18 days.
ThanksHi Jaggy99,
According to your description, you need to get the date difference between a given date and the last day of that month, right?
In this case, please try the query below.
SELECT GETDATE() AS [CURRENTDAY], DATEADD(DAY,-1,DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) + 1, 0)) AS [LASTDAY],
DATEDIFF(DAY, GETDATE (), DATEADD(DAY,-1,DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) + 1, 0))) AS [DIFFERENCE]
Regards,
Charlie Liao
TechNet Community Support -
Error -While create a connection to Microsoft SQL Sever from Oracle SQL Dev
Dear All,
While I am trying to create a connection to Microsoft SQL Sever from Oracle SQL Developer. The following error: "Cannot connect to Microsoft SQL Server on localhost" has been occurred.
Can anyone please guide me to solve this..
Thanks in advance,
RiderHi,
Issue not supported in sharepoint on-premise team.
In addition, as this issue is related to Powerview, I suggest you create a new thread on for Powerview forum, more experts will assist you.
https://social.technet.microsoft.com/Forums/en-US/home?forum=powerview
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Getting parsing SP error while migrating SQL Sever 7 to Oracle 8.1.7
Hello,
I migrate SQL Sever 7 database to Oracle 8.1.7 using latest
Migration Workbench + sqlsever7 plugin.
I captured the source database and created Oracle model but some
of straight forward enough stored procuderes didn't pass. I try
manually correct them but still receive the following error
message:' java.lang.StringIndexOutOfBoundsException:string index
out of range:0 ViewLog Window' I check log - not much help
I check all names - non of the exceeds 30 char.
Although, I'm not sure of following code:
@sqlstr='select....'
@sqlstr=@sqlstr+'select...'
exec @sqlstr
Could it be a cause?
Thanks in advance
MarinaYou can user Oracle Migration Workbench to migrate from SQL Server to Oracle.
Here is the link which gives info on software usage and download :
http://otn.oracle.com/tech/migration/workbench/content.html
Chandar -
Why sql sever database design is used for essbas?
Hi
I am new to the Hyperion technology . i would like to know why do we use any RDBM like sql sever database design for essbase which is itself is the database.What is the main difference between these two databases?
My understanding is that Essbase act as same as SSAS for cube and dimension building.And they use database design for storing the tables and other information.
ThanksA relational database can be used for a number of reasons with Essbase (and is required in some instances). These include
1. a repository for system tables for Shared services, EAS, Studio,EPMA, Workspace, Financial Management etc
2. A data source for loading Essbase
3. A work area for transformations -
30EA3 SQL Developer 3 error message while migrating SQL sever database
I was mirating a SQL sever 2005 database to Oracle 11g, and got the following error message during the process:
"Migration action have failed. Check the migration reports for Detail. :null".
After the error message, I could see the "Captured Database Objects" and "Converted Database objects" under the "Migration Projects". However, if I open the generated scripts, it only contains the fowlloing, nothing else:
"SET DEFINE OFF;
PROMPT Creating User Emulation ...
CREATE USER Emulation IDENTIFIED BY Emulation DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
GRANT CREATE SESSION, RESOURCE, CREATE VIEW, CREATE MATERIALIZED VIEW, CREATE SYNONYM,CREATE PUBLIC SYNONYM TO Emulation;"
What's the cause of this problem, please advice. Thanks.
BobHi Bob,
The next thing in the generation script should have been the definition of the sqlserver_utilities package.
This package emulates some of the system functions found in SQL Server.
It gets placed into your converted model as the very last step of the conversion.
Building the generation script (where your failure happened) is straight forward and I wouldn't expect an error here.
I would guess something went wrong during the capture or conversion and is only surfacing during the generation phase when it tried to write the sqlserver_utilities package to the generation file.
I could be wrong, but I would manually check that conversion completed successfully first.
1) Browse you converted model under
Migration Projects "Nav" : Projects > YourProjectName > YourModelName(default a date)> Converted Database Objects > Procedures > YourProcName
a) Are there any red crosses on any of these nodes in your navigator ?
b) If you right click on a converted database name is "reconvert" grayed out or available?
c) run the following in the SQL Worksheet against the same connection you used for the migration repository
select * from md_packages;
Is there one row there with the definition of sqlserver_utilities in its package_header and native_sql columns?
Also do you have anything in the capture issues, conversion status or conversion issues reports (double click you project and the migration reports should pop up on the right hand side, each report a separate tab) ?
Just trying to pinpoint what happened here.
Thanks for your feedback,
Dermot
SQL Developer Team.
Edited by: Dermot ONeill on Feb 16, 2011 2:48 PM -
Migration Microsoft SQL Sever 2005 to Oracle 11g cascade on delete problem
Hi, I'm trying to migrate a sql server 2005 database to oracle 11g version with the lastest version of Oracle SQL Developer. All works fine but there is a little thing that I can't migrate. I have a few tables in the sql server database that has cascade on delete but I can't migrate this through Oracle Sql Developer.
I know that Oracle database server supports it, then I can manually change the resulting database creation sql script but I'd like to know how I can do it with Oracle Sql Developer.
Thanks in advance :)Hello,
sorry for the delay.
Even after some more research I couldn't find this problem described anywhere. I can confirm your observations, the problem is easy to reproduce. Thus I reported it to SQL Developer development as this looks like a bug.
One workaround is to edit the generated DDL script and to add the ON DELETE CASCADE clause to the ALTER TABLE statement. If you don't like that: apply the scripts as they are and finish the migration. Then, in SQL Developer, right-click the table in your Oracle RDBMS schema, and click on Edit. In the pop-up window, select "Foreign Key". Then, in the lower right corner, there appears a small scroll-down menu where you can change the delete option from RESTRICT to CASCADE.
Best regards
Wolfgang -
Sql * plus 9 is not able to connect oracle 7 database
Today I have installed oracle 9i release 2 and found that the sql * plus provided with is unable to connect oracle database version 7. But before that we were able to connect the oracle 7 database well.
Any one having a clue on that...?
Is it a product bug...?
If so then please provide me some alternative solution clue or patch download link. Please remember in any condition currently it is not possible discard my oracle 7 database.
With Regards.
Soumen.No, it is not a bug. You just cannot connect with Ora9i R2 SQL*Plus to an Ora7 database.You cannot create a DB link between the two database either, if you are planning on doing that.
A solution is to install Ora8 client, which can connect to both Ora9 and Ora7 database (but a db link will stil be impossible). -
I want to accumulate rain for the day, month and year; What formula can I use?
I want to accumulate rain for the day, month and year; What formula or expression can I use.
I am using a Rain Wise product that converts pulses to an analog value. The Rain Wise device can be
set to measure up to 1", 5", or 10". I will be setting the unit to 10 inches in increments of 0.01 inches.
What I would like to do is everytime the signal increments I would like to count it as 0.01 then after reaching
a period of time whether it be a day or a month reset back to zero.
Need some advise on this problem.
Solved!
Go to Solution.Hello Ryan,
Lookout gets a Modbus over Ethernet signal which originates as a 4-20mA input to a Moxa Ethernet I/O Module (E1240) in the field. In Lookout I created a ModbusEthernet Driver and a tag which scales 0 - 65534 RAW to 0-10 Eng. [0 - 10 is inches of rain] Also, another piece of information is that after the rain gauge maxes out at 10 inches it will zero out and start over.
I though the accumulator was time based and took a sample over a specific time period, for instance, one sample every 30 seconds then accumulate. If this is so then if I have 5 inches of rain and then it stopped raining, then 30 seconds latter it would sample, it would see 5 inches and add that to be 10 inches when actually it had only rained 5 inches.
I really need some help with this process,
David Lopez
City of Corpus Christi -
Adding reminders to my calendar items is no longer an option after the software upgrade. I also can't get to day and week view, only month view. What's a possible solution? I'm using Andriod version 4.4.2 with kernal 3.4.0.
@MaloneTP
Thanks for keeping me updated! Do you see the screen options displayed in the following link: http://bit.ly/T2koBL for changing the calendar view options in Kies Air? Also, let me know if you're able to add a Reminder by following these steps: http://bit.ly/T2l9dY. Keep me posted. Thanks!
AnthonyTa_VZW
Follow us on Twitter @VZWSupport -
SQL 2008 Problem Calling an SP on an Oracle 10G Linked Server
Hi everyone
I've read through a number of posts on many sites about this issue but haven't found anything that has helped me so far. The machine I'm using is running Microsoft SQL Server 2008 64bit and the linked server I've created to Oracle 10G is using OraOLEDB.Oracle. If I test the connection in SQL Management Studio it succeeds and for any queries I have using OpenQuery to select from the Oracle DB I have no problem getting results.
The Oracle 32bit client and 64bit client versions are installed on the machine.
My problem is that I need to exec an Oracle SP which in turn inserts into various Oracle tables. I previously had this all working fine on 32bit SQL Server 2000 installation connected to Oracle 10G. Using the same code in SQL Server 2008 I get the following error:
Msg 7357, Level 16, State 2, Line 1
Cannot process the object "{CALL INTF.INTF_TW_PO_REQ_INTERFACE.MAIN(NULL, 15.000000, 0.000000, 'BLPO0099998', 'BLPO0099998', '', '', 39804, 21883, 'BLPO0099998', 249, 1, 950, 'Main', 190506, 37336, '1', TO_DATE( '20090706','YYYYMMDD' ), TO_DATE( '20090706','YYYYMMDD' ), 'INCOMPLETE',37336, {RESULTSET 1, P_Success})}". The OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE" indicates that either the object has no columns or the current user does not have permissions on that object
The call is made by the following piece of code in SQL:
SET @execCmd = N'SELECT
P_Success
FROM
OPENQUERY( ORACLE, '''+ @oracleCmd + ''')';
EXECUTE (@execCmd);
Where @oracleCmd = {CALL INTF.INTF_TW_PO_REQ_INTERFACE.MAIN(NULL, 15.000000, 0.000000, ''BLPO0099998'', ''BLPO0099998'', '''', '''', 39804, 21883, ''BLPO0099998'', 249, 1, 950, ''Main'', 190506, 37336, ''1'', TO_DATE( ''20090706'',''YYYYMMDD'' ), TO_DATE( ''20090706'',''YYYYMMDD'' ), ''INCOMPLETE'',37336, {RESULTSET 1, P_Success})}
I also tried using the below snippet from another post I found and got no joy either.
declare @result varchar(255)
exec ('BEGIN
?:= your_SP_Name(''arg1'', ''arg2'', etc);
END;
',@result OUTPUT) at your_LinkedServerName;
select @result;
OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE" returned message "ORA-06550: line 3, column 7:
PLS-00222: no function with name 'INTF_TW_PO_REQ_INTERFACE' exists in this scope
ORA-06550: line 3, column 1:
PL/SQL: Statement ignored".
I can't figure out why it doesn't work in SQL 2008 when it worked fine in SQL 2000 - PLEASE HELP!
Thank you
Alida HopeWhy development on 10g and production on 8i? Either both should be 8i or both should be 10g.
If you will keep production on 8i and development on 10g then you cannot stop such errors as there are features that are enabled by default in 10g and both the versions have very big differences.
Just go ahead and install 8i. -
I would like to move 2 users to creative cloud, but maintain all the other users (myself included) on CS5. Can I still get the reduced monthly rate? What serial number should I use?
Hi Thomasjewell,
Yes you can avail the discounted prices even you are upgrading the product just for two users. You can use the serial number for your Creative Suite 5 product.
You can follow the link: https://creative.adobe.com/plans in order to purchase Creative Cloud for Teams product.
Let me know if it works or not.
Thanks,
Ratandeep Arora -
I am using Adobe XI Pro for educators.
Every time I try to change a document into a PDF document the program asks me to sign up for a monthly fee. What’s going on???Hi Peter,
Are you still facing this issue.
I am not able to see any product registered under the email id using you are registered here.
Regards,
Ajlan Hulda. -
What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it
hi,
What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?
regards.sorry, question resolved.
-
I want to restore my data after my pad was reset, but the latest backup was 5 months back. What can I do?
There is nothing that you can do. If you don't have a more recent backup, you can't magically create a current backup now. You can use the 5 month old backup, or simply start all over again. You can download most of your purchased content again as long as you use the same Apple ID that you used to make the purchases.
Maybe you are looking for
-
Error while Executing the mapping
While I am executing the mapping this error is thrown by the server. It is big mapping and references many parent tables. ORA-12801: error signaled in parallel query server P001 ORA-01114: IO error writing block to file 201 (block # 523269) ORA-27069
-
MY iPad has suddenly lost my camera and FaceTime apps. Yes I've tried to modify in the restrictions however it is asking for a passcode that I never set up. I've also tried to go and reset my iPad but it to is asking for a passcode. Yes I've tried a
-
How to get complete path when uploading a file in Mozzila
Hi I was trying to upload a file using html code <input type="file" name="cdrfile"> then I wrote <% = request.getParameter("cdrfile")%> trying to get the path and the file name. But Mozilla doesn't return me the complete path only the file name. Does
-
Server Problem, thanks for your help
Hi there, We have 2 informix database instabce running on same machine. Call devdb and systestdb. The structure are same. The question is, when I run application on systestdb, it works. But if i run same app on devdb, seems nothing happen. I do belie
-
Song I bought isn't authorized to be played
A profesor sent me a song for a class and I wasn't able to play it on my computer because my computer wasn't authorized to play it. So I bought the song in the itunes store and after I had payed for it and it downloaded I attempted to play it and it