Forum Replies Created

Viewing 15 posts - 661 through 675 (of 907 total)

  • RE: Simple recovery model

    I came up with the number by taking 70% of the size you said the log was. I'm guessing your transaction log is full beyond the 70% range.

    I would...

  • RE: running totals

    Have you looked at the ROLLUP command. Here is a sample query that display sub_totals and grand_total:

    use pubs

    select

    case when stor_id is not null and...

  • RE: Simple recovery model

    It is my understanding that setting the database to a simple recovery model does the following:

    It will try to truncation the unused portions of the transaction log every time a...

  • RE: Rename a Column

    you can use the following views to get some of it:

    INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE

    INFORMATION_SCHEMA.KEY_COLUMN_USAGE

    INFORMATION_SCHEMA.VIEW_COLUMN_USAGE

    I suppose you could also use something like:

    select object_name(id) from syscomments where text like '%<column_name>%'

    to find the stored procedures and...

  • RE: Northwind

    We have dropped it from our production environment, although we leave it in our test environment, so new programmers can use some of the BOL examples. Also have dropped...

  • RE: Simple Stored Proc

    Sorry for the blank post, possibly this might also work:

    select cast(a.numberoforders%10*10 as char(3)) + '-' + cast((1+a.numberoforders%10)*10 as char(3)), count(*) from

    (SELECT count(*) numberoforders, customerid from orders

    group by customerid)...

  • RE: Simple Stored Proc

    Sorry for the blank post, possibly this might also work:

    select cast(a.numberoforders%10*10 as char(3)) + '-' + cast((1+a.numberoforders%10)*10 as char(3)), count(*) from

    (SELECT count(*) numberoforders, customerid from orders

    group by customerid)...

  • RE: Simple Stored Proc

    quote:


    Try this

    SELECT cast(OrderBand *10 as varchar(3)) + '-' + cast(OrderBand * 10 + 9 as varchar(3)) "No of Orders", countOfCustomers...

  • RE: sp_executesql PROBLEM

    -- might try this, althouhg I suppose you might want to support many more than 3 8000

    -- character strings, possibly you could dynamically build the number of strings needed.

    --...

  • RE: sp_executesql PROBLEM

    Never had that problem, but might try one of these two options. Hope this helps:

    -- MIGHT TRY SOMETHING LIKE THIS

    declare @x varchar(8000)

    set @x = 'SELECT ''Place string longer than...

  • RE: Number to Text?

    Check this script out:

    http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=259

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Directory/File Permissions

    Sounds like a reasonable thing. Seems like the SQL install could handle this, but does not. One more manual step when configuring a box I guess.

    Gregory Larsen, DBA

    If...

  • RE: Directory/File Permissions

    This probably should read "Full Control to everyone" every place it says "Full Control".

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Uploading Objects

    In our shop the DBA's make all changes to the production objects. We don't let programmers make changes. This allows us to control the production environment. ...

  • RE: SQL is not equal to () comparison on fields

    Try something like this:

    SELECT DISTINCT dbo.TM1.ID, dbo.TM1.ROLLUP, dbo.TM1.Brand

    FROM dbo.TM1

    left outer JOIN dbo.Monty ON dbo.TM1.Brand = dbo.Monty.brand

    where dbo.monty.Brand is null

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my...

Viewing 15 posts - 661 through 675 (of 907 total)