Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Head-breaking query
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01641137
Message ID:
01641167
Views:
42
>>What is the query you tried? By the way, decimal (1,0) has no sense. You should have used tinyint instead. Also, why all columns are nullable? What is the primary key for the table? Can you have NULL in StoreCode and in DayNumber columns?
>>
>
>I understand your point in general, but the "decimal(1,0) has no sense" isn't entirely accurate. Assuming that was being used for the numeric day of week (1-7) , it "will" work, though I admit that's the first time I think I've ever seen that.
>
>Yes, a tinyint (and a constraint of values 1-7) is definitely preferable, but I wouldn't say "decimal (1,0) has no sense".
>
>(Well, to make a bad pun, it's true that decimal(1,) has no "cents" ) :)

That table structure looks to me as it was most likely converted from original VFP table and never changed for SQL Server. All nullable columns and decimal(1,0) columns tell that.

If there is a chance, I suggest to re-think the database model for the application. If that table is only used for initial loading of the data from another source, then it's fine. If that table is used for daily transactions, then it may be a good idea to at least fix its structure.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform