ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Search Result

Collapse
71 results in 0.0033 seconds.
Keywords
Members
Tags
sql x
  •  

  • tbrantley
    started a topic Using Clob Fields in SQL
    in SQL

    Using Clob Fields in SQL

    Has anyone tried using a clob field inside of SQL?

    I'm moving the data from the YAJL copyBufStr function into a clob variable.

    Once I try to use the clob variable inside the SQL statement I get the error below.

    Length in varying-length, LOB, or XML host variable...
    See more | Go to post

  • user13482104
    started a topic Problems with an INSERT with embedded SQL

    Problems with an INSERT with embedded SQL

    Hello dear community,
    I'm currently having trouble with an insert. I can't get an insert. In the debug I saw that the SQLCOD was set to -7008 (object-name NOT VALID FOR
    OPERATION (reason code)). I've attached an image. Can someone tell me what I'm doing wrong? I create the file in QTEMP...
    See more | Go to post

  • CliffDowell
    started a topic A recursive query instead of a control-break scenario?
    in SQL

    A recursive query instead of a control-break scenario?

    In a single table, I have a set of records (one table) for people with (potentially) multiple records per individual person. For each person, those multiple records have a date and severity code (possible 1 through 5 but not requirements on what values other than 1 through 5 and many don't have a 1)....
    See more | Go to post

  • Carpiem
    started a topic Why REGEXP_COUNT returns a wrong value?
    in SQL

    Why REGEXP_COUNT returns a wrong value?

    Hello all,

    I'm puzzled why REGEXP_COUNT returns weird results, for example take this query:

    PHP Code:
    select regexp_count('1','[A-Z]')
    from SYSIBM.SYSDUMMY1 

    Regular expression [A-Z] means it accepts a letter from A to Z. But 1 is no letter, and the result of...
    See more | Go to post

  • CliffDowell
    started a topic Grouping a contiguous sequence?
    in SQL

    Grouping a contiguous sequence?

    Hi all,
    So we all know well that poorly architected tables can lead to us having to do double backflips in SQL to try to get the data, right??

    Does anyone have any tricks for grouping subsequent records that follow a contiguous sequence and then breaking to the next group when the...
    See more | Go to post
    Last edited by CliffDowell; December 9, 2020, 04:10 PM. Reason: Edited to correct spacing in final result headers.

  • SQL static View shows as a Logical File - recompile considerations

    Hello,

    I am a new IBMi programmer working in small shop with primarily legacy code. As part of our efforts to modernize, we want to take advantage of SQL static Views when creating reports that use sets of data. I created a SQL static View that uses fields from 4 different Physical Files....
    See more | Go to post

  • castle123
    started a topic SQL update to calculate totals on fly
    in SQL

    SQL update to calculate totals on fly

    I have an update that does a table rollover for monthly buckets along with a yearly bucket column, I am having an issue updating the yearly, I want to have the yearly bucket updated with the monthly i.e.

    update table set col1 = current, col_2 = col_1, col_3 = col_2, ...col_12=col_11, yearly_col...
    See more | Go to post

  • eloiselle
    started a topic Tracking Usage of a View
    in SQL

    Tracking Usage of a View

    Hello everyone,

    I've been trying recently to create some sort of event monitor (not sure if this is a correct solution) in DB2 to try to keep tracks of a view's usage (each time it i used it in a SELECT statement, for instance).
    I've seen multiple solutions existing for T-SQL, but...
    See more | Go to post
    Last edited by eloiselle; March 11, 2019, 12:05 PM. Reason: Added tags

  • DougCMH
    started a topic CREATE FUNCTION (External) - Which Subprocedure?
    in SQL

    CREATE FUNCTION (External) - Which Subprocedure?

    Something I'm not clear on - In reviewing the syntax for CREATE FUNCTION (External), I know I can specify that the external procedure to be run is a subprocedure in a service program, and where to specify the service program.

    However, I don't see where to specify the name of the actual...
    See more | Go to post

  • DougCMH
    started a topic Getting information on an SQL SEQUENCE object
    in SQL

    Getting information on an SQL SEQUENCE object

    How can I get the current value of an SQL SEQUENCE object, WITHOUT incrementing it with NEXT VALUE FOR first?

    Also, how can I get information about a SEQUENCE, such as min, max, increment value, etc?
    See more | Go to post

  • inigo.redin
    started a topic How to reclaim unused space from LOB/CLOB columns?
    in SQL

    How to reclaim unused space from LOB/CLOB columns?

    Hi.

    I've been testing how the CLOB columns work (relative to disk space ).

    I've tried erasing data from a couple of columns with CLOB data type (it seems VARCHAR and the other LOBs work in the same way).
    I see there is no change about the size on disk occupied by the...
    See more | Go to post

  • jason.aleski
    started a topic Looking for Query/400 Alternative?

    Looking for Query/400 Alternative?

    I'm currently in a very "traditional" and small IBM i/IT shop (6 person crew). While its been bitter-sweet to have some of our IT staff for 30+ years, they will soon be leaving the workforce for retirement, etc; thus my responsibilities will be more focused on the IBM i. We still rely heavily...
    See more | Go to post

  • CaptainRon
    started a topic DataStructure SORT on two different fields.....

    DataStructure SORT on two different fields.....

    So I have a Data structure array. I can sort on one field using the SORTA command with %subarr. Can I add another field WITHOUT combining the two fields together in a one field sort? To basically sorting on two fields or three etc..... Again without combining into one field. If I can in SQL do you...
    See more | Go to post

  • VigneshMohan
    started a topic Override System Default Value - Date Column
    in DB2

    Override System Default Value - Date Column

    The system defined default value for a date column in DB2/iSeries is always "current date". How can we change that to '01/01/0001' (*LOVAL) ?

    When I insert a record via RPGLE, the date fields always default to *LOVAL.
    Whereas, when I insert a record using SQL (or an ETL
    ...
    See more | Go to post

  • Gary B
    started a topic Dspfd *accpth
    in DDS

    Dspfd *accpth

    Hi all,

    I wasn't sure where to post this so here goes. If it belongs somewhere else please let me know.

    I'm going crazy over a problem I cannot resolve, I've wrestled this for days and all my research hasn't turned up anything.

    I am getting a "decimal data...
    See more | Go to post

Our Sponsors

Collapse
Working...
X