Forum Replies Created

Viewing 15 posts - 2,506 through 2,520 (of 3,658 total)

  • RE: update subquery

    UPDATE dbo.account

    SET dbo.account.balance = DT.TotalAmount

    FROM dbo.account

    INNER JOIN (

    select sum(amount) AS TotalAmount, account_num from atransaction

    group by account_num

    ) AS DT

    ON dbo.account.account_num = DT.account_num

  • RE: Cross DB Execute

    Set up a role in DB2 explicitly to allow the execution of a stored procedure to insert the records into the appropriate table.

    Add the user from DB1 to DB2 but...

  • RE: sp & select results to html out put? how is it done?

    Start reading up about the sp_makewebtask and sp_runwebtask.

    In summary you can design a simple text template of what you want with tags where your source query should insert its...

  • RE: Updating a table column

    UPDATE updatetble1

    SET updatetble1.updatecol1 = updatetble2.updatecol2

    FROM updatetble1 INNER JOIN updatetble2

    ON updatetble1.joiningcolumn = updatetble2.joiningcolumn

    WHERE Yourcondition = Your Value

  • RE: OPEN XML - what is the diff betn Element centric and attribute centric

    An element is the main tag itself such as <Element>

    An attribute is a value within the definition of an element such as <Element MyAttribute="An attribute value" />

  • RE: Unit of measure for CPU cost / IO cost?

    How can I have 0.00632 reads and writes?

  • RE: @@IDENTITY for web based applications

    Use SCOPE_IDENTITY because SCOPE_IDENTITY identifies the last identity value for the current scope where as @@IDENTITY identifies the last identity regardless of scope.

  • RE: service pack

    SELECT @@VERSION

    SP3 = 8.00.760

    SP4 = 8.00.2039

    SP4 plus embarrassing fix for memory problem in SP4 = 8.00.2040.

    You should be on at least SP3

  • RE: Enforcing Mandatory Parent/Child relationships

    If you have an dbo.addOrderLine stored procedure then you could set up a dbo.addOrder stored procedure that accepts the parameters necessary to add an order and a single order line.

    Wrap...

  • RE: sp_addrolemember, sp_grantlogin, sp_grantdbaccess

    The N'string' thing converts an standard ASCII string to a unicode one.

    db_owner is a database role that can do absolutely anything within the database. Destroy tables, alter stored procedures,...

  • RE: Export to Excel

    Doesn't this mean that Excel has to be installed on the server?

    If not then wouldn't it be better to break out the task so that one task writes the Excel...

  • RE: Can you restore backups of .mdf .ldf files to amother server

    Regardless of whether you have used sp_detach_db you can attach the MDF and LDF files.

    As ever, backup your MASTER database on your target server before and after the attach.

    You will...

  • RE: a simple index question...

    If you have a compound index on cols A,B,C and your where clause contains ColA then it will use the index.

    If your where clause doesn't contain A then it won't

  • RE: SQL job output to Event Log

    See my article on RAISERROR. It may help

  • RE: Export to Excel

    You could use the sp_OACreate, sp_OAMethod and sp_OAProperty stored procedures to access the Excel object model however I wouldn't recommend it.

    Excel does not seem to have the concept of a...

Viewing 15 posts - 2,506 through 2,520 (of 3,658 total)