Re: View creation Help NEEDED!!!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ray Higdon (sqlhigdon_at_nospam.yahoo.com)
Date: 03/17/04


Date: Tue, 16 Mar 2004 23:17:04 -0500

Use isnull, see BOL for details

-- 
Ray Higdon MCSE, MCDBA, CCNA
---
"AshVsAOD" <.> wrote in message
news:OOY7AM9CEHA.3344@tk2msftngp13.phx.gbl...
> Newbie question no doubt...
>
> I have three tables with a Column called Fee...
>
> I need to create one view from these columns that total the fee column.
>
> However in each of the three tables a client could have a entry..
> e.g
> Table One
> abcd102             Fee=100
> gdgd400             Fee=50
>
> Table Two
> abcd102             Fee=75
>
> Table Three
> gadg890             Fee=10
>
> Now when I combine these three tables I end up getting <NULL> appearing in
> one of the columns due to there not being an entry in that column.
>
> e.g 2 (Output)
>
> abcd102             100                     75                       Null
> gdgd400              50                     Null                      Null
> gadg890             Null                    Null                      10
>
> Can anyone assist in the code that will set the NULL to a 0 (zero) inside
> the view?  Or is there another way that does NOT involve table
> modifications?
>
> Kind  Regards,
>
> Clint
>
>