Tag: oracle

Advantage of Oracle Client and Server being separated

When writing an application that’ll work with MS SQL database all we do is just we specify the connection parameters (either hard coded or dynamically). And when we install that application on a machine, we don’t care if that machine has the proper tool to make the connection to the MS SQL Server database available. […]

How to insert multiple selected row values from other table to new table

from one Query is it possible to do? To insert Multiple selected row information from one table to other table like: Customers (register_no,CustomerName, City, Country) Suppliers(register_no,SupplierName, City, Country) INSERT INTO Customers (register_no,CustomerName, City, Country) SELECT register_no SupplierName, City, Country FROM Suppliers where register_no=10; But in one time is it possible to select register_no=1,register_no=3,register_no=10; in one […]

Get the max values from list result

I have the following results in employee table : ID | Name | Number ——————— 1 | Dani | 15 2 | Dani | 20 3 | Yara | 10 I need to write sql query to get the following result: ID | Name | Number —————— 2 | Dani | 20 3 | Yara […]

Why is EXEC required to execute procedures?

Why is EXEC or EXECUTE required when calling a stored procedure? Both Oracle and SQL Server have cases when EXEC is required and when it’s not required or necessary. What’s the point of ever requiring it?

ADO.NET asynchronous reader (queue processing)

I have a large table, 1B+ records that I need to pull down and run an algorithm on every record. How can I use ADO.NET to exec a “select * from table” asynchronously and start reading the rows one by one while ado.net is receiving the data? I also need to dispose of the records […]

Gap-less sequence where multiple transactions with multiple tables are involved

I have a requirement (by law) for a gap-less numbers on different tables. The IDs can have holes in them but not the sequences. This is something I have to either solve in the C# code or in the database (Postgres, MS SQL and Oracle). This is my problem: Start transaction 1 Start transaction 2 […]

What tool do you use for developing and administrating your database?

I have always used TOAD by Quest to do my development and administration work in Oracle and MS SQL Server. However, I am trying not to be myopic in my choices. Are there other tools that you would recommend that will allow me to connect to the database(s) and perform my development and administrative duties?

Does SQL Server support the Oracle-like WITH clause?

I’ve seen mention of the Oracle WITH clause a few times around here for aliasing a subquery like this: WITH myData AS (SELECT id, text FROM SomeTable) SELECT myData from SomeOtherTable Does any version of SQL Server support this? If not, is there a particular reason they don’t? Performance? Potential for incorrect usage?

SQL query to filter unique status records

I need a SQL Server and Oracle compatible query to get the following result Table: PRIMARY IDN SECONDARY_IDN STATUS 1 47 Pending 2 47 Completed 3 47 Error 4 57 Pending 5 59 Completed 6 60 Pending 7 60 Completed My input would be either Pending, Completed, or Error. I need to list out all […]

java.sql.SQLException: Io exception: Unknown host specified

I have a server name, port number, database name, domain, username, and password. I entered the connection string using the below format: jdbc:oracle:thin:@//serverName:portNumber//domain But got the below error: java.sql.SQLException: Io exception: Unknown host specified How do I specify the connection string ?

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