July 25, 2010 at 10:21 pm
which datatype is suitable for 'HSUB 9N380800 1010000.000000 USD' data in sql_server
July 25, 2010 at 10:50 pm
I feel VARCHAR would suite this.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
July 26, 2010 at 2:17 am
Is that a single attribute or 4 different values that need storing?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 26, 2010 at 9:31 am
Thanks fro response. What i have mentioned in above is single line.
thx
July 26, 2010 at 10:18 am
I can see it's a single line. What I'm asking is whether that should be a single column or multiple. It looks like there are multiple things in there. If so, they should be stored in separate columns, not stuffed into one.
Database design - first normal form - all attributes should be atomic (cannot be broken down)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 26, 2010 at 10:25 am
How are you going to name this column?
If it's Comments then varchar can be used.
If it's intended be "Details", then follow Gail advise and split it into separate columns, for example:
SomeCode CHAR(4),
AnotherCode CHAR(8),
Amount DECIMAL(19,6),
CurrencyCode CHAR(3)
July 26, 2010 at 10:28 am
Thanks for your response.
In my requirement table has some columns among one column name is
TRANSACTION_DESCRIPTION
HSUB 9N350820 1010000.000000 USD
HSUB 9N380800 1010000.000000 USD
HSUB 9N381500 1010000.000000 USD
HSUB 9N383290 1010000.000000 USD
Above are the values under the column TRANSACTION_DESCRIPRTION.
THX.
July 26, 2010 at 10:32 am
Then VARCHAR. Give it some relevant size based on sample of data you have. It looks like extract from other system, so you may ask for specification describing maximum length for this field...
July 26, 2010 at 10:33 am
Thank you.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply