Viewing 15 posts - 2,236 through 2,250 (of 7,608 total)
Again, as I stated, it took only 1 more byte to store YYYY vs YY. Dates were stored as numeric and not char, also to save space. YYMMDD took 4...
October 14, 2020 at 5:50 pm
Regarding the fact_OHADiagnosis table:
1) should likely be clustered / partitioned by ( OHADiag_id, OHADiagnosisOrder ). You can have a table that can quickly translate FileYear to beginning and ending OHADiag_id....
October 14, 2020 at 5:38 pm
If you want better performance, I think we do need actual table definitions, esp. including the indexes. It appears the diagnosis id is what's critical. You should likely be partitioning...
October 14, 2020 at 5:26 pm
It also increases the number of characters to be transmitted by a whopping 25% compared with "YYYYMMDD" and it was specified and designed in an age where...
October 14, 2020 at 4:38 pm
The good-ole standard tally table should handle this nicely. I default to end of calendar year for end date; naturally change that if/as you need to.
DECLARE @end_date...
October 14, 2020 at 3:09 pm
Assuming you consider only whole months, truncating any remaining days, then:
declare @age varchar(6)
declare @dob datetime
set @dob = '2015-07-31 00:00:00.000'
select @age = cast(months_old / 12 as varchar(3)) +...
October 14, 2020 at 9:02 am
It also increases the number of characters to be transmitted by a whopping 25% compared with "YYYYMMDD" and it was specified and designed in an age where 110-300 baud...
October 14, 2020 at 8:46 am
GUIDs are horrendous for clustered indexes. They fragment like crazy. And a guid is always a single key lookup, not a range (at least in my experience), thus a non-clus...
October 11, 2020 at 10:07 pm
CREATE TABLE Employee_Leave
also state that your CHECK for the start date being less than or equal to the end data will fail if the end date is not...
October 11, 2020 at 10:00 pm
I believe all you need to do is specify the proper PARTITION BY clause in the code (new code is below). The code originally comes from Itzik Ben-Gan (I believe),...
October 11, 2020 at 7:13 am
Recompile forces SQL to recreate the query plan, even if one is already available in memory.
That process may require updating stats if one of the tables in the query has...
October 11, 2020 at 1:08 am
... The other thing is, all the other tables have clustered indexes on the GUID PKs ...
That alone might have made me skip buying the product!
Fillfactor also depends on...
October 11, 2020 at 1:04 am
CREATE UNIQUE INDEX UK_IDX_TLOG ON TLOG_TB ( TXN_AUTH_ID ) WHERE MSG_TYPE = '200';
October 9, 2020 at 7:27 am
It can not use the run length as a parameter, because the window specification requires a literal value.
But for every given run length a solution exists using only six...
October 8, 2020 at 2:44 am
>> I want to find runs of at least three 1s, and return the result below. The 0s would be any test_values that are not 1. <<
Since SQL does...
October 2, 2020 at 7:22 pm
Viewing 15 posts - 2,236 through 2,250 (of 7,608 total)