|
hi i have a table Etc ….. I need to (create new/update) following result table. For every aa I should have three entries ie aa, ab and ac. Similarly for every bb I should have 2 entries like bb and ba and cc should have four entries like cc,ca,cb and cd and so on. And these extra entries will remain constant like for aa resulting table will have 3, for bb it will have 2 and for cc it will be 4 etc Rest of the values in table will not change so my resulting table becomes I would be really appreciate if some one could tell me about how should i approach this ... thank you in advance ....
(comments are locked)
|
|
You could do a join between the two tables to get the results, then you can put it in another table or create a view as needed. It would look something like: Beat me to it. ;-)
Sep 24 '12 at 08:54 PM
JohnM
I looked after he answered your questions ;-)
Sep 24 '12 at 09:34 PM
TimothyAWiseman
(comments are locked)
|


Forgive me, I'm not sure I understand correctly. How do you determine that for every AA there should be 3 entries, BB just 2 entries and CC will have 4? Where does that magic number come from? Is it set in stone somewhere?
Also, what version of SQL Server are you using?
@JohnM sorry about that but i am having another table storing these values say
cc ....
i am using SQL server 2005 ...
+1 for voting an answer.