User Profile
Collapse
-
Unix Timestamps so we're not using PHP... -
What is the best practice for storing data in multiple time zones?
I have data that has to be converted to various time zones based on what setting an account has chosen within the database. All of the data is stored in GMT. There is a function which we've built to convert the data, however, the response time when using it in queries is obviously slow. Anyone have a similar situation in the past? If so, how did you solve it? Trying to determine if adding additional fields for the timezone specific values or... -
The where clause is highlighted below:
UPDATE SAGE2ADM.TICKET
SET TICKETSTATUS = (SELECT STATUS FROM
SAGE2ADM.STAGE_ EESMPROBLEM_NOR TH S WHERE S.SOURCETABLENA ME=P.SOURCETABL ENAME AND S.PROBLEMNUMBER =P.PROBLEMNUMBE R
AND S.STATUS<>P.TIC KETSTATUS)
WHERE TICKETNUMBER=P. TICKETNUMBER AND SOURCETABLENAME =P.SOURCETABLEN AME;Leave a comment:
-
Thanks for the link to that stored procedure. I've created the following stored procedure and now I'm getting a syntax error although I'm not sure why. Here is the sp:
CREATE PROCEDURE UPDATE_TICKETST ATUS_EESMNORTH
LANGUAGE SQL
BEGIN ATOMIC
FOR P AS SELECT SOURCETABLENAME , TICKETNUMBER FROM SAGE2ADM.TICKET DO
UPDATE SAGE2ADM.TICKET
SET TICKETSTATUS = (SELECT STATUS FROM
SAGE2ADM.STAGE_ EESMPROBLEM_NOR TH...Leave a comment:
-
Error message is as follows.
SQL0811N The result of a scalar fullselect, SELECT INTO statement, or VALUES
INTO statement is more than one row. SQLSTATE=21000
I'm aware that it's more than one row. It can be so how do I get around this.Leave a comment:
-
I was in the same situation a year ago and I used the IBM Migration Toolkit. It was very helpful.Leave a comment:
-
Problem with Update Query in db2 9.5
UPDATE SAGE2ADM.TICKET W SET W.TICKETSTATUS = S.STATUS FROM SAGE2ADM.STAGE_ EESMPROBLEM_NOR TH S
WHERE S.SOURCETABLENA ME=W.SOURCETABL ENAME AND S.PROBLEMNUMBER =W.PROBLEMNUMBE R AND S.STATUS<>W.TIC KETSTATUS);
This works fine in SQL Server, but not db2 9.5. I modified the SQL to be the following for db2 but then i get a full select error:
UPDATE TICKET T
SET TICKETSTATUS = (SELECT S.STATUS
FROM SAGE2ADM.STAGE_ EESMPROBLEM_NOR TH... -
Thanks for the response. I was able to run the command and that particular column shows 8 but the column Online CPU says 4. Interestingly enough, when I look at the Control Center CA, I see 2.Leave a comment:
-
DB2 Cpu Usage
I want to know if my DB2 Server was configured to use the 2 CPUs on it. What do I need to do to figure this out? I have run db2licm -l and it doesn't provide the necessary information as it did on my peers server. I wasn't the person responsible for configuring it and I've asked the person who installed it if he set it up this way and he is unsure. Any suggestions on finding this out? We're running Federation Server and the server is beyond slow.... -
DB2 TableSpace Usage Actual Size vx Allocated Size
I have a couple of tablespaces set up in which the actual size appears to be half the size of the allocated size. I have the tablespaces set to a maxsize of None, and increasesize of 5 M as space is needed. Why does the table end up getting to be soo big? With combining all of the tablespaces in this situation, I have a db whose actual size is 39 GB and the allocated space is 69 GB. I've been running runstats daily followed by reorg then a alter... -
Merge on LUW 9.5.1 - Not Atomic Continue on SQL Exception
Is the Not Atomic Continue on SQL Exception clause of the Merge statement not supported on DB2 9.5.1 LUW? I can find info on z/OS but it looks like it's N/A for LUW. I'm looking to make my merge statement more effective to avoid total failure in case of an error. I would prefer that it continue if it encounters an error on one record.
Thanks in advance for the suggestions -
Merge Into using 'With UR'
Has anyone been able to successfully create a Merge Into Statement using 'With UR' as part of the select? I have the following statement:
MERGE INTO TABLE C USING(SELECT ...) AS S
ON (S.SOURCETABLEN AME=C.SOURCETAB LENAME AND S.CHANGE_NUMBER =C.CHANGENUMBER )
WHEN NOT MATCHED THEN INSERT
(COLUMN1,COLUMN 2,COLUMN3, ETC...)
VALUES (S.SOURCETABLEN AME,S.CHANGE_NU MBER)
It works great without the...
No activity results to display
Show More
Leave a comment: