Viewing 15 posts - 3,421 through 3,435 (of 7,614 total)
To the OP:
I'd suggest not over-complicating what you have unless/until it's actually needed. Why spends hours doing something that may never be applicable or useful? If the conditions change,...
May 3, 2018 at 11:23 am
This should be enough to UPDATE the udf table:
UPDATE udf
SET Value = CASE udf.fieldno WHEN 1 THEN udf1 WHEN 2 THEN udf2 WHEN 3...
May 3, 2018 at 11:19 am
As noted, use NOT EXISTS. Also, uniquely cluster the NoEmail table on the EmailAddress.
...
CREATE TABLE #tblNoEmail
(
EmailAddress varchar(100) PRIMARY KEY CLUSTERED
)
...
SELECT...
May 2, 2018 at 2:55 pm
2) The question should be. When needing the result from one query multiple times in a procedure/UDF/trigger, is it best to store it in a variable or run that...
May 1, 2018 at 1:52 pm
Local variables tend to slow down scalar functions, so avoid them if possible. In this case, they also make the logic much more complicated than it needs to be. ...
May 1, 2018 at 9:51 am
Don't have a lot of time, but this should be real close at least:
SELECT *,
CASE WHEN EndDayNumber >= StartDayNumber THEN EndDayNumber - StartDayNumber
ELSE...
May 1, 2018 at 9:19 am
and will make it harder in the recovering process.
I don't understand why you'd say that. The main reason I could see for continuing to do backups of...
May 1, 2018 at 9:10 am
April 30, 2018 at 11:56 am
April 30, 2018 at 11:38 am
As noted, the datetime is stored in a numeric format.
It's likely that whatever interface is displaying the date to you is putting it in this format:
Apr 19...
April 30, 2018 at 10:48 am
SELECT *,
CASE WHEN string2 LIKE '%[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%'
THEN SUBSTRING(string2, PATINDEX('%[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%', string2), 10)
ELSE NULL END AS...
April 27, 2018 at 10:31 am
Don't use functions on any column unless you have absolutely no choice. In other words, keep the condition sargable if at all possible
--If you...
April 27, 2018 at 9:34 am
You could make the restriction 100% or less. The main thing is not overfill it, right? That would allow changes, you would just have to remove/reduce something before adding something...
April 26, 2018 at 11:10 am
April 26, 2018 at 8:20 am
SELECT *
FROM PeopleDetail PD
WHERE PD.Name IN (
SELECT Name
FROM People
)
April 25, 2018 at 11:11 am
Viewing 15 posts - 3,421 through 3,435 (of 7,614 total)