Loading ...
Sorry, an error occurred while loading the content.

i need help

Expand Messages
  • Zinab mohamed
    i want to convert ERD model from visio to sql server 2005 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the
    Message 1 of 11 , Oct 20, 2008
    • 0 Attachment
      i want to convert ERD model from visio to sql server 2005

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com

      [Non-text portions of this message have been removed]
    • John Warner
      Assuming Enterprise edition of Visio, from the Data menu Select Generate Database, follow prompts. If you don t have the Enterprise edition(s) then no go. John
      Message 2 of 11 , Oct 21, 2008
      • 0 Attachment
        Assuming Enterprise edition of Visio, from the Data menu Select Generate
        Database, follow prompts. If you don't have the Enterprise edition(s) then
        no go.

        John Warner




        > -----Original Message-----
        > From: SQLQueriesNoCode@yahoogroups.com
        > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Zinab mohamed
        > Sent: Monday, October 20, 2008 5:26 PM
        > To: SQLQueriesNoCode@yahoogroups.com
        > Subject: [SQLQueriesNoCode] i need help
        >
        >
        >
        > i want to convert ERD model from visio to sql server 2005
        >
        > __________________________________________________
        > Do You Yahoo!?
        > Tired of spam? Yahoo! Mail has the best spam protection around
        > http://mail.yahoo.com
        >
        > [Non-text portions of this message have been removed]
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
      • Zinab mohamed
        thank u very much for your replay ... From: John Warner Subject: RE: [SQLQueriesNoCode] i need help To: SQLQueriesNoCode@yahoogroups.com
        Message 3 of 11 , Oct 21, 2008
        • 0 Attachment
          thank u very much for your replay








          --- On Tue, 10/21/08, John Warner <john@...> wrote:

          From: John Warner <john@...>
          Subject: RE: [SQLQueriesNoCode] i need help
          To: SQLQueriesNoCode@yahoogroups.com
          Date: Tuesday, October 21, 2008, 1:26 PM






          Assuming Enterprise edition of Visio, from the Data menu Select Generate
          Database, follow prompts. If you don't have the Enterprise edition(s) then
          no go.

          John Warner

          > -----Original Message-----
          > From: SQLQueriesNoCode@ yahoogroups. com
          > [mailto:SQLQueriesNoCode@ yahoogroups. com] On Behalf Of Zinab mohamed
          > Sent: Monday, October 20, 2008 5:26 PM
          > To: SQLQueriesNoCode@ yahoogroups. com
          > Subject: [SQLQueriesNoCode] i need help
          >
          >
          >
          > i want to convert ERD model from visio to sql server 2005
          >
          > ____________ _________ _________ _________ _________ __
          > Do You Yahoo!?
          > Tired of spam? Yahoo! Mail has the best spam protection around
          > http://mail. yahoo.com
          >
          > [Non-text portions of this message have been removed]
          >
          >
          > ------------ --------- --------- ------
          >
          > Yahoo! Groups Links
          >
          >
          >


















          [Non-text portions of this message have been removed]
        • John Warner
          SQL Server 2K on Win 2003 server I have a table with items and each item has a shipping cost from a location to a customer. I can SUM(cost) where charge =
          Message 4 of 11 , Oct 24, 2008
          • 0 Attachment
            SQL Server 2K on Win 2003 server

            I have a table with items and each item has a shipping cost from a location
            to a customer. I can SUM(cost) where charge = freight Group by Invoice
            which gives me the amount of freight for the invoice. Now I need an Average
            that is what was the average freight charge from location to customer over
            time like say the last 6 months. I have date fields etc. The basic query I
            understand.

            How to I aggregate an aggregate?

            AVG(SUM(cost) )

            AVG in place of sum doesn't work as that gives the average of items I need
            the average of invoices.

            I know this is simple but I am just brain locked

            Thanks.

            John Warner
          • Arnie Rowland
            John, Use a derived query. Something like: SELECT dt.CustomerID, AvgShipping = avg( dt.Shipping ) FROM (SELECT CustomerID, Invoice, Shipping = sum( CASE Charge
            Message 5 of 11 , Oct 24, 2008
            • 0 Attachment
              John,

              Use a derived query. Something like:

              SELECT
              dt.CustomerID,
              AvgShipping = avg( dt.Shipping )
              FROM (SELECT
              CustomerID,
              Invoice,
              Shipping = sum( CASE Charge WHEN 'Freight' THEN Cost ELSE 0 END
              )
              FROM YourTable
              GROUP BY
              CustomerID,
              Invoice
              ) dt
              GROUP BY
              dt.CustomerId


              Regards,

              Arnie Rowland, MVP (SQL Server)

              "Fortune favors the prepared mind." Louis Pasteur


              -----Original Message-----
              From: SQLQueriesNoCode@yahoogroups.com
              [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of John Warner
              Sent: Friday, October 24, 2008 9:20 AM
              To: Arnie
              Subject: [SQLQueriesNoCode] Average a Sum

              SQL Server 2K on Win 2003 server

              I have a table with items and each item has a shipping cost from a
              location
              to a customer. I can SUM(cost) where charge = freight Group by Invoice
              which gives me the amount of freight for the invoice. Now I need an
              Average
              that is what was the average freight charge from location to customer
              over
              time like say the last 6 months. I have date fields etc. The basic query
              I
              understand.

              How to I aggregate an aggregate?

              AVG(SUM(cost) )

              AVG in place of sum doesn't work as that gives the average of items I
              need
              the average of invoices.

              I know this is simple but I am just brain locked

              Thanks.

              John Warner



              ------------------------------------

              Yahoo! Groups Links







              Disclaimer - October 24, 2008
              This email and any files transmitted with it are confidential and intended solely for SQLQueriesNoCode@yahoogroups.com. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Westwood Consulting, Inc. Warning: Although Westwood Consulting, Inc has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
              This disclaimer was added by Policy Patrol: http://www.policypatrol.com/
            • John Warner
              Thanks, I knew this and just could not make my brain grasp it. Glad it is Friday. John Warner
              Message 6 of 11 , Oct 24, 2008
              • 0 Attachment
                Thanks, I knew this and just could not make my brain grasp it. Glad it is
                Friday.

                John Warner




                > -----Original Message-----
                > From: SQLQueriesNoCode@yahoogroups.com
                > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Arnie Rowland
                > Sent: Friday, October 24, 2008 12:36 PM
                > To: SQLQueriesNoCode@yahoogroups.com
                > Subject: RE: [SQLQueriesNoCode] Average a Sum
                >
                >
                > John,
                >
                > Use a derived query. Something like:
                >
                > SELECT
                > dt.CustomerID,
                > AvgShipping = avg( dt.Shipping )
                > FROM (SELECT
                > CustomerID,
                > Invoice,
                > Shipping = sum( CASE Charge WHEN 'Freight' THEN Cost
                > ELSE 0 END
                > )
                > FROM YourTable
                > GROUP BY
                > CustomerID,
                > Invoice
                > ) dt
                > GROUP BY
                > dt.CustomerId
                >
                >
                > Regards,
                >
                > Arnie Rowland, MVP (SQL Server)
                >
                > "Fortune favors the prepared mind." Louis Pasteur
                >
                >
                > -----Original Message-----
                > From: SQLQueriesNoCode@yahoogroups.com
                > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of John Warner
                > Sent: Friday, October 24, 2008 9:20 AM
                > To: Arnie
                > Subject: [SQLQueriesNoCode] Average a Sum
                >
                > SQL Server 2K on Win 2003 server
                >
                > I have a table with items and each item has a shipping cost
                > from a location to a customer. I can SUM(cost) where charge =
                > freight Group by Invoice which gives me the amount of freight
                > for the invoice. Now I need an Average that is what was the
                > average freight charge from location to customer over time
                > like say the last 6 months. I have date fields etc. The basic
                > query I understand.
                >
                > How to I aggregate an aggregate?
                >
                > AVG(SUM(cost) )
                >
                > AVG in place of sum doesn't work as that gives the average of
                > items I need the average of invoices.
                >
                > I know this is simple but I am just brain locked
                >
                > Thanks.
                >
                > John Warner
                >
                >
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                >
                > Disclaimer - October 24, 2008
                > This email and any files transmitted with it are confidential
                > and intended solely for SQLQueriesNoCode@yahoogroups.com. If
                > you are not the named addressee you should not disseminate,
                > distribute, copy or alter this email. Any views or opinions
                > presented in this email are solely those of the author and
                > might not represent those of Westwood Consulting, Inc.
                > Warning: Although Westwood Consulting, Inc has taken
                > reasonable precautions to ensure no viruses are present in
                > this email, the company cannot accept responsibility for any
                > loss or damage arising from the use of this email or attachments.
                > This disclaimer was added by Policy Patrol:
                > http://www.policypatrol.com/
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                >
              • Zinab mohamed
                i need help plz i make project airline reservation system database has alot of table flight ,airport,city.passenger ,..............  table flight has column
                Message 7 of 11 , Oct 25, 2008
                • 0 Attachment
                  i need help plz
                  i make project airline reservation system
                  database has alot of table flight ,airport,city.passenger ,..............
                   table flight has column (fl_no,airport_to_id,airport_from_id,......)
                   table airport has column (airport_id,airport_name.)
                  i make  2 relation 1 to many  from airport to (flight.airport_to_id and flight.airport_from_id)
                  i mean generate to relation from airport to flight
                  i want make query to select fl_no & to & from
                  thanx







                  [Non-text portions of this message have been removed]
                • John Warner
                  Your question is difficult to read, could you repost and include the DDL you used to set up your tables. It will sure make things easier for those of us
                  Message 8 of 11 , Oct 27, 2008
                  • 0 Attachment
                    Your question is difficult to read, could you repost and include the DDL
                    you used to set up your tables. It will sure make things easier for those
                    of us wanting to help you.

                    John Warner




                    > -----Original Message-----
                    > From: SQLQueriesNoCode@yahoogroups.com
                    > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Zinab mohamed
                    > Sent: Saturday, October 25, 2008 4:41 PM
                    > To: SQLQueriesNoCode@yahoogroups.com
                    > Subject: [SQLQueriesNoCode] i need help
                    >
                    >
                    >
                    > i need help plz
                    > i make project airline reservation system
                    > database has alot of table flight ,airport,city.passenger
                    > ,..............
                    >  table flight has column (fl_no,airport_to_id,airport_from_id,......)
                    >  table airport has column (airport_id,airport_name.)
                    > i make  2 relation 1 to many  from airport to
                    > (flight.airport_to_id and flight.airport_from_id) i mean
                    > generate to relation from airport to flight i want make query
                    > to select fl_no & to & from thanx
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >
                    >
                    > ------------------------------------
                    >
                    > Yahoo! Groups Links
                    >
                    >
                    >
                  • Tim Mitchell
                    Midterm? ________________________________ From: SQLQueriesNoCode@yahoogroups.com [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of John Warner Sent:
                    Message 9 of 11 , Oct 27, 2008
                    • 0 Attachment
                      Midterm?



                      ________________________________

                      From: SQLQueriesNoCode@yahoogroups.com
                      [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of John Warner
                      Sent: Monday, October 27, 2008 3:49 PM
                      To: SQLQueriesNoCode@yahoogroups.com
                      Subject: RE: [SQLQueriesNoCode] i need help



                      Your question is difficult to read, could you repost and include the DDL
                      you used to set up your tables. It will sure make things easier for
                      those
                      of us wanting to help you.

                      John Warner

                      > -----Original Message-----
                      > From: SQLQueriesNoCode@yahoogroups.com
                      <mailto:SQLQueriesNoCode%40yahoogroups.com>
                      > [mailto:SQLQueriesNoCode@yahoogroups.com
                      <mailto:SQLQueriesNoCode%40yahoogroups.com> ] On Behalf Of Zinab mohamed
                      > Sent: Saturday, October 25, 2008 4:41 PM
                      > To: SQLQueriesNoCode@yahoogroups.com
                      <mailto:SQLQueriesNoCode%40yahoogroups.com>
                      > Subject: [SQLQueriesNoCode] i need help
                      >
                      >
                      >
                      > i need help plz
                      > i make project airline reservation system
                      > database has alot of table flight ,airport,city.passenger
                      > ,..............
                      > table flight has column (fl_no,airport_to_id,airport_from_id,......)
                      > table airport has column (airport_id,airport_name.)
                      > i make 2 relation 1 to many from airport to
                      > (flight.airport_to_id and flight.airport_from_id) i mean
                      > generate to relation from airport to flight i want make query
                      > to select fl_no & to & from thanx
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      > ------------------------------------
                      >
                      > Yahoo! Groups Links
                      >
                      >
                      >





                      [Non-text portions of this message have been removed]
                    • Suryanarayana Vithala
                      hi, this is surya what i feel u can use equijoin (i.e. primary key of one table should be joined with the foreign key) ur table design should be  like this.
                      Message 10 of 11 , Oct 29, 2008
                      • 0 Attachment
                        hi,
                        this is surya what i feel u can use equijoin (i.e. primary key of one table should be joined with the foreign key)
                        ur table design should be  like this.
                        the table air_port should have the column (fl_no (it should be the foreign key)
                        the table flight should have the column (fl_no (it should be the primary keey)
                        design the  tables in the above manner.
                        Then write the following query.
                        select<col1>,<col2>
                        from air_port,flight
                        where air_port.fl_no = flight.fl_no
                        Hope it will solve the problem.
                        Regards,
                        Surya.



                         



                        ________________________________
                        From: Tim Mitchell <tmitchell@...>
                        To: SQLQueriesNoCode@yahoogroups.com
                        Sent: Monday, October 27, 2008 1:54:54 PM
                        Subject: RE: [SQLQueriesNoCode] i need help


                        Midterm?

                        ____________ _________ _________ __

                        From: SQLQueriesNoCode@ yahoogroups. com
                        [mailto:SQLQueriesNoCode@ yahoogroups. com] On Behalf Of John Warner
                        Sent: Monday, October 27, 2008 3:49 PM
                        To: SQLQueriesNoCode@ yahoogroups. com
                        Subject: RE: [SQLQueriesNoCode] i need help

                        Your question is difficult to read, could you repost and include the DDL
                        you used to set up your tables. It will sure make things easier for
                        those
                        of us wanting to help you.

                        John Warner

                        > -----Original Message-----
                        > From: SQLQueriesNoCode@ yahoogroups. com
                        <mailto:SQLQueriesN oCode%40yahoogro ups.com>
                        > [mailto:SQLQueriesNoCode@ yahoogroups. com
                        <mailto:SQLQueriesN oCode%40yahoogro ups.com> ] On Behalf Of Zinab mohamed
                        > Sent: Saturday, October 25, 2008 4:41 PM
                        > To: SQLQueriesNoCode@ yahoogroups. com
                        <mailto:SQLQueriesN oCode%40yahoogro ups.com>
                        > Subject: [SQLQueriesNoCode] i need help
                        >
                        >
                        >
                        > i need help plz
                        > i make project airline reservation system
                        > database has alot of table flight ,airport,city. passenger
                        > ,............ ...
                        > table flight has column (fl_no,airport_ to_id,airport_ from_id,. .....)
                        > table airport has column (airport_id, airport_name. )
                        > i make 2 relation 1 to many from airport to
                        > (flight.airport_ to_id and flight.airport_ from_id) i mean
                        > generate to relation from airport to flight i want make query
                        > to select fl_no & to & from thanx
                        >
                        >
                        >
                        >
                        >
                        >
                        >
                        > [Non-text portions of this message have been removed]
                        >
                        >
                        > ------------ --------- --------- ------
                        >
                        > Yahoo! Groups Links
                        >
                        >
                        >

                        [Non-text portions of this message have been removed]






                        [Non-text portions of this message have been removed]
                      • Agent Orange
                        you can use INNER JOIN LEFT JOIN and RIGHT JOIN depends on your requirements AgEnT^^^OrAnGe My Greatest Fear is to stop Learning.... Proud to be a Pinoy
                        Message 11 of 11 , Nov 3, 2008
                        • 0 Attachment
                          you can use INNER JOIN LEFT JOIN and RIGHT JOIN depends on your requirements

                          AgEnT^^^OrAnGe

                          My Greatest Fear is to stop Learning....

                          Proud to be a Pinoy Expat...

                          http://www.nhowetech.com/

                          --- On Sun, 10/26/08, Zinab mohamed <eng_z85@...> wrote:
                          From: Zinab mohamed <eng_z85@...>
                          Subject: [SQLQueriesNoCode] i need help
                          To: SQLQueriesNoCode@yahoogroups.com
                          Date: Sunday, October 26, 2008, 4:41 AM













                          i need help plz

                          i make project airline reservation system

                          database has alot of table flight ,airport,city. passenger ,........... ...

                           table flight has column (fl_no,airport_ to_id,airport_ from_id,. .....)

                           table airport has column (airport_id, airport_name. )

                          i make  2 relation 1 to many  from airport to (flight.airport_ to_id and flight.airport_ from_id)

                          i mean generate to relation from airport to flight

                          i want make query to select fl_no & to & from

                          thanx



                          [Non-text portions of this message have been removed]





























                          [Non-text portions of this message have been removed]
                        Your message has been successfully submitted and would be delivered to recipients shortly.