Friday, March 23, 2012
Name storage in database
(web site) database. Now my immediate reaction was to split it into: Prefix,
First, Middle, Last & Suffix. However, the UI could easilly get a little
unfriendly. So I popped into Amazon and found they were using a single field
in the UI too. Other sites I checked only used first and last names.
Someone must have done some research on this and made a paper available.
Thoughts and/or links?On Wed, 5 Dec 2007 12:37:24 -0800, Jay wrote:
>I'm dealing with a system that only stores a single "Name" field in an OLTP
>(web site) database. Now my immediate reaction was to split it into: Prefix,
>First, Middle, Last & Suffix. However, the UI could easilly get a little
>unfriendly. So I popped into Amazon and found they were using a single field
>in the UI too. Other sites I checked only used first and last names.
>Someone must have done some research on this and made a paper available.
>Thoughts and/or links?
>
Hi Jay,
It all depends on what you want to use the data for.
If you just intend to print it on address labels for your business
correspondence, than you can just as well leave it in a single column.
If you intend to do something wiith a component of a name (e.g. sorting
by last name, or personalizing a letter by having it start with "Dear
Mr. Jones" or "Hi Barry", or analysing whether your customers with a
specific title spend more than those without), then you're better off
splitting the parts you eed seperate right from the off.
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Name storage in database
(web site) database. Now my immediate reaction was to split it into: Prefix,
First, Middle, Last & Suffix. However, the UI could easilly get a little
unfriendly. So I popped into Amazon and found they were using a single field
in the UI too. Other sites I checked only used first and last names.
Someone must have done some research on this and made a paper available.
Thoughts and/or links?On Wed, 5 Dec 2007 12:37:24 -0800, Jay wrote:
>I'm dealing with a system that only stores a single "Name" field in an OLTP
>(web site) database. Now my immediate reaction was to split it into: Prefix
,
>First, Middle, Last & Suffix. However, the UI could easilly get a little
>unfriendly. So I popped into Amazon and found they were using a single fiel
d
>in the UI too. Other sites I checked only used first and last names.
>Someone must have done some research on this and made a paper available.
>Thoughts and/or links?
>
Hi Jay,
It all depends on what you want to use the data for.
If you just intend to print it on address labels for your business
correspondence, than you can just as well leave it in a single column.
If you intend to do something wiith a component of a name (e.g. sorting
by last name, or personalizing a letter by having it start with "Dear
Mr. Jones" or "Hi Barry", or analysing whether your customers with a
specific title spend more than those without), then you're better off
splitting the parts you eed seperate right from the off.
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Friday, March 9, 2012
mysql immediate assistance needed please.
The primary table I loaded into MySql has 2.5 MM records: ID, Ticker,
Date, Price; and all works well. My need is to write a QUERY to export
outfile?) multiple text files. For example, I have 6 years worth of
data, and need to generate 1 file per day that contains all the Tickers
and Prices for that day. Furthermore, I need the text file name to be
the name of the date (e.g. April 4, 1998 with 1000 Tickers & Prices
would result in a file that was named "040498.txt" (either csv or tab
delimited).
Is this possible? If so, can someone please help me in this effort...the
alternative is not pretty.
Thanks in advance!
> Trevor
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!tread (trevor_read@.hotmail.com) writes:
> The primary table I loaded into MySql has 2.5 MM records: ID, Ticker,
> Date, Price; and all works well. My need is to write a QUERY to export
> outfile?) multiple text files. For example, I have 6 years worth of
> data, and need to generate 1 file per day that contains all the Tickers
> and Prices for that day. Furthermore, I need the text file name to be
> the name of the date (e.g. April 4, 1998 with 1000 Tickers & Prices
> would result in a file that was named "040498.txt" (either csv or tab
> delimited).
> Is this possible? If so, can someone please help me in this effort...the
> alternative is not pretty.
The easiest way to do this for MS SQL Server, would be to use the
BCP command-line utility with the queryout function, packaged in
some script that handles the file naming.
But since you are using MySQL and need immediate assistance, you should
probably look around and try to find a MySQL forum to get some more
relevant response.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp