Viewing 15 posts - 1 through 15 (of 7,597 total)
IF UPDATE(CreditLimit)
That approach seems preferable to me, unless you really have to use COLUMNS_UPDATED()
August 13, 2025 at 2:07 pm
If the quirky UPDATE works, can you modify the original table to include the new calculated column?
Let me ask: once a value has been calc'd, would it ever change? In...
May 12, 2025 at 6:12 pm
Please provide data in usable format: CREATE TABLE and INSERT statment(s). That is way more useful to us than a "picture" of data.
May 9, 2025 at 6:35 pm
Would need to see row counts to better understand the query.
How is the Departments table clustered? In general, again without knowing any details at this point, DepartmentID first followed by...
April 30, 2025 at 6:09 pm
If the condition is on a LEF T JOIN, moving it to the WHERE will effectively convert the LEFT JOIN to an INNER JOIN.
April 30, 2025 at 2:18 pm
I use a table. (Longtime DBA, so that comes naturally to me.)
Basically, you need a table for the passwords, anyway, right? Of course the table's encrypted and in a restricted...
April 24, 2025 at 9:45 pm
SQL Server can maintain statistics that "tell" it how many rows are in given ranges of key data (histogram data). For hard-coded, SQL can of course then pick a plan...
April 20, 2025 at 3:09 pm
My function by default returns all matches, but you have options to prioritize fewer rows matching or more rows matching.
April 15, 2025 at 2:18 pm
I have a function that does that. It could also return 400 and (either) 600. You'd have to specify how to pick one over the other.
April 14, 2025 at 9:39 pm
Make sure statistics for all large tables are updated.
Review query plans to check for potential performance issues.
April 14, 2025 at 2:50 pm
A quirky update seems to work, although that requires adding a Calculation column to the original table and making sure the original table is clustered by PricingDate, viz:
CREATE TABLE #Test...
April 9, 2025 at 6:23 pm
I think you might have to read the table again to do what you need to do. Probably best to just do an INNER JOIN, though:
select t2.ID, t2.LINEX, t1.*
from #tmp1...
April 8, 2025 at 2:58 pm
Create a temporary table to load into, with len of 5+, and see if any rows with data longer than 3 bytes are actually getting loaded.
March 27, 2025 at 9:13 pm
Because you used a numeric data type (1) rather than a string. Do this instead:
...
)
SELECT
country_code,order_phone,
case
when country_code IN ('US','CA') and len(order_phone) = 10 then '1' --<<--
when...
March 20, 2025 at 8:00 pm
Add that user to the "model" db -- with whatever permissions you want -- and they will automatically be added to every new db.
March 20, 2025 at 1:50 pm
Viewing 15 posts - 1 through 15 (of 7,597 total)