default value in the view?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • summiyashaheen
    New Member
    • Sep 2007
    • 13

    #1

    default value in the view?

    i have a table of purchase having bill field, another table of payments is linked with purchaseid as foreign key from purchase table. how may i have "0" instead of null in a view for the purchases for which no payment is made????????
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by summiyashaheen
    i have a table of purchase having bill field, another table of payments is linked with purchaseid as foreign key from purchase table. how may i have "0" instead of null in a view for the purchases for which no payment is made????????
    What is the version of Database

    Sql Server or MS Access.

    Comment

    • summiyashaheen
      New Member
      • Sep 2007
      • 13

      #3
      sql sever. can i use isnull() in expressions to calculate outstanding amount of every purchase?

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #4
        Originally posted by summiyashaheen
        sql sever. can i use isnull() in expressions to calculate outstanding amount of every purchase?
        Yes you can use isNull like

        [CODE=sql]isNull(fieldNam e, Defaultvalue)[/CODE]

        Comment

        Working...