From: stumpy_uk via SQLMonster.com on
Beginner, struggling with the following, any help appreciated.

I have a postcode table which is setup per property e.g.

Business | Number | Street | Town |
Postcode

Abusiness MyStreet MyTown
MT20 3SN
1 MyStreet MyTown
MT20 3SN
2 MyStreet MyTown
MT20 3SN
3 MyStreet MyTown
MT20 3SN
4 MyStreet MyTown
MT20 3SN


Which means I have over

I would like to change it to the following, which would suit the application


Property Street Town
Postcode

Abusiness, 1,2,3,4 MyStreet MyTown MT20 3SN

I am using SQL2000 so the extra Pivot ability etc of 2k5 is not available and
without doing it with update after update etc.

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201004/1

From: --CELKO-- on
You use a report writer to violate First Normal for display, not SQL.
From: stumpy_uk via SQLMonster.com on
--CELKO-- wrote:
>You use a report writer to violate First Normal for display, not SQL.

CELKO - Thanks for the feedback but not sure what you mean, can you elaborate.


Many Thanks

Lee

--
Message posted via http://www.sqlmonster.com

From: Tony Rogerson on
Really - and just how is he violating first normal form?

Business | Number | Street | Town |
Postcode

Abusiness MyStreet MyTown
MT20 3SN
1 MyStreet MyTown
MT20 3SN
2 MyStreet MyTown
MT20 3SN
3 MyStreet MyTown
MT20 3SN
4 MyStreet MyTown
MT20 3SN


There is a key - Number; there are no repeating groups.

Did you mean to say he is violating 2NF or 3NF?

What he is trying to do is a Relation Valued Attribute for the property post
code (see C J Date on the subject), Codd says values should be Atomic - he
didn't say they should only be the scalar data types available in ISO SQL. A
set can be atomic - SQL won't support it though but Normalisation is not a
SQL concept.

--ROGGIE--

"--CELKO--" <jcelko212(a)earthlink.net> wrote in message
news:afd4a507-6273-4378-9bf7-7b1997b1f0ed(a)g30g2000yqc.googlegroups.com...
> You use a report writer to violate First Normal for display, not SQL.

 | 
Pages: 1
Prev: query help
Next: Truncate temp table