Viewing 15 posts - 496 through 510 (of 6,036 total)
And still cannot beat datename(dw, 1) = 'Tuesday'
in terms of simplicity, reliability and performance.
🙂
September 7, 2018 at 5:26 am
SELECT
September 7, 2018 at 5:17 am
Zero date is Monday.
To get Tuesday we need to add 1 day to zero date:select datename(dw, dateadd(dd, 1, 0))
To get this week Tuesday we need...
September 6, 2018 at 8:02 am
As they say, read that manual.
When you convert data types that differ in decimal places, SQL Server will sometimes return a truncated result...
September 6, 2018 at 5:30 am
TIMESTAMP in DB2 is not a row version, it's actually a date-time.
What the trigger seems to be doing is preventing consequitive updates within 1second.
The implementation depends on how you want...
September 5, 2018 at 6:15 pm
It really does seem to be some efficiency mechanism in SQL to not use more than 5 bytes unless it's actually needed to store the specific value being saved
Not sure...
September 5, 2018 at 5:48 pm
The datatypes of the columns were stated as ints, datetimes, etc., which cannot be pushed to overflow pages, at least as I understand how SQL works
We know that for 200...
September 5, 2018 at 5:34 pm
I was talking about this:
https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms186981(v=sql.105)
A table can contain a maximum of 8,060 bytes per row. In SQL Server 2008, this restriction is relaxed for tables that contain varchar, nvarchar,...
September 5, 2018 at 5:22 pm
I'd simply generate a YYMMDD string for every day in the last 100 years from today, and match those strings to the ones in the table.
It's 36525 records, ~140k...
September 4, 2018 at 10:24 pm
Well, may be transactional support and data integrity control might be named advantages, but...
September 4, 2018 at 9:04 pm
You may wish to create a view emulating the fat table and reading data from properly (well, let's say better) normalised tables.
INSTEAD OF UPDATE trigger on that view can play...
September 4, 2018 at 4:46 pm
Like this?
DECLARE @sample TABLE (field XML)
INSERT @sample
VALUES('<ParameterValues><ParameterValue><Name>prmExpandState</Name><Value>Collapse</Value></ParameterValue><ParameterValue><Name>AKDunsNumber</Name><Value>146159</Value></ParameterValue></ParameterValues>')
SELECT c.value('Value[1]', 'int') AS AKDunsNumber, d.value('Value[1]', 'varchar(50)') AS prmExpandState
FROM @sample AS smpl
CROSS APPLY smpl.field.nodes('/ParameterValues/ParameterValue[Name="AKDunsNumber"]')...
September 4, 2018 at 7:54 am
September 4, 2018 at 6:16 am
September 4, 2018 at 6:07 am
I want to implement fact table to hold current and last 2 fiscal year data and...
September 3, 2018 at 6:23 am
Viewing 15 posts - 496 through 510 (of 6,036 total)