473,473 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CASE Stmt

1 New Member
Hi All,
Im new to DB2. I need to to write a query using CASE stmt
the Scenario is like this
when
DAYNAME = 'sunday' select * from table where LASTUPDATE = current date-1
else select * from table where = current date-3
Feb 8 '07 #1
0 1324

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hareesh | last post by:
Hi, -- SQL Stmt 1 SELECT * FROM Table1 WHERE Field1 = 123 AND Field2 = 234 AND Field3 = 345 AND Field4 = 456 AND Field5 = 567 AND Field6 = 678
10
by: clueless_google | last post by:
hello. i've been beating my head against a wall over this for too long. setting the variables 'z' or 'y' to differing numbers, the following 'if/else' code snippet works fine; however, the ...
2
by: claus.hirth | last post by:
I wrote a stored procedure that uses a prepared INSERT INTO statement in order to play with the PREPARE and EXECUTE keywords. In transcript 1 below the call to that stored procedure does not...
1
by: Uzytkownik | last post by:
I've some function: function show($id) { $title = $text = $date = $nick = NULL; $stmt = $this->base->stmt_init(); $stmt->prepare("SELECT title,text,datetime,nick FROM posts LEFT JOIN authors ON...
1
by: Kingsly | last post by:
How to read "stmt" column of "sysibm.syspackstmt" table in a readable format? select stmt from sysibm.syspackstmt where name like 'MYPROC1'; I was expecting the stored procedure statements as...
2
by: siddu | last post by:
select country, IsNull(A,0) as A, IsNull(B,0) as B, ---- Here I need to add case stmt. I have data B in Db if it is B then I have to show C else I have to C from <Table-name> Please...
56
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under...
2
by: pankaj17 | last post by:
hello everyone, MYSQL query ............ how to set prepare stmt result in variable i have written prepare stmt in store procedure and i want to set result of prepare stmt in variable ...
0
by: pankaj17 | last post by:
hello everyone, MYSQL query ............ how to set prepare stmt result in variable i have written prepare stmt in store procedure and i want to set result of prepare stmt in variable ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.