因此,我把有关服务器的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