SQL tables Questions


SQL query How to select nth row from a table if they are not in any order
How to select nth row from a table if they are not in any order

Answer Question   |  July 30, 2010  8:40 AM
SQL, SQL Data Set, SQL Query, SQL tables
asked by:
5 pts.

How to display values in one table by referring and checking values in another table?
how to display values in one table by refering and checking values in another table

Answer Question   |  July 28, 2010  8:08 AM
SQL Database, SQL Server, SQL Server database, SQL Server tables, SQL tables
asked by:
5 pts.

Change the size of a column and then reorganize the rows in SQL tables
I think this one will be tricky. What I have is a table like: CREATE TABLE PHOTO_DETAIL   (     ”PHOTO”        VARCHAR2(25 BYTE) NOT NULL ENABLE,     ”NUM_LINE”   NUMBER(20,0) NOT NULL ENABLE,     ”PHOTO_LINE”  VARCHAR2(180 BYTE)   )   what I am going to have is: CREATE TABLE PHOTO_DETAIL   (     ”PHOTO”   [...]

Answer Question   |  August 2, 2010  12:13 PM
INSERT SELECT statement, INSERT statement, SQL Database, SQL Server, SQL tables
asked by:
25 pts.

How to create date in SQL Server 2000
i create a table with attribute date and i want to store date as “Date-Month-year” .what procedure to create a date and how we able to insert the required format by using sql server 2000.

Answer Question   |  July 12, 2010  1:28 PM
Automated SQL Query, Display Attribute, SQL Server 2000 Database, SQL tables
asked by:
30 pts.

Join for merging records
I’m trying to figure out what the best type of join I could use in TSQL for merging records in about 6 tables where there is a match. So I have 6 different tables where there are many matching records. So I figured that I would use a left join in my first join, keep [...]

Answer Question   |  July 12, 2010  12:08 PM
JOIN statement, SQL Server 2005 Express, SQL Server 2005 merge replication, SQL tables
asked by:
175 pts.

How to keep date format when creating Index on a Table
I have used CREATE TABLE to create a PF which contain a DATE field. And then use CREATE INDEX to create a LF with data selections. However, when I check the DATE field, I find that, in the PF, its Date Format is *ISO; but in the LF, its Date Format has been changed to [...]

Answer Question   |  July 2, 2010  3:06 AM
SQL Database Indexing, sql indexes, SQL statements, SQL tables
asked by:
20 pts.

Compare Two Tables With Identical Fields
Need to compare two tables A & B with identical fields and report when rows don’t match and rows from B are missing in A.

Answer Question   |  June 15, 2010  7:46 PM
SQL, SQL tables
asked by:
60 pts.

SQL Query for Time Filed
I have a sql table where the field tr_time contains the trade time and datatype of the filed is Datetime. I want to retrieve records where the time is in multiple of 5 seconds, so records where the seconds are in multiple of 5 only. How can I do this?

Answer Question   |  June 14, 2010  8:28 AM
SQL Query, SQL Server 2005, SQL tables
asked by:
10 pts.

Would using a table variable from a function be efficient?
We divided our tables from table zone_a, …_b, …_c to zone_z, these tables have the same attributes. We have divided this tables in this way so that any data that is under zone_a would only be on it’s specific table, and the same with the other remaining table. Since per table holds thousands of data [...]

Answer Question   |  May 19, 2010  7:16 AM
MSSQL, SQL tables, SQL variables
asked by:
20 pts.

How to Make Fixed Row Table
Hi all My question is that i want to make the table which will accept only 500 row. even it could not accept 501th row. i mean to say i can’t accept at the time of insertion not on fetch time

Answer Question   |  May 13, 2010  7:35 AM
SQL Server, SQL Server 2008, SQL tables
asked by:
30 pts.

My as/400 SQL is getting a ‘ Value for column too long.’ error msg
Value for column or variable SPDESC too long. UPDATE mbmtest01/wbmscur set spdesc = (Select itdsc FROM amflib7/itemasa WHERE itnbr = spptno)  WHERE EXISTS (SELECT DISTINCT itdsc FROM amflib7/itemasa WHERE itnbr = spptno)  How do I make the field truncate the larger input field. The input field is 30 bytes and the receiving field is 15 [...]

Answer Question   |  May 3, 2010  4:22 PM
AS/400 administration, AS/400 SQL, SQL tables
asked by:
385 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.

Retrieving data tables without backup SQL
If I truncate a table without the backup of it, how do I retrieve the table data?

Answer Question   |  April 9, 2010  3:23 PM
SQL Data Types, SQL Server backup, SQL Server tables, SQL tables
2,585 pts.

SQL Table Layout
Hi I am creating a database. In my legacy system I had what we called a tables system where coded data could be expanded into different values   eg 0 = No 1 = Yes I tried to create this in SQL by having a properties table and then relating the other tables to the [...]

Answer Question   |  March 17, 2010  4:25 AM
SQL 2005, SQL tables
asked by:
25 pts.

Documenting column in SQL table in QADBIFLD (AS400)
When a table is created with SQL, several fields in the system cross-reference file QADBIFLD gets content (headings, defults a.o). I noticed that the QADBIFLD table contains a column named DBIREM (length 2000 bytes..). I also noticed that the old S36 IDDU actually put some documentation into this column. Now my question: How can text-documenation [...]

Answer Question   |  March 2, 2010  10:12 AM
AS/400 SQL, Documentation, QADBIFLD, SQL, SQL generated files, SQL tables
asked by:
2,555 pts.

Create A Fixed Text File From SQL DB Table
Hello programmers. After doing much research I am unable to resolve how or where to custom format each field of my SQL table output into my text file. Can someone help me with enhancing the below vb script? I need to reformat certain values. Do I do the formatting in the Dim section or in [...]

Answer Question   |  January 12, 2010  1:56 AM
ASP.NET, SQL Database, SQL tables
asked by:
50 pts.

SQL question
One table named as employee has 3 columns (name, salary, department). I need to retrieve the employees whose salary is greater than average salary of their department. that is name    salary   department iioo      10000    Technical aaaa    15000     HR pppp    17000     HR wwww    20000    Technical   I need to get employee details whose salary is greater than [...]

Answer Question   |  December 15, 2009  12:46 PM
SQL, SQL tables
asked by:
5 pts.

How do I fetch synonym names with the SQLTables function in ODBC API?
Can somebody please explain how to fetch synonym names with the SQLTables function in ODBC API. I currently use the DSN created with SQL Native Client 10 and SQL Server 2005. My code is as follows:</p><p>ret = SQLTables(stmt, NULL, 0, NULL, 0, NULL, 0, <br>SQLCHAR*)”‘TABLE’,'VIEW’,'ALIAS’,'SYNONYM’”, SQL_NTS);</p><p>I am getting back a table and views in a result set — [...]

Answer Question   |  November 10, 2009  9:40 PM
ODBC, SQL tables
2,585 pts.

Effective ways for retrieving millions of records from a table?
I have two tables – [em]Users[/em] and [em]UserAddress[/em] — with 30 million records in each.

Answer Question   |  November 4, 2009  8:48 PM
Data Tables, Microsoft SQL Server, SQL tables
2,585 pts.

SQL related tables
I have 2 tables one with all my products and their accociated details and another with comments on the products. Product table 1 prodID, title, description, price Comments table 2 commID, prodID, comment I would like to export this to a single XML file, thus an XML element for each product from table 1 with [...]

Answer Question   |  October 19, 2009  7:10 AM
MySQL, MySQL 5.0, PHP, SQL Related Tables, SQL tables
asked by:
5 pts.