Tag: oracle

Oracle drop constraint cascade equivalent in Sql Server

In Oracle, to drop the constraint PK_SAI I use the syntax: ALTER TABLE “SAISIE” DROP CONSTRAINT “PK_SAI” CASCADE; What is the equivalent of this in SQL Server?

Need Help for performing below calculation

I have a certain value say 10 as a base for my calculation. Now the growth for the first period corresponding to value 10 is 5 . The resultant which i want is 10*(1+5/100) which is basically Base * (1+ % of Growth) . The resultant Value for the first period will be the new […]

How can I practice my SQL Server, Sybase, and Oracle skills on a linux box?

I have a linux box. When I had a Windows box, I was able to download the free non-commericial use MS SQL Server. How can I run free personal copies of SQL Server, Sybase, or Oracle on my linux box? I don’t need to to have any permanent databases or any great amount of storage. […]

HAVING – GROUP BY to get the latest record

I have a table called RESULTS like this : RESULTS_IDN NAME SUBJECT YEAR QUALIFIED 1 MARK ENGLISH 1989 N 3 MARK ENGLISH 1991 N 5 MARK ENGLISH 1993 Y 7 MARK ENGLISH 1995 N 2 MARK MATH 1990 N 5 MARK MATH 1993 N 6 MARK MATH 1995 Y 4 MARK SCIENCE 1991 N 9 […]

powershell oracle query – dynamically assign reader object member

I have to query many oracle database tables using powershell. Is there a way to dynamically build the variables to use for the reader object members? I have to specify the reader object member names like GetInt64(3), GetString(4), and so on for me to retrieve values for each column in the table. Since I have […]

Portable SQL : unique primary keys

Trying to develop something which should be portable between the bigger RDBMS’es. The issue is around generating and using auto-increment numbers as the primary key for a table. There are two topics here The mechanism used to generate the auto-increment numbers. How to specify that you want to use this as the primary key on […]

SQL Server/Oracle table writable only by a trigger?

I am wondering if is there a way to make a table writable only by an specific trigger in SQL Server or Oracle DB. Just to make an example: Table: “Operation” ID | Date | Account1_ID | Account2_ID | Amount Table: “Transactions” ID | Date | Account | Debt | Credit What I want to […]

REGEXP_LIKE conversion in SQL Server T-SQL

I have come across this line in an old report that needs converting to SQL Server. REGEXP_LIKE (examCodes, learner_code) examCodes being the source and learner_code being the pattern. I know that SQL Server doesn’t have REGEXP_LIKE and most places tell you to use PATINDEX. Here’s me thinking that this would work: PATINDEX(learner_code, examCodes) But I […]

best way to migrate a windows forms application from sql server to oracle

I looking for a best way to migrate a Windows Forms application from MS SQL Server to Oracle. The table schema is recreated in oracle allready and the data was copied into Oracle tables. The App uses ADO.NET Datasets to access the DB. So, should I just kind of replace all references to SqlDataAdapter with […]

SQL Agent Job – Connection may not be configured correctly or you may not have the right permissions on this connection?

I’m getting this error when running an SSIS package through SQL Agent Failed to acquire connection “ORACLE ADO.NET”. Connection may not be configured correctly or you may not have the right permissions on this connection. When I log on as the SQL Agent User and run the ssis package directly it is fine. When I […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.