Forum Replies Created

Viewing 15 posts - 406 through 420 (of 426 total)

  • RE: Output parameter returning NULL. Randomly.

    I would also add SET NOCOUNT ON for the 1st line in your proc and SET NOCOUNT OFF as the last line, I have seen this cause inconsistant output parameter problems...

  • RE: Multiple views with different owners

    Take a look in BOL at the REFERENCES permission, this should give you what you are looking for:

    GRANT SELECT, REFERENCES ON reg1.CORP TO reg1 AS dbo

    Andy

  • RE: disabling windows account login.

    I reciently when through the process of removing the BUILTIN\Administrators account, here are my notes:

    -- KB 317746

    exec sp_grantlogin 'NT Authority\System'

    exec sp_addsrvrolemember @loginame = 'NT Authority\System', @rolename...

  • RE: Expoting Excel data to SQL server using TSQL

    Import from Excel xls files really depends on how the data got there. If a savy user starts formatting columns you are in too deep, SQL Server does not like...

  • RE: SqlServerAgent cann''''t see mail profile only created with Outlook

    Just Type the name of the profile you saved in the Mail applet, I would start with SQL Mail, then test. Move on up to SQL Agent and because SQL...

  • RE: SqlServerAgent cann''''t see mail profile only created with Outlook

    For my configurations, I logged in as the service domain\user and configured SQL Agent with the Outlook profile.

    When I normally log into the server I use another domain account...

  • RE: Variable Syntax for User Input

    SET @sSQL =  @Statement + @Operator + CONVERT(nvarchar,@EquipmentCount)

    Andy

  • RE: SqlServerAgent cann''''t see mail profile only created with Outlook

    From KB 840219

    Enable computer and user accounts to be trusted for delegation

    Impersonate a client after authentication

    Lock pages in memory

    Log on as a batch job

    Log on as a service

    Replace a...

  • RE: Trouble running SQLH2

    You can use sp_defaultlanguage to change the language to us_english for the login that you are using, run the exe, and then set it back.

    You could opt to use sp_configure...

  • RE: DBCC LOGINFO has a status 2 that I can''''t seem to get rid of

    DBCC OPENTRAN

    Displays information about the oldest active transaction

    I use this with sp_who to find and kill the process that is holding a transaction open, as long as it is open...

  • RE: VIEW INSIDE A VIEW

    According to BOL, Combining Results with UNION, you can have a trailing ORDER BY clause in a UNION ALL query, that affects the resulting set. If you desire individual ORDER BY, then...

  • RE: Having Troubles with INSERT INTO

    You almost had it:

    INSERT INTO TestTableA(CustName, Price2)

    SELECT B.CustName, B.Price

    FROM TestTableB B

     LEFT JOIN TestTable A ON B.CustName = A.CustName

    WHERE A.CustName IS NULL

    To Use a column name variable:

    DECLARE @PriceCol varchar(50), @ExecStr varchar(8000)

    SET...

  • RE: Force Order

    You could try a subquery, the BOL UPDATE example D. Use UPDATE with the TOP clause in a SELECT statement, should give a give you a clue, just ignore the TOP portion,...

  • RE: How do I delete the corresponding row?

    For Dates Within, try:

    DELETE FROM sickness

    FROM sickness

     INNER JOIN(SELECT todel.sickid, MAX(dupe.maxsickid) AS maxsickid

      FROM sickness AS todel

       INNER JOIN (SELECT COUNT(1), payroll, staff_id, start_date

         , end_date, MAX(sickid) AS maxsickid

           FROM sickness

          ...

  • RE: How do I delete the corresponding row?

    Try this:

    DELETE FROM sicknessdays

    FROM sicknessdays

     INNER JOIN(SELECT todel.sickid, dupe.maxsickid

      FROM sickness AS todel

       INNER JOIN (SELECT COUNT(1), payroll, staff_id, start_date

         , end_date, MAX(sickid) AS maxsickid

           FROM sickness

           GROUP BY payroll, staff_id, start_date, end_date

        HAVING...

Viewing 15 posts - 406 through 420 (of 426 total)