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

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,154
    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,462
    June 16th, 2008 12:30 AM Go to last post
  1. 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, 2 Days Ago 04:47 PM
    • Replies: 5
    • Views: 90
    1 Day Ago 01:04 PM Go to last post
  2. 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: 60
    6 Days Ago 12:27 PM Go to last post
  3. 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, 1 Week Ago 06:20 PM
    • Replies: 2
    • Views: 48
    1 Week Ago 11:00 AM Go to last post
  4. 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: 37
    1 Week Ago 10:55 PM Go to last post
  5. 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, 1 Week Ago 10:59 AM
    • Replies: 1
    • Views: 75
    1 Week Ago 07:28 PM Go to last post
  6. 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, 1 Week Ago 05:08 PM
    • Replies: 3
    • Views: 81
    1 Week Ago 02:58 AM Go to last post
  7. 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, 1 Week Ago 01:56 PM
    • Replies: 0
    • Views: 42
    1 Week Ago 01:56 PM Go to last post
  8. SQL stored procedures

    How to create SQL stored procedures in AS400?

    Started by Nil, 2 Weeks Ago 08:18 AM
    • Replies: 4
    • Views: 91
    2 Weeks Ago 06:06 PM Go to last post
  9. 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, 2 Weeks Ago 04:53 AM
    • Replies: 4
    • Views: 89
    2 Weeks Ago 09:36 AM Go to last post
  10. 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, 2 Weeks Ago 11:24 AM
    • Replies: 4
    • Views: 100
    2 Weeks Ago 07:26 PM Go to last post
  11. 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, 3 Weeks Ago 05:42 PM
    • Replies: 3
    • Views: 100
    3 Weeks Ago 08:55 AM Go to last post
  12. 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, 3 Weeks Ago 11:59 AM
    • Replies: 3
    • Views: 87
    3 Weeks Ago 12:34 PM Go to last post
  13. 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, 3 Weeks Ago 07:45 AM
    • Replies: 0
    • Views: 59
    3 Weeks Ago 07:45 AM Go to last post
  14. 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: 85
    4 Weeks Ago 09:24 AM Go to last post
  15. 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, 4 Weeks Ago 01:19 PM
    • Replies: 3
    • Views: 111
    4 Weeks Ago 01:21 AM Go to last post
  16. 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, 4 Weeks Ago 09:31 AM
    • Replies: 4
    • Views: 113
    4 Weeks Ago 05:37 PM Go to last post
  17. 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, 4 Weeks Ago 11:05 AM
    • Replies: 3
    • Views: 83
    4 Weeks Ago 12:49 PM Go to last post
  18. SQLRPG Library

    I need to change which library SQL stmts use in a program depending on prompt screen input. I know I can duplicate the select statements and use static library names. I also know I can't use a variable name for the library (i.e. :libname/iwm). I have tried changing the library list in the...

    Started by rckass, 4 Weeks Ago 11:21 AM
    • Replies: 2
    • Views: 75
    4 Weeks Ago 11:30 AM Go to last post
  19. Compatibility issue between DDS and DDL

    Is there a Value Compatibility issue between a DDS and DDL? I have an Original Table with a DDS FieldA defined as 15a I have a new Table with DDL that has FieldA defined as Char(15) Both tables are the same layouts (sans a few extra fields in the 2nd table) Performing the following errors...

    Started by FaStOnE, February 4th, 2010 10:33 AM
    • Replies: 7
    • Views: 180
    4 Weeks Ago 02:28 PM Go to last post
  20. Column sorting with Row_Number () Order (Order by)

    Hello, I'm try to sort columns in a called procedure and I'm unable to get the case statement to work in the code below. No matter what parm is passed, the first statement (the ASC , in this case) is the only one that executes. If I manually change the sort feature to be one statement ( further...

    Started by Timay, February 3rd, 2010 01:11 PM
    • Replies: 1
    • Views: 132
    February 3rd, 2010 04:09 PM Go to last post
  21. Finding Duplicate with Mulitple column

    I have a table with 7 columns. I need to get only the duplicated rows based on 5 columns. Could any one help me out. Thanks.

    Started by vinomails, February 2nd, 2010 02:35 AM
    • Replies: 1
    • Views: 84
    February 2nd, 2010 05:15 AM Go to last post
  22. To read the second member

    How can I select a physical file (PF) with multiple members on AS/400 from Windows SQL?

    Started by rajapandian, January 28th, 2010 03:53 PM
    • Replies: 1
    • Views: 113
    January 28th, 2010 04:14 PM Go to last post
  23. Obtain 1st, 2nd and last word from a string

    Hi, I need to obtain only certain word's from a string. Is there a easy way to do that? Thanks

    Started by UAMI, January 27th, 2010 07:56 AM
    • Replies: 10
    • Views: 279
    January 27th, 2010 12:23 PM Go to last post
  24. Combine multiple rows into one row

    I have a need to combine multiple rows into a single row, here is the table: Cust Store StartDate StoreDay StoreFreq 94703 427 01/16/10 MON WEEKLY 94703 427 01/16/10 WED ...

    Started by kast1, January 20th, 2010 04:03 PM
    • Replies: 5
    • Views: 423
    January 24th, 2010 03:42 AM Go to last post
  25. Conditional Where Clause

    I need to build a conditional Where Clause but not sure how to construct.... I have a single field that I either need ALL records (Fieldname = Fieldname) or NOT IN a group (FieldName Not in ( cond1, cond2 )) and I want to base this on an indicator... So, going by what I know it's going to be...

    Started by FaStOnE, December 3rd, 2009 04:13 PM
    • Replies: 16
    • Views: 482
    January 22nd, 2010 09:30 AM Go to last post

+ Post New Thread

Forum Information and Options

Moderators of this Forum
Users Browsing this Forum

There are currently 4 users browsing this forum. (0 members & 4 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