Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Head-breaking query
Message
 
 
To
21/09/2016 10:37:46
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01641137
Message ID:
01641188
Views:
37
>>>>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.
>>>
>>>I wondered that, if the table structure is used as a flat staging table for the report...
>>
>>Could be. Let's wait for Bill's responses.
>
>Yes, the structure of this table goes back to foxbase days.
>There was no tinyint there.
>The structure has changed occasionally over the years (multiple decades now).
>It's a key table, used all day, every day, but it's read tens of thousands of times more than it's written.
>We also now have a read-only mysql version- synched from the SQL version- of it going with a PHP web site.
>
>I didn't see Naomi's latest version of the query but it sounds as if it might be the answer.
>I'll try it.
>
>There are no nulls in table

If there are no NULLs and the NULLs are not supposed to be in the table, I suggest to fix the structure. Create a new table with the correct structure, insert into it from the original table, rename the original, rename the new one.
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