Viewing 15 posts - 1,846 through 1,860 (of 7,608 total)
I dislike IIF ... its "familiar" for people that use similar functions in Excel, but I think CASE is better in SQL
IIF only has two outcomes, true/false, and to...
February 28, 2021 at 3:38 am
Yeah, that code should do it.
But if you're using the column name "ClientNotes" directly in a SELECT you will get the original column value, not the one after the REPLACEs. ...
February 28, 2021 at 3:19 am
Most typically:
select name,count(*) as name_count
from dbo.table_name
where name like '%ra[jm]%' and P = 1
February 27, 2021 at 5:47 pm
IIF([var1Title] != '', [var1Title] + ISNULL(' - ' + [var1Topic], '') + ISNULL(' - ' + [var1Name], ''), '') AS Item1
February 26, 2021 at 4:28 pm
I'd avoid a guid if at all possible.
Make sure you have an index keyed first on c1, so that determining the max(c1) is a single, quick seek. An INSERT of...
February 26, 2021 at 4:25 pm
SELECT
phone_string,
phone,
--LEN(phone) AS phone_len,
CASE WHEN
CASE WHEN...
February 26, 2021 at 4:20 pm
I wouldn't make the Status a key column, since it's likely to change so often, at least in the earlier life stage of the row. The rows are small anyway,...
February 26, 2021 at 8:17 am
I do not consider "2359 to 2359" a valid case, as that might imply it may also span multiple days
Ordinarily, I'd agree but to consider the span of...
February 26, 2021 at 7:58 am
But does the Adjacency model actual satisfy BOM requirements?
February 26, 2021 at 7:51 am
Are you using SQL mail (sp_send_dbmail)? If so, you can use the mail status table in msdb to check on the status of any email. Look at the "sysmail_%" views.
February 25, 2021 at 6:11 pm
What sort of help do you want?
Hi all,
I have two SQL jobs. These jobs execute SSIS packages and then send files to e-mail.
I need to create one more...
February 25, 2021 at 6:09 pm
Get the Developer Edition, that would allow you to use more RAM and give you many other added capabilities as well.
February 25, 2021 at 3:37 pm
> Is it a better approach before running the job I can make the initial size bigger? <<
Yes, for sure. For one thing, it means you can make sure that...
February 24, 2021 at 9:08 pm
SQL Server Agent provides Alerts that can be configured to do that. However, they are per server and, indeed, per db for log file counters.
The default trace also contains entries...
February 24, 2021 at 9:05 pm
Removing NOLOCK / UNCOMMITTED could only slow down the code, it could never speed it up. Since OP is looking for a performance gain, removing NOLOCK is not the top...
February 24, 2021 at 8:49 pm
Viewing 15 posts - 1,846 through 1,860 (of 7,608 total)