Viewing 15 posts - 1 through 15 (of 49 total)
Need to cleanse data comes from acceptance of dirty data to begin with. It happens and there is apparently nothing we can do about it.
There are two cases of data...
March 18, 2024 at 2:59 pm
Collation for #Temp table is the same as default collation for the server. Table definition
CREATE TABLE #NearTermData(
[UNDERLYING_SYMBOL] [nvarchar](10) NOT NULL,
[QUOTE_DATE] [date] NOT NULL,
[EXPIRATION] [date] NOT NULL,
[ROOT_SYMBOL] [nvarchar](10)...
March 15, 2024 at 8:39 pm
So far, AI seems to be capable of complex procedural tasks. It is like solving equations manually versus using MATLAB. Now everybody can solve linear equations, by means of MATLAB...
March 15, 2024 at 5:55 pm
Or maybe create and keep a table, Calendar, that contains a record for each date in given interval. If your calendar table contains all dates from say, 1950-01-01 to 2150-12-31...
February 16, 2024 at 10:18 pm
I apologize for the delay, was out of town for a few days.
Thank you for refreshing the script and the explanation.
I noticed that when listed in proper order, a picture...
December 4, 2023 at 5:41 pm
Is there a primary key on Inventory table? It would help understanding what is going on.
November 29, 2023 at 4:16 pm
My solution is similar to what Eric M. as Russell proposed, except for me not using identity. The version of CheckColumn would be
CheckColumn int UNIQUE CHECK (CheckColumn IN (1,2,3)) NOT...
November 29, 2023 at 3:53 pm
There are other ways for enforcing cardinality of 1. here is one of them:
CREATE TABLE SingleRowTable
(
DataColumn varchar or whatever
, CheckColumn int UNIQUE CHECK (CheckColumn=1)
)
CheckColum can store 1...
November 29, 2023 at 3:46 pm
I agree with Jeff 100%. Performance is paramount, assuming the foundation is sound. Bot fast and safe at the same time is an ultimate goal, but at the same time...
July 14, 2023 at 8:09 pm
I must commend the author for this one
"In some situations, there is no column guaranteed to be unique for each entry, and developers might be tempted to rely on surrogate...
July 14, 2023 at 3:02 pm
How about avoiding UPDATE altogether, this query seemed fast enough to me:
WITH Last_Columns AS
(
SELECT object_id, MAX(column_id) AS LastCol
FROM #columns
GROUP BY object_id
)
SELECT T.Object_ID, C.LastCol
FROM #tbl AS T
JOIN Last_Columns...
July 14, 2023 at 1:56 pm
Grant is very right. When you want to apply LEFT OUTER JOIN to a subset of outer table, do not place condition in WHERE clause. Place it in ON clause.
Itzik...
September 20, 2022 at 3:15 pm
"
The primary problem is management. They tolerate mediocre performance and they set the standards.
As long as we rely on Full-Stack-Developers, SQL will go the way of the dodo. Sure, like...
September 7, 2022 at 3:43 pm
<quote>UPDATE dbo.table_name SET column = ABS(column - 1)<quote>
Nice touch! I have not seen this trick in a long time. Congrats and thank you 🙂
August 16, 2022 at 7:37 pm
ZZartin: "This is only partially true, database constraints can prevent bad data from getting into the data base. They do not however free developers from having to both know/understand those...
August 15, 2022 at 8:16 pm
Viewing 15 posts - 1 through 15 (of 49 total)