Viewing 15 posts - 2,041 through 2,055 (of 7,614 total)
In SQL Server, there is a way to assign a usable column alias, using CROSS APPLY:
SELECT TOP (1000) ST100
FROM CONSUL AS CD
LEFT JOIN table2 AS [Sx] ON...
December 21, 2020 at 8:24 am
Double any existing single quotes in the data:
... + REPLACE(data, '''', '''''') /*make every ' in the data become '' */ + ...
December 19, 2020 at 3:17 am
I've never seen an UPDATE pattern that bizarre in over 30 years in IT. From 6 to 16,000,000? I can't even imagine the business case that would cause...
December 19, 2020 at 3:14 am
In SQL 2016, it's rarely a waste of disk space. Specifying ROW compression is standard procedure for all tables unless there's a specific reason not to.
"Standard Procedure...
December 18, 2020 at 10:01 pm
I still prefer my single int as a metakey method. 16 bytes is a lot of overhead for a linking key. I don't see an advantage to it. ...
December 18, 2020 at 9:57 pm
I still prefer my single int as a metakey method. 16 bytes is a lot of overhead for a linking key. I don't see an advantage to it. And the...
December 18, 2020 at 5:14 pm
And what if one or more of the column values change?
Like I said in the comments in the code...
-- You...
December 18, 2020 at 5:09 am
And what if one or more of the column values change?
December 17, 2020 at 7:16 pm
Only someone with full sysadmin authority can change a job's owner.
Typically after the job is fully debugged and running normally, sysadmin changes the job owner to a standard job-running account.
If...
December 17, 2020 at 5:24 am
I added an RTRIM to get rid of any trailing space(s). Naturally if you don't want to do that, delete the RTRIM from the code.
SELECT
...
December 17, 2020 at 5:16 am
SELECT
string_to_parse,
CASE WHEN first_dash = 0 THEN ''
WHEN first_dash = last_dash...
December 15, 2020 at 10:46 pm
This looks to me like a Gaps and Islands query. Itzik Ben-Gan has posted numerous articles and written in books how best to solve those types of queries.
December 15, 2020 at 7:38 pm
You have some values that have leading zeros. Must the leading zeros be preserved? If so, then not all of the columns are actually INTs as you...
December 15, 2020 at 3:48 pm
nvm, OP obviously not interested at all in this approach.
December 14, 2020 at 11:52 pm
I was too enthousiastic. What I did was I only took the 7 character long records (WHERE LEN(column1)=7) and then applied the LEFT functions as indicatde above. But,...
December 14, 2020 at 10:51 pm
Viewing 15 posts - 2,041 through 2,055 (of 7,614 total)