Viewing 15 posts - 61 through 75 (of 911 total)
IDENTITY is not a field in SQL; it is a table property. A field is part of a column that has some meaning, like year, month & day in a...
September 22, 2022 at 9:35 pm
I disagree. DATE, TIME and DATATIME2 match to the ANSI/ISO Standards. I do not have to play with PDP/11 clock ticks to fake a date, the temporal math is up...
September 21, 2022 at 8:37 pm
I think you need to start over. Google why we never use MONEY. Normalize this mess. neither table has a key at all. A calendar has an obvious key --...
September 21, 2022 at 7:43 pm
Follow Brent O's rule; " Store data how it is used (NOT displayed) and use it how it is stored!'
September 21, 2022 at 6:09 pm
NO! the old Sybase MONEY datatypes have ugly rounding problems; google it! https://www.red-gate.com/hub/product-learning/sql-prompt/avoid-use-money-smallmoney-datatypes
September 21, 2022 at 3:46 pm
We have DATE data types, souse them and not the old Sybase datetime from UNIX. Does the status have to be contained in the temporal interval, or can it overlap?
September 21, 2022 at 3:34 pm
Please learn what a table is. First, we need to fix your non-table.
CREATE TABLE Expenses
(emp_id CHAR(10) NOT NULL,
pay_date DATE NOT NULL, -- read ISO-8601 formats
expense_type VARCHAR(30) NOT NULL
CHECK(expense_type IN ('Over_time',...
September 10, 2022 at 6:15 pm
Since these tables are constant, you can pack them very tightly and not worry about a fill factor. Just declare a primary key and keep things simple.
:
CREATE TABLE Lookup
(lookup_code CHAR(3)...
June 16, 2022 at 7:59 pm
Why did you post any DDL? I know this is not SQL Server, but you could've at least tried to help us a bit. If you have models or hierarchies...
May 6, 2022 at 8:06 pm
If you Google around, you can find tools for generating such data. In particular, there is a standard for street addresses in the United States called "nine – one –...
February 25, 2022 at 4:31 am
International classification of diseases amended – version 9
This is the standard encoding used in medicine. However, I think they might be on version 11 by now. Some of the newer...
February 21, 2022 at 1:13 pm
>> I am trying to return all values from the lookup table to columns on the same row for the Diagnosis code. <<
Please read any book, and I do mean...
February 16, 2022 at 11:11 pm
>> I've built this cursor to build a new diag_code from all the values in the cursor. <<
I've been doing SQL for over 30 years and spent some time on...
February 16, 2022 at 11:03 pm
This is a tricky question that depends on the product. In the case of SQL Server, the IN() is a shorthand for OR-ed predicates. We added it to the SQL...
February 7, 2022 at 3:34 pm
Yes, and the history table should be a single table with columns that indicate the start and end times of a state of being of the data element being modeled. It...
February 3, 2022 at 4:44 pm
Viewing 15 posts - 61 through 75 (of 911 total)