Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. Can anyone point out how to check if a select query returns non empty result set? For example I have next query: SELECT * FROM service s WHERE s.service_id = ?; Should I do something like next: ISNULL(SELECT * FROM service s WHERE s.service_id = ?) to test if result set is not empty?

  2. 21 cze 2015 · In the ELSE clause of the CASE ( equivalent to default: ) I want to select and return an empty result set, thus avoiding to throw an SQL error by not handling the ELSE case, and instead return an empty result set as if a regular query would have returned no rows.

  3. 6 cze 2024 · Let’s write the SQL query to filter the rows with empty strings or null values in the code column: SELECT id, name FROM Department WHERE code IS NULL OR code = ''; Here, we used the OR condition within the WHERE clause to combine two conditions.

  4. Using the ISNULL() function we could write the following query which will update any row in the Product table that has a NULL value in the Color column to an empty string. UPDATE [Production].[Product] SET Color = ISNULL(Color,'');

  5. Consider the following code in Microsoft SQL Server 2012: INSERT INTO [dbo].ProductionSELECT [field1] ,[field2] ,cast([datefield] as datetime)FROM [RAW].Staging. The staging table is loaded with data from a CSV file.

  6. 13 mar 2023 · The following query is an example that returns all rows with a hire date older than 2013, and the email column IS NOT NULL: SELECT * FROM MyEmployeeTable WHERE email IS NOT NULL AND hireDate < '2013';

  7. 19 maj 2021 · Due to this structure of the NULL values, it is not possible to use traditional comparison (=, <, > and <>) operators in the queries. As a matter of fact, in the SQL Standards using the WHERE clause as the below will lead to return empty result sets.

  1. Ludzie szukają również