Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
pithhelmet
Posting Yak Master
183 Posts |
Posted - 2005-05-16 : 16:04:58
|
| Hi Everyone -We are creating a audit field in one of the tables,the audit message can be over 8000 bytes in length...What field type should be used??thankstony(SQL 2k) |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-05-16 : 16:19:17
|
| text?BUT! I don't like the sound of what you're doing.Can you explain it in more detail?Brett8-) |
 |
|
|
pithhelmet
Posting Yak Master
183 Posts |
Posted - 2005-05-16 : 19:01:57
|
| Hi Brett and everyone -We are receiving a data stream from serial devices, and the requirements statethat the entire communication stream shall be saved in HEX with a decimal seperating the HEX values....SOOOOOOtake a 3k communication audit, 2x the char (to get the hex representation) and add a decimal (.) between each character....thus 3000 X 3 = 9000 audit the audits are getting larger as the users are getting better with the handheld devices,so i can only envision larger audits in the future. |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-05-17 : 16:03:16
|
| It's ususally a bad idea to confuse storage with presentation.The best imo would be to store the data in it's native format,and do the hex splitting when retrieving it.(might be a good job for an udf in this case).Alternatively if You really want to avoid TEXT datatype You can use multiple rows for each comstream.streamID,line int, data varchar(8000).rockmoose |
 |
|
|
pithhelmet
Posting Yak Master
183 Posts |
Posted - 2005-05-18 : 10:20:04
|
| Hi Everyone -I don't write the specs - i just try to implement them...the analysts and support people didn't want anotherprogram to load and run on the customers machines -that is why the decimal seperattion in the database field...i know i know - i just work here, and give them what they want,even if it will cost more in the end, they want it this way,and this way only...rant overgaspthankstony |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-05-18 : 13:35:14
|
| Give them a view.This will provide a layer of abstraction between the database and the loading program.You can implement the actual storage as You see fit in the database, as long as the viewreturns the text in the correct format.Oh well, use text.rockmoose |
 |
|
|
pithhelmet
Posting Yak Master
183 Posts |
Posted - 2005-05-18 : 17:29:23
|
| Hello Everyone -Thanks for the replies - text it is...thanks again!!take caretony |
 |
|
|
|
|
|
|
|