SQL Server Performance

sub:How to join more than two two tables based on one common field

Discussion in 'Getting Started' started by srinivas913, Mar 9, 2011.

  1. srinivas913 New Member

    Hi,I m very newer for sqlserver,How to join more than two tables based on one common field,Every time Table1 inner join on condition table2 inner join on condition ...........Is good? for the performance wise?
  2. satya Moderator

  3. srinivas913 New Member

    Thank for ur reply
  4. srinivas913 New Member

    Hi,Good Morning I have one table ,in that i have article no,articlenocount,yearnow i want to calculate percentage of article nos year wise.plz help me,in that i want '%' also
  5. FrankKalis Moderator

    Please start a new thread, so a broader audience can be reached, which increases your chances to get a good reply soon.
  6. satya Moderator

  7. srinivas913 New Member

    Hi,I have a one doubt regarding sqlserver,I am using sqlserver2008,vs2010.I export the data from table to Xml file.Now i trying to import the xml file into sqlserver?Can u please help me?
  8. FrankKalis Moderator

    [quote user="srinivas913"]Hi,I have a one doubt regarding sqlserver,I am using sqlserver2008,vs2010.I export the data from table to Xml file.Now i trying to import the xml file into sqlserver?Can u please help me?[/quote]
    What exactly is the issue you're facing? Importing and storing the XML or shredding it?
  9. srinivas913 New Member

    Hi,Actually I have four tables,first i export four tables data to Xmlfiles(xmlformat)now i am trying to get the four xmlfiles data and insert into tables in database.(here i requiremnt is ,when i m trying to insert the xmlfiles data in backend(sqlserver)the table is automatically will create.i.e xmlfiles data will insert into destination table.TheFour Xmlfiles data will insert into four tables in database.
  10. satya Moderator

    Take a look at sp_xml_preparedocument and use xml data type within the tables to accomplish what you need, refer through Books Online for more information on these topics.
  11. FrankKalis Moderator

    [quote user="srinivas913"]Hi,I m very newer for sqlserver,How to join more than two tables based on one common field,Every time Table1 inner join on condition table2 inner join on condition ...........Is good? for the performance wise?[/quote]
    How else would you do this then? This is the standard SQL way of joining tables.
    Is it good? That's kind of a philosophical question and the answer depends on whom you ask. Anyway, if you want to use SQL, that the way to go.
    Nothing to do with performance as such. This is the request you have for the database and it up to the engine how to carry out this request. this is on the logical level. However, it will help the engine tremendously when the appropriate indexes are in place, but ultimately that is an implementation detail.
  12. FrankKalis Moderator

    Have a look at BOL for "XQuery".

Share This Page