/*tested in oracle*/
/* you can use select statment in then clause*/
SELECT CASE bh.zajlx
WHEN '2'
THEN (SELECT qt1.sfdb
FROM t03_qtajxx qt1
WHERE qt1.ajbh = bh.ajbh)
WHEN '1'
THEN (SELECT cta1.sfdb
FROM t03_ctais_ajxx cta1
WHERE cta1.ajbh = bh.ajbh)
WHEN '3'
THEN (SELECT cta1.sfdb
FROM t03_ctais_ajxx cta1
WHERE cta1.ajbh = bh.ajbh)
ELSE 'X'
END
FROM t03_ajbh bh
WHERE bh.ajbh = '00200700003'
/*you can use in keyword in when clause*/
select t6.nsrdzdah, t6.ajszjg_j_dm, t6.jczt_dm,
case
when t6.jczt_dm in (01,02,10, 20,21,22,30, 40,41,42,43,44,45,50, 60,70)
then 'Y'
else 'N'
end aa
from JC_AJXX t6 order by t6.nsrdzdah
分享到:
相关推荐
The IAM allows SQL Server to do efficient prefetching of the table’s extents, but every row still must be examined. General Index Structure All SQL Server Indexes Are Organized As B-Trees ...
The following definitions will help you understand how SQL Server interacts with the operating system when allocating and using memory. Virtual Address Space A set of memory addresses that are mapped...
type and standalone code formatters support new formatting options allowing simultaneous use of different cases for keywords and for system functions, for example uppercasing keywords and using mixed ...
The book "Virtualizing SQL Server with VMware" provides an in-depth exploration of best practices and techniques for virtualizing SQL Server using VMware solutions. Here, we delve into key knowledge ...
The syntax of the file is extremely simple. Whitespace and lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored,...
PRACTICAL, EXAMPLE-RICH COVERAGE OF: * Classes, Objects, Encapsulation, Inheritance, Polymorphism, Interfaces, Nested Classes * Integrated OOP Case Studies: Time, GradeBook, Employee * Industrial-...
* When using RefreshRecord on a Memo or Blobfield and the field has been modified by another user, the blobsize of that field does not change if it is less than before (Quality Central 4676).* ...
Theoretically a b+tree is O(N log k N) or log base k of N, now for the typical values of k which are above 200 for example the b+tree should outperform any binary tree because it will use less ...
Along the way you’ll enjoy the Deitels’ classic treatment of object-oriented programming and the OOD/UML® ATM case study, including a complete C# implementation. When you’re finished, you’ll be ...
Along the way you’ll enjoy the Deitels’ classic treatment of object-oriented programming and the OOD/UML® ATM case study, including a complete C# implementation. When you’re finished, you’ll be ...
根据提供的文件信息,我们可以归纳出一系列重要的SQL语句及其用途,这些内容对于学习数据库管理和查询非常重要。接下来将详细解释每一个提到的关键SQL语句,并提供简要示例。 ### SQL语句大全 #### 1. SELECT ...
Its then backed up just in case, compressed and then the original is deleted before the new compacted version is moved back in place of the original.<END><br>37,dbinfo.zip We've written this mainly...
1.5 The History of SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.6 From Monolithic via Client/Server to the Internet . . . . . . . . . . 18 1.7 Standardization of SQL . ...
- 示例:`UPDATE employee SET e_wage = CASE WHEN job_level = '1' THEN e_wage * 1.08 WHEN job_level = '2' THEN e_wage * 1.07 WHEN job_level = '3' THEN e_wage * 1.06 ELSE e_wage * 1.05 END;` 3. **WHILE ...
# In that case, the smallest possible network will be used # as the "best match" for the client. # Clients can also be defined dynamically at runtime, based # on any criteria. e.g. SQL lookups, ...