Viewing 15 posts - 1 through 15 (of 54 total)
Imagine if somebody passes this parameter:
SET @Where = '1=1; DELETE TAble1, DELETE TAblee2...'
I assume the parameter comes from a front end app. SELECT part will execute, but...
November 12, 2024 at 7:29 pm
There are other ways of importing text files. You can try MS Access and import CSV into a new table, then examine the data. It is much simpler than directly...
November 12, 2024 at 7:15 pm
The first subquery likely returns more than one row, and it should return one row only. Check it.
insert into NewKms8081..members
SELECT
(select...
November 12, 2024 at 6:59 pm
I do not check SQL central every day, so I missed the article when it first appeared. I am in my 7th decade too, and potential dinosaur. Somehow, most of...
November 12, 2024 at 6:52 pm
If constraints are added, as many as possible, the data will be safer then without constraints. If there is error handling, either in external code or in SQL procedures, error...
November 4, 2024 at 6:45 pm
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
Viewing 15 posts - 1 through 15 (of 54 total)