Hi Kkecia,
I assume that your question means you after the max date and sequence for a date within a date range.
If you use the default effdt/effseq sub queries, then the query will not work for you as that only allows for a single date for the max. You need to create your own sub queries in...
Hi egstatus,
You are doing nothing wrong - you have the core of the sql correct. There is probably a far more elegant way to do this, but you could try something like this (totally untested)
SELECT X.CORR_EMPRESA
, X.NOMBRE_EMPRESA
, MAX(X.ENE) AS ENE
, MAX(X.FEB) AS FEB
, MAX(X.MAR) AS MAR
...
Just an update -
Change your datatype to a DT_STR length 10
ISNULL(BLOOM_ISSUE_DT) ? "1900-01-01" : (DT_STR,10,1250)(BLOOM_ISSUE_DT)
This will set null dates to your 1900 date, the string convert looks at first 10 characters and uses the ANSI code page 1250 for character set decode - but...
Hi,
The issue is that you are trying to trim and change case on a date time field. You need to cast/convert the date time to a char field before you can change the format. I am not sure what you were trying to achieve with making a date in uppercase?
If you are looking at trimming the...
What is the field length of the destination column? Sounds like you have exceed that limit with the concatenated values in your derived column. You will need whatever length the BLOOM_COUNTRY column was + the appended length of BLOOMBERG.
To see the error, set the redirect on for truncation...
Hi, Assume this one is also using the derived column stage. There is a pick list of the expressions when you build the derived column which should serve as a start point - but they are sometimes a little confusing.
Your example does not provide an opt out clause where RTG_SP and RTG_MOODY do...
Without seeing your data types, the derived expression will be something like:
ISS_COUNTRY =="" ? "BLOOMBERG" + BLOOM_COUNTRY : ISS_COUNTRY
Just depends on your database and how you handle blank or nulls against the ISS_COUNTRY column
May need to be ISNULL( ISS_COUNTRY) ? "BLOOMBERG" +...
Thanks for the feedback so far. Looks like it is a BIOS issue. Seems to be trying to default to a vga driver on start. Only problem is that I can rarely get it to start consistently to get in and change it. Also without ever achieving 2 successful boots in a row, I am not keen to try flashing...
Hi,
Any help would be appreciated. I have a netbook (Toshiba NB305 Windows 7). It stopped booting a few weeks back. On startup, machine powers, HDD starts reading then nothing - however fan still runs, keys light up etc. I tried the usual restarts, battery out, reset RAM etc. No avail. On...
I think your question may be too broad. Data bandwidth is more than likely related to network traffic rather than anything on the database.
You can probably provide some data based on the client statistics based on some of the sql being passed. You will need to identify some common or long...
Hi,
In your not exists subquery, you should not be slecting any columns. Remove the selected field (B.EMPLID ) and instead create a join criteria on the B.EMPLID = A.EMPLID in the subquery.
That should work.
Hi Nancy,
One of the joys of PSQuery. Outer joins do not work well when you need max effdt/effseq subqueries on the outer join table.
Probably the simplest way to do this is leave the current query in place (or convert it to an inner join) and add a union and return the rows from the...
You could go 'slightly' easier with:
SELECT CURRENT DATE - 1 MONTH - DAY(CURRENT DATE)DAYS + 12 DAYS
FROM SYSIBM.SYSDUMMY1
Which at least keeps everything as a date through the calculation.... but gets you the same result.
Hi commish252,
Do you need to use JOB? Are you running the employees refresh process - if so PS_EMPLOYEES will have the current snapshot for all active employees removing the need for the effective date logic.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.