+ Post New Thread
Page 1 of 33
1 2 3 11 ... LastLast
Threads 1 to 25 of 811

Forum: SQL

command line and embedded sql

  1. Sticky Thread Sticky: Order By with Case

    Is there a syntax where you can change the Order By clause based on Indicators? Need to add an F8 "Sort By" to a screen with a Declared SQL Statement. Something like... Select * from .... Where ... Order By Case When (:inF8 = :cNo) Then Fld1, Fld2, Fld3 When (:inF8 =...

    Started by FaStOnE, August 25th, 2009 02:00 PM
    2 Pages
    1 2
    • Replies: 28
    • Views: 1,202
    September 24th, 2009 01:51 AM Go to last post
  2. Sticky Thread Sticky: Listing of SQLSTATE values

    see attached .pdf

    Started by jamief, May 15th, 2008 11:30 AM
    • Replies: 5
    • Views: 1,479
    June 16th, 2008 12:30 AM Go to last post
  1. Using SQLDA with a scroll cursor?

    We have an existing RPGLE service program that you feed an SQL string and it returns to you the resultset as XML. It does this using the SQLDA to assign storage space to retrieve each row in turn. I want to change this to use a scroll cursor so I can give it a starting position. E.G. fetch me 20...

    Started by BenThurley, 1 Day Ago 10:49 AM
    • Replies: 4
    • Views: 67
    8 Hours Ago 01:35 PM Go to last post
  2. Post count and sum of count in one query

    I have a query that I am trying to combine into one query and am having trouble getting it to work select sum(count) from (SELECT Distinct cCust#, COUNT(Call_Id) as count FROM cMstr LEFT OUTER JOIN salesCalls ON (cCust# = CustNum...

    Started by kast1, 1 Day Ago 12:28 PM
    • Replies: 6
    • Views: 81
    15 Hours Ago 06:32 AM Go to last post
  3. Cool Need help

    1. I want to merge both my flthst(history file and flt(detail file) together. 2. The history file has the same field type names as the detail file. 3. The detail file has 12 months data. 4. The history has three years of records going back. 5. I need to make sure there are no...

    Started by dcutaia, 1 Day Ago 03:51 PM
    • Replies: 4
    • Views: 54
    17 Hours Ago 04:46 AM Go to last post
  4. is there any way

    Hi how to see the sql queries for the particular user they entered in sql session.they must stored in qsys library but how do you see the queries entered by the particular user,time,date

    Started by rajapandian, 2 Days Ago 11:49 AM
    • Replies: 3
    • Views: 63
    1 Day Ago 10:27 AM Go to last post
  5. Db2 : Md5 ?

    Hello, What is the function in the DB2 (V5R4) that generate hashing value ? (hash/digest) Have any ?? :confused: want to transfer following sql statement from mySql to DB2 select md5(row_name) from table Thanks dhanuxp

    Started by dhanuxp, 2 Days Ago 10:39 AM
    • Replies: 3
    • Views: 59
    1 Day Ago 07:47 AM Go to last post
  6. DB2 Error - SQLRPGLE -Insert query

    hi, One of our SQLRPGLE program runs - kind of gets hanging - at an INSERT statement. Logic is as below Check if recrd exists in file A If so update query to update file A else insert query to insert records into file A with a select subquery endif

    Started by hema, 2 Days Ago 01:05 AM
    • Replies: 4
    • Views: 66
    2 Days Ago 03:00 PM Go to last post
  7. sql dec to date convert

    Hi, Can anybody have the sql statement to convert decimal data to date type as we can do in rpgle Regards Sai

    Started by sai400, February 22nd, 2008 03:12 AM
    • Replies: 4
    • Views: 345
    3 Days Ago 11:27 AM Go to last post
  8. Cool Adding a history file to an SQLRPGLE program

    I have built a history file for Labor orders(FLTHST). I have an existing sql program that uses the main file(FLT) but I want to add the history file(FLTHST) to it. Some of the records are in the history file(FLTHST) and also in the detail file(FLT) so I need to make sure I only have one...

    Started by dcutaia, 5 Days Ago 03:18 PM
    • Replies: 3
    • Views: 70
    3 Days Ago 11:10 AM Go to last post
  9. sql code = 501 Cursor not open

    Hey guys. I'm using some embedded sql in an sqlrpgle CGIDEV2 program. I've used it exactly like this before, but for some reason this time, it's giving me sqlcod = 501. Can anyone tell what's going on? Thanks. D quote C CONST('"') D snglQuote C ...

    Started by violinsoundcool, 1 Week Ago 04:47 PM
    • Replies: 5
    • Views: 117
    1 Week Ago 01:04 PM Go to last post
  10. Connect to multiple servers on iSeries

    Hi, I have multiple IBM i servers with DB2 running on it. I want to create an SQL script / CL / RPG program which allows me to connect to multiple servers for copying data from one to another. Here is the pseudo code. SQL connect <SOURCE> server. SQL connect <TARGET> server. Set...

    Started by anwer_saeed, 1 Week Ago 11:21 AM
    multiple servers
    • Replies: 2
    • Views: 70
    1 Week Ago 12:27 PM Go to last post
  11. Query with Current Date

    Hi guys, I'm trying to create a QMQRY but I missing one of the field selection which is the date. This is my SQL: SELECT ALL T01.CDCASN, T01.CDAREA, T01.CDSTYL, T01.CDCOLR, T01.CDSDIM, T01.CDPAKU ...

    Started by jorame, 2 Weeks Ago 06:20 PM
    • Replies: 2
    • Views: 59
    1 Week Ago 11:00 AM Go to last post
  12. Could aliasing make a difference?

    I have a bet...I could test it against our users, but being kinder and gentler, I thought I'd run it by you first. We're getting a "TargetInvocationException" error in our .net code. Our programmer believes it related to a new Stored Procedure, UPDATE Table SET vendor=(SELECT vendor FROM Table...

    Started by ibcarolek, 1 Week Ago 10:55 PM
    • Replies: 0
    • Views: 43
    1 Week Ago 10:55 PM Go to last post
  13. Cool Loading variables with SQL

    Hi, I have a 100 field file(item master) and I need to load about 15 fields. Is there an easier way to load them other than the select field1, field2, field3, etc ...

    Started by dcutaia, 2 Weeks Ago 10:59 AM
    • Replies: 1
    • Views: 82
    2 Weeks Ago 07:28 PM Go to last post
  14. Cool Loading field information in SQL

    Can someone give me an example on how to load two variables from a db2 file. I believe it is like this /End-Free C/EXEC SQL C+ Select itemmaster C+ SET IDSCE = :SIDSCE, C+ IITYP = :SIITYP,

    Started by dcutaia, 2 Weeks Ago 05:08 PM
    • Replies: 3
    • Views: 93
    2 Weeks Ago 02:58 AM Go to last post
  15. DR Replication of Stored Procedures

    Would anyone have experience or suggestions with handling stored procedure replication between multiple OS400 environments? When we role-swap environments, we seem to have the SQL Sysprocs and/or Sysparms out of line. Sometimes the procedure is not defined, but the Sysparms are there. Other...

    Started by dhuesman, 2 Weeks Ago 01:56 PM
    • Replies: 0
    • Views: 50
    2 Weeks Ago 01:56 PM Go to last post
  16. SQL stored procedures

    How to create SQL stored procedures in AS400?

    Started by Nil, 3 Weeks Ago 08:18 AM
    • Replies: 4
    • Views: 105
    3 Weeks Ago 06:06 PM Go to last post
  17. Sqlcod = -000000404

    Hi, Anyone is aware about the SQLCOD = -000000404. Someone please let me know the purpose of this SQL code? Thanks, Ranjini

    Started by ranjini, 3 Weeks Ago 04:53 AM
    • Replies: 4
    • Views: 104
    3 Weeks Ago 09:36 AM Go to last post
  18. Number of updated / deleted records in a program

    Hello guys, i want to find out how i can retrieve the number of records that has just been updated / deleted from embedded sql in a RPGLE program. From what i have searched, i need to use an api called QusRMBRD, which seems very complex. Does anyone have something simple to do this? I want to...

    Started by fjleon, 3 Weeks Ago 11:24 AM
    • Replies: 4
    • Views: 105
    3 Weeks Ago 07:26 PM Go to last post
  19. SQL External Stored procedure

    Would anyone know if there is a way to "see" the SQL specific compiler options which were used to create an object? I believe the DSPPGM is telling me the working object has DFTACTGRP and is using *ENDACTGRP, but I'm having an odd challenge... I have an old stored procedure (SQLRPGLE) which...

    Started by dhuesman, 4 Weeks Ago 05:42 PM
    • Replies: 3
    • Views: 109
    3 Weeks Ago 08:55 AM Go to last post
  20. SQL with multi-membered files

    I almost certain the answer is no, but..:duh Is there any way to do a SQL CREATE VIEW over a specific member of a multi-membered physical file? I am revisiting a problem from years ago here. I think I tried creating the view over an alias (local DDM) and that did not fly. Any other ideas?

    Started by Denny, 4 Weeks Ago 11:59 AM
    • Replies: 3
    • Views: 95
    4 Weeks Ago 12:34 PM Go to last post
  21. RPGLE / SQL Stored procedure question

    I need to modify a procedure which has an input parm which is used as a host var in an SQL select. Now...I need to increase that parm in length (from 3 to 10). I still need a 3 char field for the SQL select to work and have tried a few things to no avail. The SQL host var in this case is a...

    Started by dhuesman, 4 Weeks Ago 07:45 AM
    • Replies: 0
    • Views: 68
    4 Weeks Ago 07:45 AM Go to last post
  22. SQL Close for Error

    I have a generic question here... While processing SQL statements within SQLRPGLE, does anyone have a generic close routine for the "ifs"?? If a SQL loop errors for whatever reason (Open/Fetch/Process/Close) and the program terminates without closing the cursor... how do you close it out...

    Started by FaStOnE, 4 Weeks Ago 09:13 AM
    • Replies: 1
    • Views: 95
    4 Weeks Ago 09:24 AM Go to last post
  23. Read Only Cursor

    Cursor is defined as: Exec SQL Declare WrkDtl Cursor For SELECT * FROM InvDWrk WHERE ShipID = :HdrOut.ShipID and Whs = :HdrOut.Whs and Invoice = :HdrOut.Invoice ...

    Started by FaStOnE, February 9th, 2010 01:19 PM
    • Replies: 3
    • Views: 118
    February 10th, 2010 01:21 AM Go to last post
  24. Strsql

    In need to know where the sql queries get stored? Might be stored in some system libraries in qsys.....also while exit sql if press 2 means...the session get stored are not?

    Started by rajapandian, February 9th, 2010 09:31 AM
    • Replies: 4
    • Views: 126
    February 9th, 2010 05:37 PM Go to last post
  25. Sqlrpgle

    I need to change the records of the file through sqlrpgle......please somebody help me to do this....i need exact code.........can u please

    Started by rajapandian, February 9th, 2010 11:05 AM
    • Replies: 3
    • Views: 90
    February 9th, 2010 12:49 PM Go to last post

+ Post New Thread

Forum Information and Options

Moderators of this Forum
Users Browsing this Forum

There are currently 3 users browsing this forum. (0 members & 3 guests)

Thread Display Options

Use this control to limit the display of threads to those newer than the specified time frame.

Allows you to choose the data by which the thread list will be sorted.

Order threads in...

Note: when sorting by date, 'descending order' will show the newest results first.

Icon Legend

Contains unread posts
Contains unread posts
Contains no unread posts
Contains no unread posts
More than 15 replies or 10 views
Hot thread with unread posts
More than 15 replies or 10 views
Hot thread with no unread posts
Closed Thread
Thread is closed
Thread Contains a Message Written By You
You have posted in this thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts