English 中文(简体)
将案件陈述纳入[封闭]声明
原标题:Combining a case statement within a select statement [closed]

这个问题是由无法再复制的打字或问题引起的。 虽然类似的问题可能包括,但以不大可能帮助未来的读者的方式解决了这一问题。

Closed 3 hours ago.

因此,我把有关服务器的2个表格的数据合并起来,并试图在有人居住的一行上立案。 在Else End As和n Casting之后,我刚刚通过案件审判。 Incorrect syntax差错。 我还在我的问候中搜寻,发现一些东西。 提前感谢!

Sample data: Table dbo.Customers: |CustomerID| FirstName | |:---------|------------:| |0001 | John |

Table dbo.Orders: |ID| OrderAmount| |:---------|-----------:| |0001 |Billions|

学历:

SELECT 
dbo.Customers.CustomerID  AS Cust_ID,
dbo.Customers.FirstName AS Cust_FirstName,
dbo.Orders.ID AS CustNum,
dbo.Orders.OrderAmount AS Orders_OrderAmount,

HighSpender = CASE WHEN OrderAmount LIKE %BILLION% THEN  Baller  ELSE OrderAmount END AS HighSpender

FROM dbo.Customers with(nolock)
LEFT JOIN dbo.Orders ON dbo.Customers.CustomerID = dbo.Orders.ID
WHERE Date =  2/27/2024 
问题回答

驱逐

HighSpender = 

页: 1





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签