Hi there, can any one help me? I am new to DB2 sql, I will be using
the case statement to make comparisons in the select but I cannot get
it to work. The query below is an example of the comaprison I am tring
to do, it is not returning any rows. The column qactdat is a numeric
field which holds a date in the form yyyymmdd.
select integer(substr(qactdat,5,2)),
integer((substr(qactdat,5,2)+1-1))
from qwfldat
where integer(substr(qactdat,5,2)) = integer((substr(qactdat,
5,2)+1-1))
If I remove the where clause, rows are returned. I cannot work out why
the comaprison is not evaluating to true, as they should both return
the same number.
Hope somone can help, many thanks,
Toby 3 1851
I figured out that this is because the column qactdat has some values
of 0. This meant that the substr(qactdat,5,2) was not evaluating
proply. I do find it strange that this didn't cause an error though or
just evaluate as false and return the rows that do have values in the
field.
The column qactdat is a numeric
field which holds a date in the form yyyymmdd.
What data type did you specified for qactdat in CREATE TABLE qwfldat?
You must be using DB2 for iSeries.
Please ignore my previous post. Because, I don't know so much about
iSeries. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Brueck |
last post by:
Below is some information I collected from a *small* project in which I wrote
a Python version of a Java application. I share this info only as a data
point (rather than trying to say this data...
|
by: bettervssremoting |
last post by:
To view the full article, please visit
http://www.BetterVssRemoting.com
Better VSS Remote Access Tool
This article makes a detailed comparison among SourceAnyWhere,
SourceOffSite, VSS...
|
by: Thats Me |
last post by:
TMALSS: Task With maintenance of Access Database I did not develop,
don't ask about non-commented code problems or where data dictionary
is (LOL).
Have table with Inventory data for all...
|
by: mayamorning123 |
last post by:
A comparison among six VSS remote tools including SourceOffSite ,
SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET
To view the full article, please visit...
|
by: Chandu |
last post by:
Hi,
I am working on awk programming which is similar to C programming and
have got a doubt about time function returning a float value.
Ex: 01:01:30 should return 61.5 when i have tried my way i...
|
by: bettervssremoting |
last post by:
To view the full article, please visit
http://www.BetterVssRemoting.com
Better VSS Remote Access Tool
This article makes a detailed comparison among SourceAnyWhere,
SourceOffSite, VSS...
|
by: Tom Kelleher |
last post by:
Folks,
I have a client who will likely be looking at ASP.NET in the near
future. They have an internal developer who is convinced there are
"scalability problems" with ASP.NET. This client has...
|
by: elziko |
last post by:
Hi I have two date times that I belive to be equal. However, when I do a
comparison I find that date1 is less than date2...
Console.WriteLine(date1.ToString("dd/MM/yyyy HH:mm:fffffff") + " - " +...
|
by: eastern_strider |
last post by:
I'm running into problems about defining a comparison function for a
map which has a user defined key. For example:
class Key {
public:
string name;
int number;
Key (na, nu) : name (na),...
|
by: pbaldridge |
last post by:
I'm trying to code a simple function that will prompt a user if they want to see another set of problems. The error I receive is "ANSI C++ forbids comparison between pointer and integer"
int...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |