Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)

  • RE: When are Indexed Views used?

    Using Indexes on Views

    The Microsoft® SQL Server™ 2000 query optimizer determines whether a given query will benefit from using any indexes defined in the database. This includes both indexed...

  • RE: When are Indexed Views used?

    You can prevent view indexes from being used for a query by using the EXPAND VIEWS option. You can use the NOEXPAND view hint to force the use of an...

  • RE: When are Indexed Views used?

    On the other hand . . .

    ALTER VIEW [ < database_name > . ] [ < owner > . ] view_name [ ( column [ ,...n ] ) ]...

  • RE: When are Indexed Views used?

    You could create the same view (non indexed) by a using a different object name.

    Example

    View1Indexed

    View1NonIndexed

    Then call in the application code accordingly.

    Keep it simple, huh?

  • RE: Stored Procedures

    Yes.

    I believe this will fix the problem?

     

    CREATE PROCEDURE [usp_UpdateCustomer]

    @RecordID int,

    @MRPNumber   nvarchar(50),

    @CompanyName  nvarchar(50),

    @ContactName  nvarchar(50),

    @ContactTitle  nvarchar(50),

    @Address  nvarchar(50) ,

    @City   nvarchar(50),

    @Region  nvarchar(50),

    @PostalCode  nvarchar(10),

    @Country  nvarchar(50),

    @Phone  nvarchar(15),

    @Fax   nvarchar(15),

    @Email   nvarchar(50),

    @CreditTerms  nvarchar(50),

    @CreditLimit  nvarchar(50),

    @CreditNotes  ntext,

    @RepName  nvarchar(50),

    @RepID  nvarchar(50),

    @RepPercent  nvarchar(10),

    @retval   int...

  • RE: Stored Procedures

    Typically I only combine the insert and update into a single sp, since the parameter list for the delete usually differs greatly.  e.g. passing zero or a valid RecordID to...

  • RE: Stored procedures using different databases

    IF (@@SERVERNAME = 'MyDBProd')

     BEGIN

      -- PROD CODE HERE

     PRINT 'PROD SERVER'

     END

    ELSE

     BEGIN

      -- DEV CODE HERE

     PRINT 'DEV SERVER'

     END

    Although, the server names could change in the future.  So I might create an additional table on...

  • RE: export data to a specificc cell in excel sheet

    Instead of pushing the data into excel via DTS you could try pulliinng the data into Excel with VBA.  A simple example follows . . .

    With ActiveSheet.QueryTables.Add(Connection:= _

            "ODBC;DSN=Northwind;UID=sa;PWD=;APP=Microsoft Office...

  • RE: Writing to two MS SQL databases simultaneously via an ASP page

    I really can't see how your can depend on any type of mission critical performance out of an ISP.  Have you looked into using MSDE 2000 and distributing it to...

  • RE: Complex query problem

    I wonder if it would better to process this outside of SQL Server.

    It sounds like you are trying to incorporate too much middle tier business logic into you database.  

  • RE: Scramble Production Data for testing purposes

    SQL Server allows data sent between the client and the server to be encrypted. This ensures that any application or user intercepting the data packets on the network cannot view...

  • RE: Convert from US dollar to UK pounds

    ****Edited by Steve Jones*****

    The previous comment was unprofessional and I have removed it.

    Steve Jones

    ****Edited by Steve Jones****

  • RE: Increment Field Value Automatically

    There will be five individuals inserting data into the table.  Each entry should automatically display the next increment number available for input.  No user will have their own sequence of...

  • RE: Web Application Languages

    It's not supposed to be fun.  That's why they call it a job.

  • RE: Frustrated by SYNTAX ERROR

    I don't want to over simplify this but you may want to use EXISTS.

    CREATE PROCEDURE [usp_CheckSecureLogin]

    @UserName nvarchar(15),

    @Password nvarchar(15),

    @retval  int  OUTPUT

    AS

     IF EXISTS(SELECT * FROM Passwords WHERE (UserName = @UserName) AND (Password =...

Viewing 15 posts - 16 through 30 (of 30 total)