Viewing 15 posts - 3,511 through 3,525 (of 13,874 total)
Hah, I knew it! Nice code, Drew – like you, I prefer the CTE version.
June 20, 2019 at 3:02 pm
June 20, 2019 at 2:13 pm
As you've been following the forum for a long time, you'll also know that it's considered good practice to provide sample DDL, data (in the form of INSERT statements) and...
June 20, 2019 at 1:10 pm
This is a technique which I have read about, but never implemented, therefore I don't feel qualified to direct you to specific links. I'm just waiting for the opportunity to...
June 20, 2019 at 1:39 am
Imagine the two sets of tables are named A and B.
It's early morning on a new day, and synonyms are currently pointing at set A, which includes the day before...
June 20, 2019 at 1:37 am
How about using Jeff's favourite method, SYNONYMs?
Have two versions of all 500 tables, which are truncated/loaded on alternate days. Use synonyms to switch between them every day. Your 'no data...
June 20, 2019 at 1:20 am
I just know that Drew is going to post a really snappy solution to this one ... that's what usually happens after I post my overblown version. But here goes...
June 19, 2019 at 10:18 pm
Please provide more sample data (as INSERTs) along with desired results for that data, which demonstrates what you are trying to say.
June 19, 2019 at 8:51 pm
Your code works , if you place the columns as you want to see result ( as example i provided) , but if i place all the columns in...
June 19, 2019 at 8:40 pm
If you are OK with locking/blocking while the transaction completes, I suggest you look into the possibility of using
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
June 19, 2019 at 6:51 pm
As long as there are always exactly two statuses, this should work:
DROP TABLE IF EXISTS #LoanStatus;
CREATE TABLE #LoanStatus
(
LOANNUMBER INT
,CLOSED VARCHAR(200)
...
June 19, 2019 at 6:46 pm
Nor have I been able to find a tally table solution to fixing my car's engine trouble. They're useful, but not universally so.
Can you post some sample DDL, INSERT statements...
June 19, 2019 at 6:31 pm
Please provide sample DDL and INSERT statements for the above structure and you'll have a working solution very quickly.
June 19, 2019 at 6:27 pm
I'd suggest that your 'real table' contains a row with a missing semicolon.
Or is this just a blog post?
June 19, 2019 at 3:35 pm
Here's another way which is slightly more robust (because IsNumeric() can return unexpected results).
SELECT d.name
FROM sys.databases d
WHERE d.database_id > 4
AND PATINDEX('%[0-9][0-9]',...
June 19, 2019 at 2:20 pm
Viewing 15 posts - 3,511 through 3,525 (of 13,874 total)