1
Compare part of string to field
Hi. Hopefully a simple one but beyond my self-taught abilities in iSeries SQL. I have a file with one field containing customer order details including their purchase order reference such as ‘A1-123′. The first part of the PO reference is a branch identifier. Unfortunately, as it is a free text field, it is sometimes expressed [...]
Answer Question
| May 16, 2012 10:40 AM
iSeries SQL, iseries v5r4
Hi. Hopefully a simple one but beyond my self-taught abilities in iSeries SQL. I have a file with one field containing customer order details including their purchase order reference such as ‘A1-123′. The first part of the PO reference is a branch identifier. Unfortunately, as it is a free text field, it is sometimes expressed [...]
Change Initial Program
how do you change the initial program and library for all user profiles preferrably using SQL.
Answer Question
| March 31, 2012 5:17 PM
iSeries SQL, SQL Profiler, V5R1
how do you change the initial program and library for all user profiles preferrably using SQL.
iSeries SQL case on AS/400
Is there an equivalent to case when exists on the as/400?
Answer Question
| June 23, 2011 10:14 AM
AS/400 SQL, DB2 SQL, iSeries, iSeries SQL
Is there an equivalent to case when exists on the as/400?
iSeries SQL ISNULL Equivalent
What is the equivalent of the function ISNULL in t-sql in AS/400 iSeries Navigator SQL? or the equivalent of the NZ function in Access?
Answer Question
| January 27, 2011 10:28 PM
AS/400, iSeries Access, iSeries Navigator, iSeries SQL, T-SQL
What is the equivalent of the function ISNULL in t-sql in AS/400 iSeries Navigator SQL? or the equivalent of the NZ function in Access?
Deleting unmatched records from a file in iseries SQL
I’m trying to delete unmatched records from file A based on file B. The files are matched by ListNo. Code: DELETE FROM DVMURRAY/INSRP100 WHERE SHListNo = ALL ( SELECT SHListNo FROM DVMURRAY/INSRP100 Left Outer Join DVMURRAY/INSRP200 on SHListNo = SDListNo WHERE SDListNo is Null ) Row not found for DELETE. [...]
Answer Question
| November 24, 2010 5:31 PM
iSeries SQL, iseries v5r4, RPGSQL, SQL, V5R4
I’m trying to delete unmatched records from file A based on file B. The files are matched by ListNo. Code: DELETE FROM DVMURRAY/INSRP100 WHERE SHListNo = ALL ( SELECT SHListNo FROM DVMURRAY/INSRP100 Left Outer Join DVMURRAY/INSRP200 on SHListNo = SDListNo WHERE SDListNo is Null ) Row not found for DELETE. [...]
What does this mean when SQLCOD = -206? I need to write 2 sets embedded SQL statement in my program.
what does this mean when SQLCOD = -206. I need to write 2 sets embedded SQL statement in my program. first one is one and I was able to fetch data but the 2nd one has error just right after I declare cursor. Here are the statements EVAL SQLSTMT2 = SELECT_H_2 + WHERE_H_2; + AND_H_A; [...]
Answer Question
| August 19, 2010 7:06 PM
iSeries SQL, SQL statements, SQLRPGLE, System i
what does this mean when SQLCOD = -206. I need to write 2 sets embedded SQL statement in my program. first one is one and I was able to fetch data but the 2nd one has error just right after I declare cursor. Here are the statements EVAL SQLSTMT2 = SELECT_H_2 + WHERE_H_2; + AND_H_A; [...]
Set DataTable name in returned data set
I have a SQL stored procedure with simple select statements that returns multiple datatables within the dataset. The stored procedure is being called from C#/.NET code. The stored procedure is returning the data but the datatable names end up Table, Table1, Table2,… when the dataset is received on the .NET side. Is there a way to define [...]
Answer Question
| July 20, 2010 3:29 AM
C# .NET, DataTable name, iSeries SQL, SQL stored procedures
I have a SQL stored procedure with simple select statements that returns multiple datatables within the dataset. The stored procedure is being called from C#/.NET code. The stored procedure is returning the data but the datatable names end up Table, Table1, Table2,… when the dataset is received on the .NET side. Is there a way to define [...]
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, [...]
iSeries SQL function in a SQL procedure – error: Function Name “in *LIBL type *N not found.”
Hi everyone. I have created an SQL procedure using Create Procedure interactively after starting SQL with STRSQL on an iSeries V5R4. I then created a function using the Create Function statement interactively in SQL on the iSeries. I put the function in the select field prior to the where clause. The function works interactively in a SQLRPGLE and the procedure works [...]
Answer Question
| February 6, 2010 4:36 PM
iSeries SQL
Hi everyone. I have created an SQL procedure using Create Procedure interactively after starting SQL with STRSQL on an iSeries V5R4. I then created a function using the Create Function statement interactively in SQL on the iSeries. I put the function in the select field prior to the where clause. The function works interactively in a SQLRPGLE and the procedure works [...]
SQLRPGLE
I need to retrieve the RRN and use it within my RPGLE program. I have the Select RRN(file) statement, but I get a Character in Cast argument not valid when executing. Any suggestions?
Answer Question
| October 26, 2009 9:09 PM
iSeries SQL, SQLRPGLE
I need to retrieve the RRN and use it within my RPGLE program. I have the Select RRN(file) statement, but I get a Character in Cast argument not valid when executing. Any suggestions?
Need to know the date and time a particular sql command was fired through an interactive session
Is it possible to find the date and time a particular sql command was entered. Iam able to view the commands entered in an sql session but not able to find the date and time the commands where fired.
Answer Question
| October 11, 2009 10:39 AM
iSeries SQL, SQL, SQL commands
Is it possible to find the date and time a particular sql command was entered. Iam able to view the commands entered in an sql session but not able to find the date and time the commands where fired.
Retreiving AS/400 SQL scripts
When I start sql on our iSeries, the system returns my previous scripts I have run. Which fle do these live in in the iSeries and can I report on them?
Answer Question
| October 12, 2009 2:33 PM
i570, iSeries SQL, SQL commands, SQL scripts
When I start sql on our iSeries, the system returns my previous scripts I have run. Which fle do these live in in the iSeries and can I report on them?
AS/400 SQL
want to all some users to run an SQL for display only and not allow update of delete. is there a way to do this
Answer Question
| August 5, 2009 1:59 PM
AS/400 SQL, iSeries SQL, SQL
want to all some users to run an SQL for display only and not allow update of delete. is there a way to do this
Iseries SQL Auditing
I want to audit interactive SQL statements. Is this something I can do and if so how ?
Answer Question
| April 10, 2009 3:15 PM
iSeries SQL, iSeries SQL Auditing
I want to audit interactive SQL statements. Is this something I can do and if so how ?
COPY data between to files with SQL in iSeries
hi, i need help with this: i have two files in Iseries one of them is new and other have old records and i pretend with sql copy some records. But file 1(new) and file 2(old) they don’t have same collums file1 file2 fielda fielda fieldb fieldb fieldc filedd fieldd how can i make the [...]
Answer Question
| January 14, 2009 2:29 PM
iSeries SQL, SQL, SQL Copy Record, SQL Record
hi, i need help with this: i have two files in Iseries one of them is new and other have old records and i pretend with sql copy some records. But file 1(new) and file 2(old) they don’t have same collums file1 file2 fielda fielda fieldb fieldb fieldc filedd fieldd how can i make the [...]
Need an iSeries SQL that will reduce mutilple entries to one per type
I need to produce an extract that is a combination of two files. File A has a policy number and a folder type. File B has the document number. File C will be the product of File A and File B. I can join the files on the policy number and folder type to get [...]
Answer Question
| December 9, 2008 10:00 PM
AS/400 File Extract, iSeries SQL
I need to produce an extract that is a combination of two files. File A has a policy number and a folder type. File B has the document number. File C will be the product of File A and File B. I can join the files on the policy number and folder type to get [...]
1





