Announcement

Collapse
No announcement yet.

Search Result

Collapse
68 results in 0.0101 seconds.
Keywords
Members
Tags
sql x
  •  

  • 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

  • gunnypatel
    started a topic XMLATTRIBUTE Function New Line Character
    in SQL

    XMLATTRIBUTE Function New Line Character

    I am trying to create an XML using the SQL XML functions. One of the things that I need to do is add newlines to an attribute value. The special character sequence for new line is " ". When I run that through the XMLATTRIBUTE function it comes out as 
 because the &...
    See more | Go to post

  • Stored procedure on AS400 - how works cursor and update statement

    Hi guys, I have a question, I have a stored procedure on AS400 and I see that I can call like this: call library.prcocedure_name(parameters), the object on AS400 is *pgm type. I never worked since now with stored procedure and for this reason I don't have very large knowledge.
    I understand that...
    See more | Go to post

  • SET based SQL Tip - Splitting rows using common table expressions

    This document contains two real world examples which show how to use SET based SQL and common table expressions, to split input rows, into multiple output rows, unconditionally, or conditionally.

    There are many reasons to shift many types of work to SET based SQL, but improved performance...
    See more | Go to post

Our Sponsors

Collapse
Working...
X