SQL creating an unwanted duplicate of file
The other day a colleague ran an SQL statement to update a field in a file to a constant where 2 other fields were equal to constants (so no joining was needed, etc.) When finished, there was a duplicate copy of the file in the first library in the library list. (Which is higher than [...]
Answer Question
| April 18, 2013 1:50 PM
DB2, SQL statement
The other day a colleague ran an SQL statement to update a field in a file to a constant where 2 other fields were equal to constants (so no joining was needed, etc.) When finished, there was a duplicate copy of the file in the first library in the library list. (Which is higher than [...]
SQL Plus stops before finishing
Why does SQL+ stop after running so many characters in a long SQL statement?
Answer Question
| April 3, 2013 12:23 PM
SQL Plus, SQL statement
Why does SQL+ stop after running so many characters in a long SQL statement?
iSeries SQL Cobol
In my COBOL SQL select statement that was previously running on V5R4, I was able to extract a date field defined with “date” as the data type. We are now on V7R1 and we get a data mapping error. No clue as to why? Any ideas? thanks
Answer Question
| April 2, 2013 6:59 PM
COBOL, iSeries, SQL statement
In my COBOL SQL select statement that was previously running on V5R4, I was able to extract a date field defined with “date” as the data type. We are now on V7R1 and we get a data mapping error. No clue as to why? Any ideas? thanks
Lost my SQL log
SQL statements from a session (first session) have been lost because I opened a second SQL session and saved this when exiting AFTER exiting my first session. So, when I STRSQL, I only see the statements from my second session, those from the first session are gone. Can I somehow retrieve the statements from my [...]
Answer Question
| March 12, 2013 9:23 AM
SQL Sessions, SQL statement
SQL statements from a session (first session) have been lost because I opened a second SQL session and saved this when exiting AFTER exiting my first session. So, when I STRSQL, I only see the statements from my second session, those from the first session are gone. Can I somehow retrieve the statements from my [...]
Stored procedures
What is meant by stored procedures? What is purpose of them and where can we use this stored procedure? Can any one provide the information regarding this? Thanks in advance.
Answer Question
| February 12, 2013 6:33 AM
SQL statement, Stored Procedures
What is meant by stored procedures? What is purpose of them and where can we use this stored procedure? Can any one provide the information regarding this? Thanks in advance.
DFU to SQL translator
Is there a package that will allow the user to enter DFU commands and then translate to SQL and send that to the processor? The situation is that the logging program doesn’t see DFU commands but does see SQL statements.
Answer Question
| November 30, 2012 9:21 PM
DFU, SQL, SQL statement
Is there a package that will allow the user to enter DFU commands and then translate to SQL and send that to the processor? The situation is that the logging program doesn’t see DFU commands but does see SQL statements.
Using cursor in SQLRPGLE
Can i use single cursor for multiple SQL statements? ex: declare c1 cursor for select * from ……. also declare c1 cursor for select * from xxx
Answer Question
| October 10, 2012 11:37 AM
SQL statement, SQLRPGLE
Can i use single cursor for multiple SQL statements? ex: declare c1 cursor for select * from ……. also declare c1 cursor for select * from xxx
I have a family tree and want to total all wealth for the entire family tree for any selected family member
I have a database of a family tree of several separate families. Family of Joe smith, family of John Jones. etc. some families have only 1 member others have hundreds of children, grandchildren, great-grandchildren, etc. John Jones had no children so he is a family of 1 John smith had 2 children S-C1 and S-C2 [...]
Answer Question
| September 7, 2012 7:40 PM
SAP, SQL statement
I have a database of a family tree of several separate families. Family of Joe smith, family of John Jones. etc. some families have only 1 member others have hundreds of children, grandchildren, great-grandchildren, etc. John Jones had no children so he is a family of 1 John smith had 2 children S-C1 and S-C2 [...]
Transform rows to files in an SQL statement.
Hello We hava been able to produce the SQL that returns us a Vertical table with the LABELTEXT from table CLIENTES (sql against qsys2/syscolumns). SELECT LABELTEXT FROM QSYS2.SYSCOLUMNS WHERE TABLE_NAME = ‘CLIENTES’ AND TABLE_SCHEMA = ‘MANEL’ Observe vertical orientation. Column 1 Column 2 xhrname Name xhrsurname Last Name Now I would like to join this [...]
Answer Question
| April 20, 2012 8:15 AM
AS/400, SQL, SQL statement
Hello We hava been able to produce the SQL that returns us a Vertical table with the LABELTEXT from table CLIENTES (sql against qsys2/syscolumns). SELECT LABELTEXT FROM QSYS2.SYSCOLUMNS WHERE TABLE_NAME = ‘CLIENTES’ AND TABLE_SCHEMA = ‘MANEL’ Observe vertical orientation. Column 1 Column 2 xhrname Name xhrsurname Last Name Now I would like to join this [...]
Long time to run the select SQL statement for Mimix Jornualed file
Hi Guys, I want to know why it need very long long time to run a select SQL statement on Mimix jornualed files. It ran over 3 days for a select statements on a MimixJrn files (over 1 Millians records). But only use less than 1 hour to complete the same SQL selection statement for [...]
Answer Question
| July 9, 2012 2:55 AM
AS/400, MIMIX, SQL statement
Hi Guys, I want to know why it need very long long time to run a select SQL statement on Mimix jornualed files. It ran over 3 days for a select statements on a MimixJrn files (over 1 Millians records). But only use less than 1 hour to complete the same SQL selection statement for [...]
sql statement…..
Can someone take a look at this code and please tell me what i am doing wrong? SQL> INSERT INTO “CDAAS”.”INFORMATION” 2 VALUES (‘MBedfo’,'Maurice’,'Bedford’,'Maurice Bedford’,”,”,’02/02/1990′,’1234′,”,”,”); VALUES (‘MBedfo’,'Maurice’,'Bedford’,'Maurice Bedford’,”,”,’02/02/1990′,’1234′,”,”,”) * ERROR at line 2: ORA-01722: invalid number
Answer Question
| May 3, 2011 4:27 PM
Oracle 11g, SQL Server, SQL statement
Can someone take a look at this code and please tell me what i am doing wrong? SQL> INSERT INTO “CDAAS”.”INFORMATION” 2 VALUES (‘MBedfo’,'Maurice’,'Bedford’,'Maurice Bedford’,”,”,’02/02/1990′,’1234′,”,”,”); VALUES (‘MBedfo’,'Maurice’,'Bedford’,'Maurice Bedford’,”,”,’02/02/1990′,’1234′,”,”,”) * ERROR at line 2: ORA-01722: invalid number
SQL statement needed to remove characters
I have data in one of my columns in a table that I would like to remove via a SQL update statement. In all cases, the data that I want to remove is the same 3 characters at the end of the varchar field. How would I structure the SQL statement?
Answer Question
| May 2, 2011 2:34 AM
SQL Server, SQL Server 2008, SQL statement, SQL tables
I have data in one of my columns in a table that I would like to remove via a SQL update statement. In all cases, the data that I want to remove is the same 3 characters at the end of the varchar field. How would I structure the SQL statement?
SQL Update Set: Higlight Customers without Invoices, Update and join Tables?
Hello, I am not sure how to do this with an SQL Update Set statemet: I have a table customers and I have related invoices. I would like to set one field to “not active” in the customer table that did not receive invoices since 2008. I can “Select” the corresponding records in the customer table [...]
Answer Question
| March 28, 2011 2:03 PM
AS/400 DB2, DB2, SQL statement
Hello, I am not sure how to do this with an SQL Update Set statemet: I have a table customers and I have related invoices. I would like to set one field to “not active” in the customer table that did not receive invoices since 2008. I can “Select” the corresponding records in the customer table [...]
SQLRPGLE Error in UPDATE Query
Hello, I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below. UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ‘ ‘ WHERE ID = :W_ID This works fine on one iSeries server and throws following error on [...]
Answer Question
| March 14, 2011 9:25 PM
AS/400, iSeries, RPG ILE, SQL, SQL statement, SQLRPGLE
Hello, I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below. UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ‘ ‘ WHERE ID = :W_ID This works fine on one iSeries server and throws following error on [...]
Terminate SQL exception, if it is running more than a specified time.
Whether we can forcefully terminate an sql statement during its execution if it is running for a long time or running more than a specified time?
Answer Question
| November 15, 2010 10:03 AM
Oracle 9i, Oracle performance, Oracle SQL, SQL Exception, SQL statement
Whether we can forcefully terminate an sql statement during its execution if it is running for a long time or running more than a specified time?
Testing RPGSQL for the number of records.
I need to update file A if I can match a record in file B using an SQL statement. (IE: is Work Order # 5 in file B.) Im looking for something similar to a SETLL. When I OPEN the cursor, will the SQLCA give me some specific answer? Or do I have to actually FETCH [...]
Answer Question
| September 20, 2010 5:03 PM
RPGSQL, SQL, SQL statement, V5R4M0
I need to update file A if I can match a record in file B using an SQL statement. (IE: is Work Order # 5 in file B.) Im looking for something similar to a SETLL. When I OPEN the cursor, will the SQLCA give me some specific answer? Or do I have to actually FETCH [...]
Create SQL statement in VBA Access 2007
How can I create a select Group BY SQL statement inside a VBA module? I’ve ran actions queries and they seem to take an effect in my tables but I’m having a difficult time creating a Select statement. Please display a couple of samples
Answer Question
| August 18, 2010 5:15 AM
Access 2007, Access VBA, SQL, SQL statement, VBA, VBA Access 2007
How can I create a select Group BY SQL statement inside a VBA module? I’ve ran actions queries and they seem to take an effect in my tables but I’m having a difficult time creating a Select statement. Please display a couple of samples
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
How can i use ms sql select statement with where clause in asp.net
Plus signs in fields when using a date from a file compared to the month and year function
I have included the complete SQL statement. I keep getting +++ in ontime and percent. select c.totallines, c.ontime, decimal(((c.ontime/c.totallines)*100),15,2) as percent from (select decimal(sum(b.totallines),15,2) as totallines, decimal(sum(b.ontime),15,2) as ontime from (select a.ord as ord, a.line as line, a.custreqdate as custreqdate, a.qtyord as qtyord, a.qtyship as qtyship, a.shipdate as shipdate, a.qtyinv as qtyinv, a.invdate as invdate, [...]
Answer Question
| June 1, 2010 2:08 PM
iSeries, iSeries SQL, SQL statement
I have included the complete SQL statement. I keep getting +++ in ontime and percent. select c.totallines, c.ontime, decimal(((c.ontime/c.totallines)*100),15,2) as percent from (select decimal(sum(b.totallines),15,2) as totallines, decimal(sum(b.ontime),15,2) as ontime from (select a.ord as ord, a.line as line, a.custreqdate as custreqdate, a.qtyord as qtyord, a.qtyship as qtyship, a.shipdate as shipdate, a.qtyinv as qtyinv, a.invdate as invdate, [...]
runScript() returning null
Hello to all of the participants. This is my first blog. This is a program to execute .sql file which contains bunch of sql statements. I have used iBatis package it’s compling and executing with out any mistakes, but resulting nothing. I have tried in both 2.3 and 2.0 release also. Can any one make [...]
Answer Question
| June 1, 2009 1:13 PM
iBATIS, SQL scripts, SQL statement
Hello to all of the participants. This is my first blog. This is a program to execute .sql file which contains bunch of sql statements. I have used iBatis package it’s compling and executing with out any mistakes, but resulting nothing. I have tried in both 2.3 and 2.0 release also. Can any one make [...]





