SELECT Statement Questions and Answers

Recent IT Questions

1 - 20 of 47
<<PREVIOUS 1|2|3 NEXT>>

Access 2003: Can't filter Part-no's by highest $Spend Plant/Site

I have a file of Part-no with the spend by Plant (or Location).  A given Part-no may have multiple records for the different Plant Locations. I am trying to capture one record for each Part-no that included the Plant with the highest spend and what that amount is. I tried to do a summary query...

View Answer   |  Oct 30 2009  6:32 PM GMT
MS Access 2003, SELECT statement
asked by GatorRobNC

  5 pts.

SQL Select: Getting the previous records from a known record

I issued a select statement like this: Select phone# from pltlcd where phone# >= 985143525 fetch first 20 records only PLTLCD is a file sorted by phone#. From the first record retrieved by the aboe select statement, how do I get the 20 records in the file that exist before the returned set of...

asked by Bogeybetsy

  325 pts.

SQL Server: Index and Key

What is the difference between a key and an index? Whe I issue a SELECT statement, and the table has an index, do I still have to use my key?

View Answer   |  Jul 31 2009  5:08 PM GMT
Index and Key, SELECT statement
asked by Bogeybetsy

  325 pts.

How to select 1 record in DB2

As usual, I often use: select top 1 * from table But in DB2, I can't. I use Toad tool to input SQL statement. Who have any solution? Please share with me. Tks a lot!

View Answer   |  Jul 16 2009  5:34 PM GMT
SELECT statement, DB2
asked by Linhntk

  5 pts.

select parent where more than one child

I want to select a row from the parent table based on whether there are two or more rows in a child table. What is the best way to do that?

View Answer   |  Jul 15 2009  1:01 AM GMT
SELECT statement, SQL, SQL queries
asked by Ghjazz

  5 pts.

Different Results on Insert Select than Select

I'm struggling, along with others, where I'm getting different results when doing an Insert select verses just the select. Lots of joins to get data from various tables. Only want the first record from the uniqfield table so created the tmp_uniqfieldid table with that item fielded, creation_ts ...

asked by Bem

  35 pts.

SQL order by Issue

Please help me write this. I need a SQL where the order by is done based on a variable passed to the query.SELECT * FROM (SELECT distinct gl.group_id, gl.group_name, gl.group_description, gl.status_code, gl.member_count, ...

View Answer   |  May 2 2009  4:44 PM GMT
SQL, SELECT statement, SQL query optimization
asked by Rohit3312

  25 pts.

Oracle 10g process each record exactly on time multiple processes

I have over 400 records added to a table in a minute. A processed flag is set in each record as they are processed. I want to process each record exactly one time. I want to process the records in small groups with multiple processes; that may run on disparate machines. It is desirable to...

View Answer   |  Apr 22 2009  3:19 AM GMT
Oracle ROWNUM, Oracle 10g administration, Oracle 10g
asked by Wileecanislatrans

  15 pts.

SELECT statement in SAP

what are various select statements used and where are they used.what is value table.

Answer Question   |  Apr 13 2009  10:30 AM GMT
SELECT statement, SAP ABAP, SAP development
asked by Anil406

  10 pts.

How do I write a SQL statement to get all data from a table called subscrib?

How do I write a SQL statement to get all data from a table called subscrib?

View Answer   |  Apr 5 2009  10:16 PM GMT
SQL statements, SELECT statement, SQL queries
asked by Thechriseco

  5 pts.

Viewing distinct records in a SQL query result

I have a set of records in a SQL query result. I only want to see one record, per the data field "ID". I am getting 2 records for some ID's, as there is one field that is different in the 2 records. This happens even if I start the query out with SELECT, DISTINCT, and then all of the fields I...

View Answer   |  Apr 3 2009  5:48 PM GMT
SQL Server Query, SELECT statement, SQL Query
asked by SQL Server Ask the Experts

  2445 pts.

Matching External lists to your Database?

Hello everyone, I work in a telco and manage the data in the company's CRM. I'm often given lists of company names by our alliance team, and asked to match the list against our database to see which companies already exist in the CRM and which don't. At the moment I can only accomplish this by...

View Answer   |  Apr 1 2009  10:54 PM GMT
SQL queries, Query optimization, SELECT statement
asked by Nik14

  5 pts.

In DB2 when a select statement is executed, it is taking lot of time and the table is being locked.

In DB2 when I'm giving a select statement its taking lot of time, the reason is like the table is a very huge table. As a result some times it is locking the table. Can any one help me for executing the select query with any option which would not lock the table. Thank you in advance.

View Answer   |  Mar 24 2009  12:23 AM GMT
DB2 query, DB2, SELECT statement
asked by UmaGandreddi

  80 pts.

SQL - Pass the result of the first query as the second query select column name

I want to pass the result of a sql query as the column name in another query eg. (note there will be a single result for the first query) SELECT CASE WHEN fld_type1 = 'A' THEN 'VAL_ALPHA1' WHEN fld_type1 = 'D' THEN 'VAL_DATE1' ELSE 'VAL_NUM1' END AS FIELDNAME FROM TABLE1 I want the result of the...

View Answer   |  Mar 24 2009  11:07 AM GMT
Dynamic SQL, SQL, SELECT statement
asked by Chris123

  25 pts.

Configuring SQL Server to not lock tables when using the SELECT statement

Is there a way to configure SQL Server to not lock tables where I am using the SELECT statement, so as to not have to writte "with NOLOCK" every time I use SELECT?

View Answer   |  Mar 18 2009  3:33 PM GMT
SQL Server, SELECT statement, SQL Server tables
asked by SQL Server Ask the Experts

  2445 pts.

SQL View performance vs. SELECT

I am experiencing slow views on my database. If I create a view and run it, then use the same select statement from the view and run. They both return the same data, but View runs slower. My expectations was that since views are compiled, they should run faster. Could some one clearify this for me....

asked by MHM281

  5 pts.

How to retrieve, add and update data from SQL Server 2005 manually using VB.NET 2005?

Hey guys!!! I'm quite new to VB.NET 2005. I need to know how to add, update and retrieve data manually using VB.NET 2005. In the software which I'm trying to implement, data is entered in text boxes and then they are updated/added into an SQL table. When retrieving the...

View Answer   |  Mar 7 2009  11:01 AM GMT
VB.NET 2005, SQL Server 2005, Data Junction
asked by Obhasha07

  75 pts.

Oracle SQL-Pagination Help

Hi, The below inner SELECT returns huge amount of rows (1000000+) and the outer SELECTs(alpha BETWEEN #startRec# AND #endRec#) is used for PAGINATION to display data with 25 in each page. Issue is:-This PAGINATION done below is very slow and slows the entire display of data.So could all please...

View Answer   |  Feb 16 2009  4:24 PM GMT
Oracle SQL, Oracle SQL Pagination, Pagination
asked by Rohit3312

  25 pts.

How to find a specific word in a SQL table

How do you write a SQL query to find a specific word in a sql column. ex I want to show all records that have the word bob in it but do not want to include records that are bobby or bobble etc only the exact word bob. Hope that makes sense

View Answer   |  Jan 29 2009  3:13 AM GMT
SQL Query, SELECT statement, WHERE statement
asked by Boomer1

  5 pts.

Pulling multiple values in the same line in SQL

Sorry if the title is a bit vague but its almost what am I trying to solve. The best way to explain my issue is this. If I have a table which takes the format.. user_id, error_code. (and other values also). The problem is that the same user_id is listed multiple times for each error_code the...

View Answer   |  Jan 27 2009  1:22 AM GMT
SQL, SELECT statement, SQL Query
asked by Boardpig

  65 pts.

1 - 20 of 47
<<PREVIOUS 1|2|3 NEXT>>