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. […]
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 […]
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 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?
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 […]
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 […]
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?
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?
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 […]
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 ?