SQL Questions


Looping Queries in Oracle using data from SQL Server
I have a table of entries from SQL server called PID. Each of this entry should follow the following select * from HR.TABLES a START WITH a.SID = ’0′ CONNECT BY PRIOR a.parentid = a.sid’ Where I have ’0′ in the query above, should take all the values from PID. Is there a easy way [...]

Answer Question   |  March 2, 2009  4:05 PM
Oracle development, Oracle queries, SQL, SQL queries, SQL Server connectivity
asked by:
5 pts.

How to validate user parameters in Oracle Reports 6i?
Hi! I am using Oracle reports 6i to modify a standard report. I need to add two user parameters and a field retrieved should be between them if they are not left blank. If they are left blank, then, they should not be taken into consideration. My problem is: These two parameters are included in [...]

Answer Question   |  June 12, 2011  5:00 AM
Oracle Reports, Oracle Reports 6i, Oracle Reports 6i User Parameters, SQL
asked by:
5 pts.

SQL DB MIRRORING ACROSS VPN?
Can SQL 2005 DB mirroring work if the mirror server is to be in another building (building networks connected via VPN router)? We just want employees to be able to remote into the mirror server from home if power is lost at the main building.

Answer Question   |  February 26, 2009  4:50 PM
SQL, SQL database replication, SQL Server Database Mirroring, VPN
asked by:
5 pts.

Virtual machine setup – SQL 2005
I’m setting up a virtual machine — SQL 2005 install — and I want to make a separate drive for the logs and one for the data, but as this is a virtual environment using the same mirrored physical disk, is that advisable?

Answer Question   |  February 25, 2009  2:22 PM
SQL, SQL 2005, Virtual Machines, VM
asked by:
35 pts.

SQL Server 2005 query to get the average
Hi, I’m using MSSql 2005 on Windows 2003 Server. I need some assistance to write a query to get the average of two columns and write the value to a third coulmn. All the transactions is in one table. Basically it is column 1 + column 2 devide by two = column 3 Thank you, [...]

Answer Question   |  February 24, 2009  5:43 AM
SQL, SQL queries, SQL Server 2005, Windows Server 2003
asked by:
75 pts.

Finding the number of rows of all tables of a user/schema in Oracle
how can i know all the table names along with the no. of rows they contain for a user/scema in oracle 9i through sql? plz answer ……

Answer Question   |  February 23, 2009  7:16 PM
Oracle 9i, Oracle SQL, ROWCOUNT statement, SQL, SQL queries
asked by:
15 pts.

SQL query and Oracle database design help needed
Sorry for all the confusion with the questions.So let me clear myself,i am doing this not as assignment or homework,but something which interests me and trying to leran.Earlier as I stated that its a part of my school(** well frnakly speaking, it was my plan if i could put this as an item of the [...]

Answer Question   |  February 23, 2009  6:22 AM
Database design, Oracle development, Oracle SQL, SQL, SQL queries
asked by:
25 pts.

How can I select unique records from Access based on two criteria
I need to do the following: SQL = "select amount, count(amount) from table1 group by amount having count(*) =1" This returns all unique records, but I need to add another criteria to that statement ie: I need to select all unique records only if a second value is met as well! This is what I [...]

Answer Question   |  February 20, 2009  1:08 AM
Microsoft Access, SQL, SQL queries
asked by:
40 pts.

Server 2003 memory performance configuration
We have a SQL application running in an n-tier environment. Some of the users are complaining about application performance. I am going through the environment looking at all of the elements involved in processing this application. The information below shows all of the server systems involved in the application and the page file and RAM [...]

Answer Question   |  February 20, 2009  8:35 PM
Server Performance, SQL, SQL Server, Windows Server 2003, Windows Server Performance
asked by:
32,630 pts.

Inserting 50000 rows using FORALL statement
How can we insert 50000 rows by using FORALL,please give me entire code?

Answer Question   |  February 18, 2009  5:48 AM
FORALL statement, Oracle development, Oracle SQL, PL/SQL, SQL
asked by:
30 pts.

PL/SQL
Hi Experts, I would like to mentione here i was trying to test one package and found the package has a procedure named SET() which hav UPDATE on Report table and INSERT on A_R table in same transaction Both the above mentioned tables hav a tim_upt column which s given as systimestamp and strange it [...]

Answer Question   |  February 20, 2009  10:47 AM
INSERT statement, Oracle development, Oracle PL/SQL, PL/SQL, PL/SQL block, SQL, SQL Timestamp, Timestamp, UPDATE statement
asked by:
610 pts.

How can I pass tablename as a parameter in MySQL stored procedure?
my SQL stored procedure is like this…. ALTER PROCEDURE [dbo].[Sp_InsertDataMaster] @_ImageID int, @_Stat bit, @_tablename nvarchar(200) AS begin declare @strTemp nvarchar(max) set @strTemp = ‘Insert into ‘ + @_tablename + ‘(ImageID,Status) values (‘+ convert(nvarchar(5),@_ImageID) +’,'+ CONVERT(nvarchar(1),@_Stat) +’)’ –print @strTemp exec(@strTemp) end I want this stored procedure in MYSQL.

Answer Question   |  February 18, 2009  8:38 AM
Database programming, MySQL, MySQL Stored Procedures, SQL, SQL stored procedures, Stored Procedures
asked by:
45 pts.

How do I populate an SQL table created on the fly in RPGLE?
I am writing a report program where I create a table that is then converted to an Excel spreadsheet using SQL2JXL. I am able to dynamically create a table with Execute Immediate but I have been unable to populate it. The problem is the table name is stored in a variable within the program and [...]

Answer Question   |  February 16, 2009  4:20 AM
Dynamic SQL, Microsoft Excel, RPG, RPGLE, RPGSQL, SQL, SQL2JXL
asked by:
80 pts.

How to get started in a SQL Environment
I have been in an AS/400 world up until now. We are moving to SQL for a JDE EnterpriseOne implementation. What would be the best way for me to get up to speed on a SQL Server Database? Thank you for any and all insight.

Answer Question   |  February 12, 2009  3:26 PM
EnterpriseOne, JDE, SQL, SQL Database Training, SQL Server
asked by:
65 pts.

New Contest: ASK, Answer and win some Amazon.com gift cards
It’s that time again — a chance to win an Amazon.com gift certificate based on your activity in the IT Knowledge Exchange community! Remember: the more you ask, answer and discuss questions, the more Knowledge Points you will earn. (Only valid questions, answers and discussions will be counted towards your total.) The top 10 most [...]

Answer Question   |  April 3, 2012  5:17 PM
AS/400, CIO, CRM, Data management, Database, DataCenter, Exchange, Linux, Lotus Domino, Mobile, Networking, Oracle, SAP, Security, SQL, SQL Server, Storage, VMware, VoIP, Windows
asked by:
16,755 pts.

SQL+ running time error
Can anyone let me know I have a problem to run SQL that after runing sql_build_tables.sql why c:sql_build_tables.txt is empty (0 byt)- this use Win XP to run However, when I use Vista to run the SQL show Cannot create SPOOL file “c:sql_build_tables.txt” as show below OBJECT_TYPE COUNT(*) ————————————– ——— SEQUENCE 5 TRIGGER 2 TABLE [...]

Answer Question   |  February 9, 2009  6:27 PM
SQL, SQL error messages, SQL Plus, Windows XP
asked by:
5 pts.

How to find a string in all columns of a table
I want to search for a string for example “POLARIS” in all the columns of a table ? How to find the string using sql query ?

Answer Question   |  February 6, 2009  7:18 AM
Search string, SQL, SQL Query
asked by:
5 pts.

SQL Server Query Help Needed
I have a table with Inventory transacation records. The table contains both Shipment (outgoing) and Receiving (incoming) transactions. I’m trying to write a report that lists both Sales Orders that result in Shipment records and Purchase Orders that result in Receiving records. If I link the Inventory Transaction table to the Shipment (Sales Order) tables [...]

Answer Question   |  February 6, 2009  10:39 PM
INNER JOIN, JOIN statement, LEFT JOIN, RIGHT JOIN, SQL, SQL queries, SQL Query, SQL Server development, SQL Server Query
asked by:
70 pts.

Address segregation in SQL 2005
I am working in SQL 2005 and would like to parse an address filed such as “1234 N CLARK ST APT 111 ” into seperate fileds like House Number/Street Name/Street Type ie LN ,ST, or Cir/Apartment Number

Answer Question   |  February 6, 2009  8:30 PM
SQL, SQL 2005, SQL Address Segregation
asked by:
25 pts.

Help on SQL Query
Hi, I have a table which has customer order and date in the below format. customer order Date 1 1a 02/10/2008 19:48 1 1b 02/10/2008 18:48 1 1c 02/10/2008 17:48 1 1d 03/10/2008 19:48 2 2a 01/11/2008 01:30 2 2b 02/11/2008 01:30 2 2c 03/11/2008 03:45 2 2d 03/11/2008 03:50 3 3a 06/11/2008 03:50 3 [...]

Answer Question   |  February 6, 2009  6:35 PM
SQL, SQL Query
asked by:
GIG
240 pts.