• Accessing Remote Databases from iSeries

    I am learning about how I can access a remote data bases from a iSeries to another iSeries. I can not use DDM files using SQL statements. Please, can you explain me how I can access databases from a iSeries to other iSeries using embedded RPGSQL? Regards and thanks for your help.

    Jeshua5 pointsBadges:
  • What is the best way to execute SQL statements in a CL program.

    What is the best way to execute SQL statements in a CL program? We can run SQL statements in a RPG program. I want to delete some records from a file using the SQL delete statement then organize it.

    SHhand25 pointsBadges:
  • Error message CPF4326 appeared during OPEN for file EMPJ1 (C S D F). .

    Hi, I am getting the error below. What is this error...please explain it to me. Message ID . . . . . . : RNQ1216 Severity . . . . . . . : 99 Message type . . . . . : Inquiry Date sent . . . . . . : 08/18/13 Time sent . . . . . . : 14:11:56 Message . . . . : Error message CPF4326 appeared during...

    Jay1010 pointsBadges:
  • SQL Server 2005: SQL statement in a variable

    Can anybody help me? "HOW TO ASSIGN A SQL-STATEMENT IN A VARIABLE". FOR EXAMPLE : TO ASSIGN A STRING IN A VARIABLE, WE DO LIKE THIS: DECLARE @A AS VARCHAR(20) SET @A='HAI' PRINT @A OUTPUT: HAI SIMILARLY HOW TO ASSIGN A SQL-STATEMENT IN A VARIABLE.

    Narendar30 pointsBadges:
  • IF ELSE in SQL Server stored procedure

    I am using this code which is giving error: if (@report_type = 'CM') Begin Select distinct Region,sum(ClientCount) as ClientTotal Into #NewTemp From ( End else if (@report_type = 'AM' ) Begin ( Select distinct Region,Area,sum(ClientCount) as ClientTotal Into #NewTemp1 From End else if (@report_type...

    Rrj15 pointsBadges:
  • Problems using SQL CONNECT to a remote server within an RPGLE program

    Let me apologize in advance if I fumble with the terminology and don’t explain myself as clearly as everyone is probably accustomed to. The specific situation I’m dealing with involves the need to have an RPGLE program on the iSeries connect to a data base that resides on a remote server. My...

    mikechance81275 pointsBadges:
  • Recursive SQL error

    For the life of me I can not see what my problem is. Any help would be appreciated. *************** Beginning of data **************************************** WITH RPL (LEVEL, PINBR, CINBR, QTYPR) AS (SELECT 1, ROOT.PINBR, ROOT.CINBR, ROOT.QTYPR FROM ITSTRU ROOT WHERE ROOT.PINBR = '8B714-0005651'...

    Timothy0125 pointsBadges:
  • CRTSQLRPGI

    I have two questions about an RPGLE program with embedded SQL statements: When compiling an RPGLE program with embedded SQL statements, how do you set the activation group? I am trying to run a program which ran when we were on version 5V4. Now that I am on version 6.1, the exact same program will...

    GHENDER190 pointsBadges:
  • Track SQL Statements run by a specific user through ODBC Connection

    There is a user id connecting to our iSeries System through ODBC Connection and will be executing some selected queries on iSeries using a 3rd Party Application. Those selected queries are approved by the Application Owner. Hence we would like to track the SQL Statements which are executed by this...

    Haaiderali215 pointsBadges:
  • How to save the output from an SQL select statement to a spool file

    Please can someone tell me how I can save the output from an SQL select statement to a spool file. Thanks, Tom

    Tomotsk75 pointsBadges:
  • Single commitment control in RPGLE program

    I have a rpgle program that uses 3-4 sql statements to update and insert data in 3-4 tables . Now what i want is that when program runs successfully then only these changes in tables should reflect else roll back . So for this is there any way to provide a single commitment control for all queries?...

    munduuu435 pointsBadges:
  • MySql Select multiple columnsfrom distinct rows based on one column

    I am building one sql query based on 5 select statements unioned all together. Each select is built as a variable with where clauses based on filters selected by the users. All 5 selects are concatenated together to build the one dynamic query. The one select below needs to be changed to select...

    Canuhp235 pointsBadges:
  • SQL statements question

    I have an accounts ENTRY table with many fields like (ac_bal, ac_id , ac_date, ...etc) and I want to retrieve the summation of each account in each month as seen in the table below. 10-01 21-04 02-11-4 ..... jan Feb mar . . . Etc. Can anyone help?

    SQL Server Ask the Experts2,585 pointsBadges:
  • Running Multiple SQL statements through JCL

    I need to run multiple sql statements seperatd by ';'. I want the execution to continue for all the SQL statements even if any of the SQLs throws out error. Is it possible?

    Vmfquest5 pointsBadges:
  • SQL Server 2005 query

    Hello sir I am new to sqlserver when retriving data like name gender sal deptno df F 100.00 10 mf M 1100.00 10 if M 1010.00 10 uf M 1000.00 20 yf F 1200.00 20 gf F 1030.00 20 hf M 1005.00 30 ff F 1040.00 30 from this i want retrive deptno maletotal sal female total sa 10 2110 100 20 1000 2230 30...

    Udaya5 pointsBadges:
  • Do I need SQL?

    DO I need it? I am just a home user anf oerform simole tasks, but have 8 examples of SQL programs in my program list. I have win 7 64 bit O/S

    0 pointsBadges:
  • Parameter in select statement

    Hi, I need to pass a parameter into a stored procedure which values are dynamic always. Executing a variable which having the Select statement. Following query working fine. BEGIN DECLARE @strQuery NVARCHAR(MAX) DECLARE @CountryId INT DECLARE @CityId INT SET @CountryId = 2 SET @CityId = ' AND...

    Plugsharma40 pointsBadges:
  • Embedded SQL in RPGLE

    I am trying to get some counts and totals from one file and put them in another. My SQL statement works fine with STRSQL, not in the RPGLE. Do I have to declare/set a cursor, exec sql and close the cursor just to put the total in another file? C/EXEC SQL C+ INSERT INTO outputfile C+ SELECT...

    Nickhutcheson165 pointsBadges:
  • 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; EXEC SQL PREPARE...

    Huana5 pointsBadges:
  • Alternative for LEFT OUTER JOIN

    HI all, select code.batchno, detailA.batchfee , detailB.batchfee from Code code left outer join Detail detailA on (detailA.id= code.id) left outer join Detail detailB (detailB.id= code.id) where code.category = categoryA order by code.id I want an alternative for left outer join.. I cannot use left...

    4knowledgexchng20 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following