SQL Questions


retrive data from 3 tables
HI i need to retrieve data of 3 tables using one more master table wat are the possible options Union,Joins anything else? with good performance please guide for considering the performance as the retrival count is huge in my case

Answer Question   |  May 21, 2010  8:31 AM
Oracle, SQL, TOAD
asked by:
610 pts.

Editions of SQL Server
Can you briefly discuss the different editions of the database that are available now?

Answer Question   |  May 5, 2010  8:10 PM
SQL Server 2008 R2, SQL Server availability, SQL Server Version Comparison
asked by:
16,755 pts.

Any Python use?
I know of a port to iSeries from way back. Wondering if there much use? I find that for some tasks, it can be more expressive than RPG. Especially useful if you have an ORM to help with table / SQL generation. Or if you want object orientation.

Answer Question   |  October 10, 2010  8:15 AM
AS/400, Python, RPG, SQL
asked by:
110 pts.

SQL EXCEPTION JOIN
I have three files (orderinfo, deliveryinfo and itemlines). The three files entries shall exist as 1 to 1 to many. The files contains orders from 10+ years. Thus data has been migrated several times by various people. I have discovered that the one-to-one-to-many rule has been broken for many orders. I wrote a pgm to [...]

Answer Question   |  May 4, 2010  1:01 AM
SQL, SQL Exception, SQL EXCEPTION JOIN, SQL join
asked by:
2,540 pts.

SQL record with latest date
if there is one table with a id and names as cloumns and another table with the id and dates, if want to have a id, name and the latest dates as an id can have mulitple dates what would be the query

Answer Question   |  April 28, 2010  4:01 PM
SQL, SQL tables
asked by:
5 pts.

Storing array values into an Access database table from a program
Hi, I’m trying to write a program that stores the values in an array into a database table. The name of the database is Company.mdb and the table that I want to store values is called Employee. Below is the procedure that is supposed to perform the task. The problem is it doesn’t store the [...]

Answer Question   |  April 26, 2010  9:50 AM
Array, Database, MS Access, MS Visual Studio 2005, SQL
asked by:
10 pts.

SQL Join on multiple columns?
Can I join from one file to another on more than one column? For example, join from FileA to FileB on OrderNumber.A=OrderNumber.B AND ItemNumber.A=ItemNumber.B? All examples show only one column… I am on an AS400 using RPGLESQL, I need to join from one detail file to another detail file.

Answer Question   |  April 25, 2010  6:50 PM
AS/400, JOIN statement, SQL
asked by:
100 pts.

How do I find the timestamp associated with HWM of processes/sessions in Oracle 10g on AIX
The following SQL produces a very useful report of current resource utilization at the time of the query and the HWM since the database was started. What SQL can I add to list the time of the HWM? Database & ‘OS = Oracle 10.2.0.4 running on AIX 5.3.0.0 5300-09 64-bit. Thanks, Bruce col resource_name format [...]

Answer Question   |  April 23, 2010  4:06 PM
AIX, HWM, Oracle 10g, Oracle High Water Mark, SQL, SQLPlus
asked by:
15 pts.

Need a sample code for Sql fetching multiple rows
In Native cobol we use read PF file in a loop until EOF to fetch all records.Now i need to do the same by using Sql in cobol,eg: select * from File and show it in subfile.Can anyone help me how to do this. How to move recods from curson to screen.Thankx in advance for [...]

Answer Question   |  April 19, 2010  8:55 AM
SQL, SQLCBLLE
asked by:
130 pts.

SQL to edit last character in a field using STRSQL
I can select the rows using this SQL how can I update? UPDATE mbmtest01/itemaster SET right (ITNBR,1) = ‘ ‘ WHERE right(ITNBR,1) = ‘M’

Answer Question   |  April 9, 2010  5:24 PM
AS/400, SQL
asked by:
385 pts.

DR/HA questions with SQL Server design
Greetings! I need your advice for two questions. This is related to design. I have a production site. It requires HA. At the same time we have a DR site. The DR site needs to have the same copy of the database for my application to run. Question 1: Is it advisable to have mirroring [...]

Answer Question   |  March 31, 2010  10:16 PM
SQL Server, SQL Server availability, SQL Server backup and restore
2,585 pts.

Substring Query SQL
Hi All, I’m trying to build a query to join names in one table to abbreviated names in another table. So for example I have – Harry Harold Harrison on one table, but in the other table I have just Har, this can vary in length so does anyone know how I can sum the [...]

Answer Question   |  March 30, 2010  12:44 AM
SQL, SQL Server query optimization
asked by:
20 pts.

HOW TO CONNECT VS2005 TO SQL2005
Dear sir, how to connect vs2005 to sql2005 and which setting do in vs2005 and sql2005    

Answer Question   |  March 29, 2010  3:59 AM
SQL, SQL Server 2005, Visual Studio 2005
asked by:
5 pts.

Sql Server 2005 ensure columns sum within a table
how can i ensure the total sum of 5 columns within the same table equals 100 during insert or update in SQL Server 2005?

Answer Question   |  March 29, 2010  11:47 PM
SQL, SQL Server 2005
asked by:
5 pts.

using group by by joining 2 tables SQL
there are two tables employees and jobs .employees table attributes are job_id and salary.jobs having attibute job_id,job_title.i want to retrieve sum(salary),job_title  group by job_id

Answer Question   |  March 26, 2010  2:36 PM
SQL, SQL Anywhere Studio/M-Business Anywhere/Avantgo
asked by:
Lak
5 pts.

Get your FREE ITKnowledgeExchange.com sticker
Be proud to show off you are part of the community with your free ITKnowledgeExchange.com sticker. All you have to do is answer a question and email me your handle and address and we will get one out in the mail to you. Allow 4-6 weeks delivery. Even if you have one already get one [...]

Answer Question   |  September 1, 2011  3:15 PM
CIO, CRM, Database, DataCenter, Domino, Exchange, Linux, Networking, Oracle, SAP, Security, SQL, SQL Server, Storage, Virtual Server, VoIP, Windows
asked by:
16,755 pts.

Case Statements SQL
I’m running a query that returns a specific status code. However, within my query that specific status doesn’t always exist and I get a null value. I would like to return another status when that is the case. I can’t seem to get the case statement to work.

Answer Question   |  March 24, 2010  2:15 PM
CASE statement, SQL
asked by:
15 pts.

Date calculation incorrect in sql when +1 month entered
Date calculation incorrect in sql when 1 month entered. If we add 1 month to 28-Feb then it shows 28-Mar instead of 31-Mar. Similarly if I add 1 month to 30-Nov it should show 31-Dec instead of 30-Dec. SQL command run is SELECT CCDATE + 1 MONTHS FROM COGNOSMIS/xyzPF WHERE CCDATE = ’2010-02-28′

Answer Question   |  March 26, 2010  12:31 PM
SQL, SQL Date Calculation
asked by:
1,160 pts.

Automate TSQL Query Output
I want to have a stored procedure run on a schedule that automatically creates a database output file as a result and saves it to a specific location on my network. Can someone please tell me how to do this?

Answer Question   |  June 1, 2010  1:14 PM
Automated SQL Query, SQL, T-SQL
asked by:
175 pts.

SQL and RPG 400 (SQLRPG) Variable lengths help required.
Please could someone help me with the following, I am new to SQL and have been tasked with the following:- I am writing an RPG program where the user will be able to do a search by entering up to 15 characters to find part numbers. I know how to do this using SQL but [...]

Answer Question   |  July 8, 2010  8:00 PM
SQL, SQLRPG
asked by:
15 pts.