Tag Info

New answers tagged


I suspect that the date values are the issue. Formatting datetime values in excel does not remove the time portion, only hides it. One query is truncating the time the other isn't. If you are using BETWEEN for the date ranges, add 1 day to the end date and try this: and Timestamp >= @StartDate and Timestamp < @EndDate


(Please forgive the SQL Server test case - the problem is common to all SQL implementations because that of common semantics mandated by the SQL Standard.) Even though you have used a LEFT OUTER JOIN, the semantics of SQL can convert this to an implied INNER JOIN if you improperly put constant-test conditions in a WHERE clause instead of the JOIN clause. ...


Try This. WHERE ((@Param = 1 AND Email IS NOT NULL) OR (@Param = 0 AND Email IS NULL) OR (@Param IS NULL) )


Try putting the host information as the first item in your connection string mysql -hremoteIP -umyuser -p db

Top 50 recent answers are included