SQL Select Questions

1

SQL Select Stmt
Need to create a sql stmt to find all the people who work on exactly the same projects and same hours as Smith.

Answer Question   |  October 26, 2012  1:56 AM
SQL Select
asked by:
55 pts.

SELECT with LIMIT in AS/400
Hi all, On my AS400, I need to select the first 90 records from one file and insert them into another file, but all the time i got all records in my result file. Is there any way to use the parameter LIMIT with my SQL SELECT INSERT INTO LIB1/FILE1 (FILE1) SELECT DISTINCT                  (substring(FILE1, 1, [...]

Answer Question   |  June 14, 2011  6:40 PM
AS/400 Parameters, AS/400 Records, SQL, SQL Select
asked by:
250 pts.

Embedded SQL using SUM or some other method to total up qty and display 1 unique record
I have an sqlrpgle pgm setup, I want to add another sql select statement. I have a file that contains barcode label data, where multiple records can be assigned to the same Master serial #. My sqlrpg pgm is display various sorts in a screen inquiry. I want to setup my select, to display one [...]

Answer Question   |  June 10, 2011  11:30 AM
Embedded SQL, SQL, SQL Select, SQL Select statement problem, SQLRPG
asked by:
80 pts.

Is it possible on iSeries that an index is defined keeping in mind an sql select criteriea however when the queryis run this index does not get used.
Is it possible on i series that an index is defined keeping in mind an sql select criteriea however when the queryis run this index does not get used. We had an issue wherein an entire library had to be cleared and all files from had to be restored from a previous backup, after the [...]

Answer Question   |  December 24, 2010  9:45 AM
Index Performance, iSeries, SQL, SQL Select, V5R4
asked by:
1,160 pts.

Using SELECT with LIMIT clause on a physical file
Hi – I’m new to PHP & SQL and wanted to know if you can use mysql SELECT with the LIMIT clause on a iseries physical file in order to do pagination. Thanks for the help.

Answer Question   |  September 24, 2010  1:18 PM
iSeries, MySQL, Oracle SQL Pagination, Pagination, SQL Select
asked by:
30 pts.

Calling stored procedure in a database to query data in another database
Hello, I am writing a stored procedure that will query data from another database, but the database name is variable. Do I have to use a dynamic query? We dont want to use dynamic queries because of performance loss. But is there a way to do it without a dynamic query? Example GetData ‘some_remote_db_name’; and [...]

Answer Question   |  February 14, 2012  3:20 PM
SQL 2005, SQL Query, SQL Select, SQL Server, SQL Server 2005, SQL Server 2005 administration, SQL Server stored procedures, T-SQL
asked by:
Ncs
5 pts.

Select statement in asp.net
How can i use ms sql select statement with where clause in asp.net

Answer Question   |  March 5, 2011  5:17 AM
ASP.NET, SELECT statement, SQL Select, SQL statement, WHERE clause
asked by:
15 pts.

Difficult Select Statement in SQL
I have a table with columns, to wit: FieldA FieldB A U B V C A C A C B D A D A D A E B E B E B I can get the records that are multiple in FieldA but whose values in FieldB are repeating with: Select FieldA, FieldB from table  [...]

Answer Question   |  February 3, 2010  2:22 AM
SQL, SQL Select, SQL Select statement problem
asked by:
560 pts.

SQL select loop list?
Say I want to derive the following: Select ID, F1 from table Union Select ID, F2 from table Union Select ID, F3 from table Union … etc until F10. Is there smart and easy way so that I can just provide a list: F1,F2,F3,…,F10 and somehow be able to have the select statement loop through [...]

Answer Question   |  September 9, 2009  3:25 AM
SELECT, SQL 2008, SQL Select, T-SQL, T-SQL 2008
asked by:
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 the [...]

Answer Question   |  February 29, 2012  4:37 PM
SELECT statement, SQL Select, SQL Select statement problem
asked by:
560 pts.

SQL select command
Hi i hope all doing well, i have a problem with this SQL select command : **************************************************************** SELECT DISTINCT customers.first_name, customers.last_name, customers.email, customers.cellPhone, customers.phone, items.title, items.price, auction_items.auction_item_nr, auction_items.reserv_price, biddings.price FROM customers, biddings, auction_items, items, auctions WHERE customers.customer_nr = biddings.customer_nr AND auction_items.auction_item_nr = biddings.auction_item_nr AND items.item_nr = auction_items.item_nr AND auction_items.auction_nr = auctions.auction_nr AND auctions.auction_nr =7 ORDER [...]

Answer Question   |  August 3, 2009  12:51 PM
SQL, SQL commands, SQL Select
asked by:
70 pts.

Concatenation
I am using “substring(concat(’00′….” within my SQL select for a date query. However, the date 10 and higher is being overridden with “0″. How do I prevent this from happening?

Answer Question   |  June 10, 2009  6:55 PM
Concatenate, SQL Query, SQL Select, Substring
asked by:
15 pts.

1