Forum Replies Created

Viewing 15 posts - 376 through 390 (of 596 total)

  • RE: When To Use the Order By Clause

    The article is misleading. This is from BOL:

    SQL Server 6.x SQL Server 2000
    A SELECT statement without...
  • RE: having trouble with "^"

    Try:

    SELECT dbo.User_CIS.Installment_Total_Fee

           *

           Power(1 + (0.16 / dbo.User_CIS.Length_Installment), dbo.User_CIS.Length_Installment)

      FROM dbo.User_CIS

  • RE: DTS Import Error - Data Overflow - Date

    One more thing to note is that SET DATEFORMAT will only work if all dates in all columns are received in the same format. If some dates are represented textually...

  • RE: DTS Import Error - Data Overflow - Date

    Open EM

    Right click on the package name, and click Design Package.

    On the package design menu, click Task, then 5 Execute SQL Task.

    From the listbox labeled Existing Connection, select the connection number for...

  • RE: DTS Import Error - Data Overflow - Date

    What date format do you normally use?  MDY (month-day-year) or DMY (day-month-year) ?

    As AJ mentioned, it looks like you use MDY (so the date should be written 12/31/2099). To store...

  • RE: Copying database objects using scripts

    The main problem I have run into generating scripts from EM for the entire database is when nested objects exist. Take stored procedures, for example. EM does not generate the...

  • RE: SQL not returning qualifying rows

    Here's another way:

    SELECT TOP 10000

    ID,

    PersonID

    FROM

    CW_Applications

    WHERE StatusID = @StatusID

      AND DateOpened <= CASE

                          WHEN @DateOpened = NULL THEN DateOpened

                          ELSE @DateOpened

                        END

      AND (

              ...

  • RE: what does DBCC stand for?

    Actually, it used to mean Database Consistency Check, but in the SQL2K BOL, it looks like MS has changed the meaning.

    Even Microsoft's own knowledge base refers to the previous meaning is...

  • RE: trace update/delete in some table

    Maybe this example will give you some ideas:

    /*

    For each INSERT and UPDATE, log the following:

      1. sql statement

      2. hostname

      3. time: GETDATE()

      4. login name,

      5....

  • RE: DBCC DBREINDEX (table1, 80)

    How about this:

    EXEC sp_MSforeachtable "PRINT '?'  DBCC DBREINDEX ( 'yourDatabaseName.?' , '', 80 )"

  • RE: Timestamp Column

    1. rowversion is a SQL Server 2000 synonym for timestamp. Right now, they are the same, but in later versions of SQL Server, if you have DDL scripts that create /...

  • RE: urgent please

    Unless performance becomes a major problem, I'd go with a script instead of a trigger - I think its more managable.

    Using Noel's suggestion, something along these lines might do it:

  • RE: Need trigger to split 1 filed to 4

    Here is yet another way.

    --DROP TABLE SMS

    GO

    CREATE TABLE SMS

    (

      id int PRIMARY KEY IDENTITY(1,1)

    , message varchar(100) NOT NULL

    , part1 varchar(100) NULL

    , part2 varchar(100) NULL

    , part3 varchar(100) NULL

    , part4 varchar(100) NULL

    )

    GO

    CREATE...

  • RE: How to declare parameters for a stored procedure.

    I would change the order of the parameters like this:

    CREATE PROCEDURE missing_iconnt_data

    (

      @p_fromsalesdate datetime,

      @p_tosalesdate datetime,

      @p_sitecode int = NULL

    )

    That way, you can call the stored procedure this way:

    EXEC missing_iconnt_data...

Viewing 15 posts - 376 through 390 (of 596 total)