Forum Replies Created

Viewing 15 posts - 2,326 through 2,340 (of 3,678 total)

  • RE: Stored procedure security

    If you keep your stored procedures as scripts then you can use SQLCMD to run those scripts and pass in a variable to append to the CREATE PROC statement.

    That variable...

  • RE: Help in Tuning the Query

    I suspect that your condition

    ltrim(rtrim(E.acc_typ))+'/'+rtrim(ltrim(E.acc_no)) = ltrim(rtrim(D.autopay_acid))

    could be modified.

    If the application that writes into autopay_acid LTRIMed and RTRIMed the data then the query may be able to use any indices...

  • RE: Hot to find max and min values

    SELECT
       YT.Cash_Locale ,
       YT.Cash_WTD ,
       YT.Cash_PTD ,
       YT.Cash_Daily ,
       DT.MaxCashWTD ,
       DT.MinCashWTD ,
    
     ...etc
    
    FROM dbo.YourTable AS YT, (
    ...
  • RE: Placing Log/Data files, can i compromise ?

    I am not a SAN expert but my understanding is that it depends how your SAN is organised.

    My understanding is that RAID5 is slow for writing (because of its striping...

  • RE: How To use while loop without using a cursor

    DECLARE @NextAccount INT
    SET @NextAccount=0
    
    WHILE @NextAccount IS NOT NULL
        BEGIN
            SELECT @NextAccount=MIN(acct)
            FROM dbo.YourTable
    ...
  • RE: Trying To Document Database

    Save yourself months of work and buy Apex SQLDoc or Innovasys DocumentX.

    I spent 4 months documenting a huge database and then found out that DocumentX could do it in under...

  • RE: Similar to Csng function

    CAST(YourField AS YourDataType)

    YourDataType could be REAL, FLOAT, DECIMAL etc.

  • RE: 15 million rows and growing, so do the problem

    So the client wants a system that gains an extra 5,000 pages per week and at present has 1.5 million pages of records which they insist that they will page...

  • RE: Views VS. Tables

    I think the point with "never look onto tables directly" is that if you give read access to the table then someone can decide what they want to read from...

  • RE: Deadlocking on Deletion Process

    It sounds as if SQL Server is escalating the locks from ROWLOCK to PAGELOCK.

  • RE: Efficiency of IN vs. other ways to filter rows

    Sometimes an EXISTS clause can give the desired results.

    Let us suppose that we have a sales territory broken down into

    Country - > Region - > Area.

    The marketing dept are forever...

  • RE: How to delete ldf ??

    You should not delete the LDF file.

    BACKUP LOG (your db name) WITH TRUNCATEONLY

    Then run sp_helpdb for your database to get the name of the devices within the database.

    DBCC SHRINKFILE (the...

  • RE: Cannot support Managed Code ? what is this ?

    You have to tell SQL2005 that it can use the CLR using the surface area configuration tool

  • RE: Cbyte Function

    CAST(YourField AS TINYINT)

    or

    CONVERT(TINYINT,YourField)

    Byte can hold values from 0 to 255 so the SQL Server equivalent is TINYINT

    SMALLINT is a signed 16 bit integer -32768 to 32767

    INT is a signed 32...

  • RE: View is rounding down results

    SELECT SUM( 
       CAST(weight * points AS DECIMAL(10,2))
       / CAST(100.00 AS DECIMAL(10,2))
    )
    

Viewing 15 posts - 2,326 through 2,340 (of 3,678 total)