Council to make an sp.

Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.

  1. #1

    Default Council to make an sp.

    I must to implent a sp that checks data into a one to one relationed
    table and let me know if all data is available or not.

    To better understand (sorry for my poor english) imagine this.

    TABLE 1

    ID DESCR QTA
    1 aaa 1
    2 bbb 1

    TABLE 2

    ID DESCR REALQTA
    1 aaaa 4
    2 bbbb 1

    Because data in table 2 is added only in a certain moment of
    app live, may be that table 2 doesn't contain any row related
    to table 1 or just an half or something like it.

    I want to do an sp that say me if row into table1 and table 2
    match per number, and that realqta is filled and not an empty
    or a negative number (I must to decide in which way recognize
    when data is present).

    I hope that someone can help me.

    Sincerely
    Andrea Moro


    Andrea Moro Guest

  2. Similar Questions and Discussions

    1. i really wana make flash which prog do i download? andhow do i make it?
      hey guys im really sorry bout bothering u all but im 17 and wana start makin flash can somone gimme a hand? which program, how to work the program...
    2. Am I wasting my time? I seek council.
      My page has <cfinclude> to create the top menu, which includes text input fields for search parameters. Another <cfinclude> sets a page to below...
    3. preloaders, why do people make 32000 tutorials on how to make them but NONE on how to USE!
      I think I seen thousands of tutorials on how to make a preloader, but what then? Im sitting there with my little load bar and some scripts .. but so...
    4. GNU make & make.pl are dead: long live Perl makepp
      Hi, I have so far not seen the advantage of my 100% Perl syntax - at least not until Emacs learns to syntax highlight the specific parts. Since...
  3. #2

    Default Council to make an sp.

    I think that the sentence "NOT EXISTS" can help you. Here
    is an example:

    SELECT ID FROM Table1 T1 WHERE T1.Id = T2.Id AND NOT
    EXISTS (SELECT ID FROM Table2 T2)
    >-----Original Message-----
    >I must to implent a sp that checks data into a one to
    one relationed
    >table and let me know if all data is available or not.
    >
    >To better understand (sorry for my poor english) imagine
    this.
    >
    >TABLE 1
    >
    >ID DESCR QTA
    >1 aaa 1
    >2 bbb 1
    >
    >TABLE 2
    >
    >ID DESCR REALQTA
    >1 aaaa 4
    >2 bbbb 1
    >
    >Because data in table 2 is added only in a certain
    moment of
    >app live, may be that table 2 doesn't contain any row
    related
    >to table 1 or just an half or something like it.
    >
    >I want to do an sp that say me if row into table1 and
    table 2
    >match per number, and that realqta is filled and not an
    empty
    >or a negative number (I must to decide in which way
    recognize
    >when data is present).
    >
    >I hope that someone can help me.
    >
    >Sincerely
    >Andrea Moro
    >
    >
    >.
    >
    Ton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139