sql_language thread: function problem.Need Help.Thanks. : )
Not so fast ;-) Don't go throwing ID columns around until you think it
through.
What would be the difference between the 'Store_name' and a 'Store_ID'?
Presumably, the 'Store_name' is sufficient to uniquely distinguish one store
from another, so that could be used as a primary key - if the table were
modeling stores. So what purpose would 'Store_ID' then serve that could not
be handled by 'Store_name'?
Your table is apparently modeling store sales and not a store, so what would
be that combination of column values which could be used to distinguish one
row from another? It looks like 'Store_name' and 'Date' (BTW, 'Date' is not
really a good name for a column - what date does it refer to?), so these two
columns should probably be your primary key. I had asked in an earlier
message about duplicates, so this won't work if it is possible for a given
store to have more than one 'Sales' value on a given day. In this case,
maybe a 'StoreSales_ID' column might serve as a better key.
--
Jeff Mason Custom Apps, Inc.
Jeff@c...
-----Original Message-----
From: Imran [mailto:schiise@y...]
Sent: Wednesday, August 07, 2002 5:28 AM
To: sql language
Subject: [sql_language] RE: function problem.Need Help.Thanks. : )
You mean, I need a primary key, and in this case, let's call
it 'Store_ID'? Ok, thanks,perhaps I need to reconfigure my table all over
again. Thanks alot. Cheers. :)