仅当两列均为零时才过滤零值

时间:2019-06-25 06:12:41

标签: sql excel

我需要该表排除rw.amount <> 0和rw.paid_subs <> 0的行,但仍包括任何在任一列中都具有值的行。

我对SQL表一无所知,因此我一直在盲目猜测如何编写此代码。

AND rw.amount <> 0 
AND rw.paid_subs <> 0

1 个答案:

答案 0 :(得分:2)

您的逻辑是正确的,但是使用德摩根定律,我们可以将排除逻辑重写为:

Class Utilities {

static let run = Utilities()


    func showNotificationServicesIsDisabledPopup(viewController: UIViewController, handler: @escaping (Bool) -> ()){

        //present popup to allow for push notifications...

    }


    func registerForRemoteNotification() {

        if #available(iOS 10.0, *) {

            UNUserNotificationCenter.current().requestAuthorization(options: [.sound, .alert, .badge]) { (granted, error) in

                if error == nil{
                    DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() } //
                    //UIApplication.shared.registerForRemoteNotifications()

                }//end if

            }//end requestAuthorization

        } else {

            UIApplication.shared.registerUserNotificationSettings(UIUserNotificationSettings(types: [.sound, .alert, .badge], categories: nil))
            UIApplication.shared.registerForRemoteNotifications()

            //Declaring AppDelegate as the delegate
            let appDelegate = UIApplication.shared.delegate as! AppDelegate

            UNUserNotificationCenter.current().delegate = appDelegate
            Messaging.messaging().delegate = appDelegate

        }//end else


    }

}