SQL Questions


Master-Detail query return on one row
I have a parent-child relationship. I would like to have a query return the results where all children are on the same row as their parent. No children will have more than one parent. For instance: Table PARENT contains one column with the data: Parent1 Parent2 Parent3 Table CHILD contains two columns (foreign key to [...]

Answer Question   |  April 1, 2005  9:01 AM
SQL
asked by:
0 pts.

Urgent!Please help: TOP 3 cities only returned based on count() – result
I have three tables: Country, City, Restaurant. I would like to have a query that first calculates how many restaurants are for each city. I would only want to return those three cities for each country which has the most number of restaurants. Country-table: countryid, countryname City-table: cityid, cityname Restaurant-table: restaurantid cityid countryid isactive Only [...]

Answer Question   |  March 30, 2005  3:04 PM
SQL, SQL Server, SQL Server 2000
asked by:
0 pts.

Difference between Sql Server 7 & Sql Server 2000
Hi, Can you tell me difference between Sql server 7 and Sql Server 2000?

Answer Question   |  March 14, 2005  1:06 PM
Microsoft Windows, SQL, T-SQL
asked by:
0 pts.

Versioning and merging products for oracle
Has anyone been working with/implementing any versioning products with merging capabilities for oracle pl/sql? I’m hoping for some recomendations.

Answer Question   |  March 15, 2005  7:55 AM
Administration, Application software, Architecture/Design, Automated, Development, Functional, Knowledge management applications, Lifecycle development, Migration, Oracle, Oracle 9i, Performance/Load, Software testing, Software testing tools, Special-purpose software, SQL
asked by:
0 pts.

Listing USER tables in DB2
I am using QMF for DB2 and would like to know all the tables I have access to. What is the code I dould use to list all of the tables I have access to. THanks.

Answer Question   |  March 9, 2005  11:21 AM
SQL
asked by:
0 pts.

Slow PL/SQL query
I’m running the following query against two tables residing on an Oracle 8 database. The query takes too long (over an hour) to run. Both tables are indexed – however the main table SALES.SO is HUGE. Does anyone have any suggestions as to how I could improve this query so it can execute faster. Here’s [...]

Answer Question   |  March 9, 2005  10:28 AM
Oracle 8i, SQL
asked by:
0 pts.

Returning Multiple result sets to Excel
I need to return a full result set including a number of Sum(s) Max(s) etc to an excel spreadsheet (don’t ask why) from a Stored procedure on MS SQL2000. Problem is that Xcel can only handle a single result set per sheet… Any Ideas?

Answer Question   |  March 8, 2005  5:14 PM
SQL, T-SQL
asked by:
0 pts.

CLOB – Fetch out of sequence
I am inserting into a table which has a CLOB field. I insert a blank_clob and then try and retrieve the clob field again directly after insert. When I execute the select to retrieve the CLOB field I am getting ORA-01002: fetch out of sequence. The query looks like: select XML_DATA from XML_TABLE where SESSION_ID [...]

Answer Question   |  March 3, 2005  10:48 AM
Database Management Systems, Development, J2EE, Java, Lifecycle development, Oracle, Oracle 10g, Oracle 8i, Oracle 9i, SQL, XML
asked by:
0 pts.

Training- SCOOP Inc.
I’m thinking of taking some training from SCOOP Inc. They offer iSeries training (Java, SQL, RPG etc.). Have any of you taken training from them? If so what did you think? Pros? Cons? Would you recommend them? Let me know. Thanks!

Answer Question   |  May 25, 2012  2:11 PM
J2EE, JavaScript, RPG, Services, SQL
asked by:
0 pts.

Upgrading to 10g(10.1) from 8.0.6; Oracle Forms 5.0.6.8.0 and Oracle Reports 3.0.5.8.0 and Pro*C/COBOL for v8.0.4.4
Hi, We are researching upgrading to 10g(10.1) for database and Developer tools. The database is currently 8.0.6 and we use Oracle Forms 5.0.6.8.0; Oracle Reports 3.0.5.8.0; and precompile Pro*C/COBOL programs with the 8.0.4.4 environment. There appears to be quite a bit of information on the database upgrade. I am looking for Forms and Reports data [...]

Answer Question   |  February 24, 2005  2:05 PM
C, COBOL, Development, SQL, Tech support
asked by:
0 pts.

T-SQL, and cascading updates or finding constraint names
Hi all, I have been tasked with a difficult project. My employer has a rather large database, hosted on SQL Server 2000, which is used by several thousand users across our organization, and grouped by business units. This database is evolving with each minor release, which is just about every month. On occasion, I’m asked [...]

Answer Question   |  February 18, 2005  10:09 AM
SQL, SQL Server, Standard Edition 2000
asked by:
680 pts.

SQL on SAN, 16 or 1
A client has 16 databases, one per teritory, all running the same application and all on the same server and all the files on a SAN. The data in the 16 databases could all run in just one database. Will running all the activity through one database be faster than running it through 16? All [...]

Answer Question   |  February 3, 2009  7:26 AM
SAN, SQL
asked by:
0 pts.

SQL generated by 4GLs vs. Oracle stored procedures
We are attempting to adopt programming standards which would mandate the use of stored procedures in our Oracle 8i and 9i databases for data access. Application developers prefer to take advantage of the SQL generation capabilities of IBM’s WenSphere and Compuware’s Uniface. DBAs feel the security, performance, maintainability, visibility and sharability of procedures stored in [...]

Answer Question   |  January 30, 2005  10:24 AM
COBOL, Information risk management, Oracle, SQL, VBA
asked by:
0 pts.

Microsoft Access. Passing an ID/value to a subform. or between forms
Hello Everyone. I am using MS Access 2000 I have a form (frm_cboclient)that has a combobox on it that I populate by querying a client table for clientID and client name. What I would like to do then is have a subform that will display all my order infomration from my order table, where the [...]

Answer Question   |  February 2, 2005  11:39 PM
Development, E-business, Microsoft .NET, Programming Languages, SQL, VBA, VBScript, Visual Basic, Web development tools
asked by:
0 pts.

TopIndex property for .NET Web ListBox
I’m trying to automatically scroll down to the last inserted item in a multi-select ListBox when only a few of the total # of rows are visible. Windows.Forms ListBox control has a TopIndex property that allows you to do that, but there is no similar property for the Web control. Note: In a single selection [...]

Answer Question   |  January 22, 2005  9:44 AM
ASP, ASP.NET, C, DataCenter, Development, Hardware, HTML, Lifecycle development, Manufacturing applications, Perl, Programming Languages, Retail/point-of-sale applications, Special-purpose software, SQL, T-SQL, VB.NET, Web development tools, XML
asked by:
0 pts.

Complex SQL file join
I have 2 files, F1 and F2. These files have a common key field KEY. I need to produce SQL that will result in one file that has all of 1)Records whose KEY value is the same in both F1 and F2 2)Records with a KEY value in F1 and no corresponding KEY value in [...]

Answer Question   |  January 23, 2005  2:11 PM
SQL
asked by:
110 pts.

Technical: Query Plan Problem in Oracle DB 9i
I have a set of PL/SQL functions building a 7M row table. The last function adds around 0.5M rows by gathering data from two existing tables (0.3M rows each) and from rows already placed in the table being built. The rows are added by a cursor which constructs the new row and writes one at [...]

Answer Question   |  January 23, 2005  10:13 AM
Oracle, SQL
asked by:
0 pts.

Multiple record update
I have a situation in which I want the user to be able to make the same update to a number of records that can be described by a keylist. The issue is that other users may lock one or more of the records that require updating. I realize that I can use commitment control [...]

Answer Question   |  January 25, 2005  1:09 PM
SQL
asked by:
0 pts.

SQL server issue
The SQL below runs in MS Access, but fails when run in the SQL query analyser. TRANSFORM First(qryWebCustomersAllParents.Parent) AS FirstOfParent SELECT tblCustomers.CustomerID, tblCustomers.CustNameAbbr AS Customer, tblLUBudgetLevels_1.BudgetLevel, qryWebCustomerListCCRMs.CCRMPost, qryWebCustomerListCCRMs.CCRMIncumbent, qryWebCustomerListCCRMs.PostEmailRLIAlias, qryWebCustomerListCCRMs.PostTelephoneVPN FROM qryWebCustomersAllParents RIGHT JOIN ((tblCustomers LEFT JOIN tblLUBudgetLevels AS tblLUBudgetLevels_1 ON tblCustomers.CustBudgetLevelID = tblLUBudgetLevels_1.BudgetLevelID) LEFT JOIN qryWebCustomerListCCRMs ON tblCustomers.CustomerID = qryWebCustomerListCCRMs.CustomerID) ON qryWebCustomersAllParents.CustHierCustomerID = tblCustomers.CustomerID [...]

Answer Question   |  January 20, 2005  10:19 AM
SQL
asked by:
0 pts.

NULL Constraints Missing
I am working with Oracle 8i and created a simple table with three columns (two columns with NOT NULL constraints and the remaining column with a NULL constraint). I then did a select from user_constraints and only the NOT NULL constraints where returned. Any idea why the NULL constraint does not show up?

Answer Question   |  January 19, 2005  7:00 PM
SQL
asked by:
0 pts.