OUTPUT query
hi i have am osql script (.cmd file) with 80 line query in it , i run every 1 hours once. i shedule in o/s through task manager. i want the output in different xls every time ie: first xls for first hour second xls for second hour …….. till the last hours that is [...]
Answer Question
| January 24, 2008 6:13 AM
OSQL, SQL
hi i have am osql script (.cmd file) with 80 line query in it , i run every 1 hours once. i shedule in o/s through task manager. i want the output in different xls every time ie: first xls for first hour second xls for second hour …….. till the last hours that is [...]
DDS or SQL
We have an existing COBOL application using files defined in DDS format. We are considering to move from DDS to DDL for future development. What is the best strategy to take this approach?
Answer Question
| January 24, 2008 8:52 PM
COBOL, DDL, DDS, SQL
We have an existing COBOL application using files defined in DDS format. We are considering to move from DDS to DDL for future development. What is the best strategy to take this approach?
sql question on autogenerating customer numbers
I want to create a table that automatically assigns a customer number to every email address that is entered into a table.
Answer Question
| January 24, 2008 11:08 PM
SQL
I want to create a table that automatically assigns a customer number to every email address that is entered into a table.
Export tabels from SQL Server to iSeries
I have a need to export a table on an SQL server to a file on the iSeries. I would also like this to be automated so that when the table is populated, the information is automatically exported to the file on the iSeries. I have tried using DTS/Enterprise Manager, but to no avail. Any [...]
Answer Question
| August 12, 2009 4:51 PM
Export, iSeries programming commands, SQL
I have a need to export a table on an SQL server to a file on the iSeries. I would also like this to be automated so that when the table is populated, the information is automatically exported to the file on the iSeries. I have tried using DTS/Enterprise Manager, but to no avail. Any [...]
HOW TO INCLUDE LOG IN INFORMATION IN AN SQL SCRIPT
Please I have an SQL update statement which I want to put in an SQL script which users can run to update an oracle9i database running on a windows 2003 server.The statement is as follows: update jobs set JOBSTATE = 3 where APPID = 5 ; COMMIT; Exit I do not want users to be [...]
Answer Question
| January 23, 2008 12:06 PM
Database, Oracle, Oracle 9i, Scripting, SQL, Windows Server 2003
Please I have an SQL update statement which I want to put in an SQL script which users can run to update an oracle9i database running on a windows 2003 server.The statement is as follows: update jobs set JOBSTATE = 3 where APPID = 5 ; COMMIT; Exit I do not want users to be [...]
retrieve NOT related data many to many relation
I have 3 tables. one of the tables is a linked table, so it contains the primary key from table 1 and primary key from table 2 as foreign keys. together they make up the primary key for the linked table. Now i need to find out which items are not in the linked table. [...]
Answer Question
| January 24, 2008 11:01 AM
SQL
I have 3 tables. one of the tables is a linked table, so it contains the primary key from table 1 and primary key from table 2 as foreign keys. together they make up the primary key for the linked table. Now i need to find out which items are not in the linked table. [...]
Comparing column values in different rows.
sample table: A B C D E F G 1 d 3 t j 0 e 2 0 l o e p d 1 d 3 t k 0 f Ok, so in the table, column A should be unique. As you can, see row 1 and row 3 have the same value in column [...]
Answer Question
| January 18, 2008 5:03 PM
SQL
sample table: A B C D E F G 1 d 3 t j 0 e 2 0 l o e p d 1 d 3 t k 0 f Ok, so in the table, column A should be unique. As you can, see row 1 and row 3 have the same value in column [...]
How to use subselect in a case statement
Getting error… “Token EXISTS was not valid….” on case statement… ,case when g.GFGSTS = ’2′ and not exists (select a.GFTSEQ from GFTP010 a where a.GFCSQ# = g.GFCSQ# and a.GFGSTS = ’3′ ) then count(*) end as Void#
Answer Question
| January 17, 2008 3:11 PM
CASE statement, SQL, SQL Subselect
Getting error… “Token EXISTS was not valid….” on case statement… ,case when g.GFGSTS = ’2′ and not exists (select a.GFTSEQ from GFTP010 a where a.GFCSQ# = g.GFCSQ# and a.GFGSTS = ’3′ ) then count(*) end as Void#
Database connection problem
I am working on a japanese project. the DB is oracle8i. So I am using classes102 and nls_charset10 driver zip files. I am able to connect to db through SQL* but not through code. the error is: java.sql.SQLException: 20 at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:407) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:152) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:214) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193) please help me
Answer Question
| August 28, 2009 4:13 AM
Java Database Connectivity, JDBC, Oracle 8i, SQL
I am working on a japanese project. the DB is oracle8i. So I am using classes102 and nls_charset10 driver zip files. I am able to connect to db through SQL* but not through code. the error is: java.sql.SQLException: 20 at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:407) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:152) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:214) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193) please help me
Query Criteria
Hello. I have a report with multiple subreports. User enters date range when prompted from query in main report. I want to refer the subreport date criteria to the date range the user enters for the main report, via the query. I used this in the query criteria under the date field[reports]![mainreport].[fieldname], but the criteria [...]
Answer Question
| February 21, 2008 7:24 PM
Query, SQL
Hello. I have a report with multiple subreports. User enters date range when prompted from query in main report. I want to refer the subreport date criteria to the date range the user enters for the main report, via the query. I used this in the query criteria under the date field[reports]![mainreport].[fieldname], but the criteria [...]
ROW_NUMBER in SQLServer
In Oracle, I can use the analytic ROW_NUMBER function to assign sequence numbers to output rows, re-starting the sequence as certain values change (e.g., there’s a separate count for each deptno in this example:) SELECT deptno , ename , ROW_NUMBER () OVER ( PARTITION BY deptno ORDER BY ename ) AS seq FROM scott.emp ORDER [...]
Answer Question
| February 22, 2008 11:15 PM
ROW_NUMBER, SQL, SQL Server
In Oracle, I can use the analytic ROW_NUMBER function to assign sequence numbers to output rows, re-starting the sequence as certain values change (e.g., there’s a separate count for each deptno in this example:) SELECT deptno , ename , ROW_NUMBER () OVER ( PARTITION BY deptno ORDER BY ename ) AS seq FROM scott.emp ORDER [...]
SQL Query that only Returns the Newest Invoice date for an ITem
I am try to write a query that will give me a list of ITems that have a a quanity of greater than 0 on hand and only latest date and Item was invoiced. Here is what i have come up with so far SELECT IV00101.ITEMNMBR, IV00101.ITEMDESC, IV00101.CURRCOST, IV00102.QTYONHND,SOP30200.SOPNUMBE, SOP30200.INVODATE FROM IV00101 INNER JOIN IV00102 [...]
Answer Question
| January 29, 2008 5:44 PM
Query, SQL
I am try to write a query that will give me a list of ITems that have a a quanity of greater than 0 on hand and only latest date and Item was invoiced. Here is what i have come up with so far SELECT IV00101.ITEMNMBR, IV00101.ITEMDESC, IV00101.CURRCOST, IV00102.QTYONHND,SOP30200.SOPNUMBE, SOP30200.INVODATE FROM IV00101 INNER JOIN IV00102 [...]
Need to create SQL DTS Package
We are using SQL 2000 DTS Packages and I want to create a DTS Package which can copy only all text file names from folder(source) to SQL table column(Destination). Also i want to write number of rows in particular text file to SQL table. DTS or Procedure or Activex Script??
Answer Question
| February 22, 2008 3:35 PM
DTS, SQL, SQL Server 2000
We are using SQL 2000 DTS Packages and I want to create a DTS Package which can copy only all text file names from folder(source) to SQL table column(Destination). Also i want to write number of rows in particular text file to SQL table. DTS or Procedure or Activex Script??
Trouble getting a count with union statements
How do I get a count from unioned statements, then subtract some of the values from a sum of the others? For example, say I have a table called EMPLOYEE, and I want to see how many more male employees I have than female employees. Therefore, I want: COUNT(*) WHERE EMPLOYEE.GENDER = 'M' - COUNT(*) [...]
Answer Question
| January 11, 2008 3:32 PM
SQL
How do I get a count from unioned statements, then subtract some of the values from a sum of the others? For example, say I have a table called EMPLOYEE, and I want to see how many more male employees I have than female employees. Therefore, I want: COUNT(*) WHERE EMPLOYEE.GENDER = 'M' - COUNT(*) [...]
DTS error after deleting xls file with script
All, After I have deleted a xls file using an ActiveX script the DTS Package fails because the file is not there. I then have to go into the properties of the task and go to the destination tab and click the create button. The I have go to the Transformation tab and then run [...]
Answer Question
| January 10, 2008 5:11 PM
ActiveX, DTS, SQL, XLS
All, After I have deleted a xls file using an ActiveX script the DTS Package fails because the file is not there. I then have to go into the properties of the task and go to the destination tab and click the create button. The I have go to the Transformation tab and then run [...]
Assign default values to SQL VIEW columns
I’m trying to assign default values to VIEW columns defined for left joined columns or columns created by aggregate functions. I’ve tried the ALTER TABLE after the VIEW was created but get an error that my VIEW is not a TABLE and the ALTER VIEW is not supported by DB2/400 v5r3.
Answer Question
| March 9, 2010 11:57 AM
DB2/400, Oracle Views, SQL
I’m trying to assign default values to VIEW columns defined for left joined columns or columns created by aggregate functions. I’ve tried the ALTER TABLE after the VIEW was created but get an error that my VIEW is not a TABLE and the ALTER VIEW is not supported by DB2/400 v5r3.
migrating from foxpro to SQL7.
Hi All, I have around 95 tables on FoxPro that I need to migrate on SQL7. These tables are stand alone data tables and are not part of any database as of now. I have tried exporting these tables into XLS format and then importing these tables to SQL7 using enterprise manager but there are [...]
Answer Question
| January 31, 2008 6:44 AM
FoxPro, Migration, SQL, Visual FoxPro
Hi All, I have around 95 tables on FoxPro that I need to migrate on SQL7. These tables are stand alone data tables and are not part of any database as of now. I have tried exporting these tables into XLS format and then importing these tables to SQL7 using enterprise manager but there are [...]
sql-programming the ‘in’ statement
I’m working on a task ; the issue is: There are number of criteria for each category; the relation between the criteria’s is OR and between the category is AND. The CSR can select number of criteria for each category (or not select anything); I supposed to get as an input all the selected criteria [...]
Answer Question
| January 23, 2008 11:09 PM
Coding, SQL
I’m working on a task ; the issue is: There are number of criteria for each category; the relation between the criteria’s is OR and between the category is AND. The CSR can select number of criteria for each category (or not select anything); I supposed to get as an input all the selected criteria [...]
Cursor using update and order
I’d like to declare a cursor to traverse a file in keyed order, updating some records It looks like I can do one or the other, but not both, that is I can set up the cursor with the order phrase or the update phrase buy not both. Is there a reason for this limitation? [...]
Answer Question
| December 24, 2007 10:17 PM
RPG, RPGLE, SQL
I’d like to declare a cursor to traverse a file in keyed order, updating some records It looks like I can do one or the other, but not both, that is I can set up the cursor with the order phrase or the update phrase buy not both. Is there a reason for this limitation? [...]
How to update in SQL using DS
My problem is that I’m basically doing an interactive update/create file (similar to DFU). The user is able to maintain a file in the screen, so how do I go about updating the ENTIRE File without having to manually update every record? I have a datastructure (cpRec) to put in the info from the file [...]
Answer Question
| January 3, 2008 8:23 PM
RPGLE, SQL
My problem is that I’m basically doing an interactive update/create file (similar to DFU). The user is able to maintain a file in the screen, so how do I go about updating the ENTIRE File without having to manually update every record? I have a datastructure (cpRec) to put in the info from the file [...]





