Forum Replies Created

Viewing 15 posts - 26,206 through 26,220 (of 26,487 total)

  • RE: how do I calculate a % between dts question

    You ar doing integer division, so you will always get 0.  Try this:

    cast(datediff(dd, start_date, getdate()) as decimal)/cast(datediff(dd, start_date, end_date) as decimal)

  • RE: Backup Exec will not truncate log files?

    I am not using Backup Exec, however, if you are only doing full backups, and the database is in Full Recovery, Bullk Logged modes, your transaction log will continue grow. ...

  • RE: wildcard date time format

    Okay, I stand corrected.  I just never ran into a problem using yyyy-mm-dd format.

  • RE: wildcard date time format

    Problem is your convert statement, should be:

    CONVERT(datetime, '2/8/2007')

    If you are using a datetime in string format, you really should code it this way: 'yyyy-mm-dd'

    This will work regardless of the dateformat...

  • RE: index once with 2 keys or have 2 indexes with each key ? Confused

    It depends.  Not what you wanted to here is it?  How you index a table depends on how it will be queried.  If all queries are either by Company_ID only...

  • RE: Complicated Sort

    The identity field of the temp table is the sortkey.  The data is inserted in the required sort order for each sort requirement.  The sort by the sort key after...

  • RE: trigger problem

    Just create a job that does what you want and schedule it to run when you need it.

    No need for all the rest.

  • RE: Help with query

    Actually, not having put any test code together, I didn't think of making sure about only selecting disinct Customer Id's.  I just looked at what it would take to create...

  • RE: Help with query

    Try something like this using a derived table:

    select

        dt.PossibleDate,

        dt.CustomerId,

        or.WeekDate,

        or.OrderQty

    from

        (select

            pd.PossibleDate,

            o.CustomerId

         from

            dbo.tblPossibleDates pd

            cross join dbo.tblOrders o) dt

        left outer join dbo.tblOrders or

            on (dt.PossibleDate...

  • RE: Restricting builtin/admin group

    Before deleting the builtin\Administrators group, be sure you have at least 2 if not 3 alternative ways to login to your SQL Server instance with sys admin privledges, and that...

  • RE: Complicated Sort

    Try something like this:

    create table dbo.MyTable (

        Account varchar(10),

        Amount money,

        Code int

        )

    go

    --Acct Amount Code

    insert into dbo.MyTable(Account, Amount, Code) values ('1',100,1)

    insert into dbo.MyTable(Account, Amount, Code) values ('2',200,1)

    insert into dbo.MyTable(Account,...

  • RE: trigger problem

    Does sound like you need a trigger, but a scheduled job to accomplish a specifc task or set of tasks.  Triggers are fired on a table in response to an...

  • RE: Multiple Client DBs and Multiple Instances

    Not sure I would go that way, especially with SQL Server 2005.  You could go this direction: A "single database", partitioning the databased on the unique customer id.  To enhance...

  • RE: 64Bit/8-dDualCore Hyperthread Processors/164gigs RAM

    You don't need the AWE on 64-bit machines running the 64-bit versions of the OS and SQL.  As for how to assign the processors, don't know.  My 64-bit machines ar...

  • RE: user Databases not accessible to non-sa logins

    The only other thing I can think of is deleting the servers from SSMS and register them with his username and password.  It sounds like a permissions issue with SQL. ...

Viewing 15 posts - 26,206 through 26,220 (of 26,487 total)