Forum Replies Created

Viewing 15 posts - 6,166 through 6,180 (of 7,187 total)

  • RE: view and Trigger

    dr_csharp (12/18/2007)


    declare @Id int

    INSERT INTO A (CompanyName)VALUES('Iran');

    SELECT @Id=@@IDENTITY

    INSERT INTO B (CompanyID,Tel)VALUES(@Id,'0912')

    Make sure you understand the difference between @@IDENTITY and SCOPE_IDENTITY before rolling this code out into a live environment.

    John

  • RE: order of rows during bulk insert

    So is there no natural key in your Access table, something like create_date or order_number? If not, how about adding an extra column and populating that with an ascending...

  • RE: What is the accurate way of calculating Average Time?

    From Books Online: "Floating point data is approximate; therefore, not all values in the data type range can be represented exactly." Please post both queries you are using and...

  • RE: order of rows during bulk insert

    Is the data in the spreadsheet ordered according to any particular column(s)? If so, import the data and create a clustered index on that/those column(s). If you insist...

  • RE: What is the accurate way of calculating Average Time?

    Use DATEDIFF to calculate the number of minutes after midnight the employee arrives each day, take an average of that, and then use DATEADD and DATEPART to manipulate that figure...

  • RE: TOP FUNCTION

    I see that you need an "urgent" query. Does that mean this is homework? What have you tried so far?

    John

  • RE: How to avoid While Loop - RBAR ?

    Karthik

    You've got two options:

    (1) Think about it for yourself

    (2) Read Jeff's post, which is only 5 above your one and gives you an alternative way of doing what you want...

  • RE: Hidden RBAR: Triangular Joins

    Ramesh (12/9/2007)

    In Mathematics, if one cannot prove a statement is true then it termed to be as false. In simple terms, if one says a=b and he cannot prove...

  • RE: Adding same foreign key to same columns

    No need to post the same question in two different forums. Answered here:

    http://www.sqlservercentral.com/Forums/Topic427376-9-1.aspx

  • RE: Adding same foreign key to two columns

    This looks slightly like a homework question. Yes, you can have a foreign key constraint wherein two columns in one table reference two columns in another. The syntax is...

  • RE: So You're the New DBA

    majorbloodnock (11/28/2007)


    😀

    "Always in the sh-t, it's just the depth that varies"

    Sorry to be pedantic, but shouldn't the comma come after "sumus"?

    John

  • RE: Need Help In Trigger

    This is hard work, isn't it? You've been asked four times now to post the code of the trigger. You have to help yourself if you expect anyone...

  • RE: How to configure a job in SQL Server 2005 (Developer)

    Read about BCP, bulk insert and SSIS and choose the one that suits you best. You can also use linked servers and OPENROWSET.

    John

  • RE: drop constraint fails

    Do you have any DDL triggers defined on the database or server?

    John

  • RE: Need Help in Optimize SP

    Rajeev

    You've got seven different SELECT statements in there. Have you tried running them individually to see which one is taking most of the time? Once you identify that,...

Viewing 15 posts - 6,166 through 6,180 (of 7,187 total)