Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试根据数据的存在有条件地运行两个查询中的任何一个。这是我要运行的。如何解析表以确定我的客户是否包含地址,如果包含则运行 Query1,如果不包含则运行 Query2?
例子:
If (Transaction_Table.Customer_Ship_To = NULL) then -- run Query1 with select else -- run Query2 with select end
也许:
if((select count(*) from Transaction_Table where isnull(Customer_Ship_To))>0) then query1 else query2 end if;