Forum Replies Created

Viewing 15 posts - 6,841 through 6,855 (of 13,469 total)

  • RE: how rollback works in sql server?

    just to confirm and expand on what Howard said...

    as soon as you change the ansi setting shown in my screenshot below, and in a new window...

    if you perform some updates...

  • RE: Can you Update Multiple Views in one go?

    you'll have to script each view out and issue teh ALTER VIEW statement for each;

    but you can use the metadata to find them and script them out from there:

    select *...

  • RE: SQL to return only rows that aren't distinct

    by are not distinct you mean duplicates?

    you can use row_number() function or group by...having count(*) > 1

    SELECT * FROM

    (select row_number() over (partition by ColumnList Order By ColumnList) AS RW,

    ColumnList...

  • RE: DB_Owner cannot insert

    jimmycjen (9/1/2011)


    Lowell,

    When I ran the (first) SQL statement in a specific database, for some reason, it doesn't show all the users.

    that might be normal, if domain users get their access...

  • RE: DB_Owner cannot insert

    well, it's one thing to *think* he ahs db_owner, and another one to check.

    run these queries in the database in question:

    select

    userz.name,

    userz.type_desc,

    decripz.name as _member_of_this_role

    from sys.database_principals userz

    inner join sys.database_role_members rolez

    on...

  • RE: Need t-sql script to backup a sql 2005 sp2 database with compression

    Express12 (9/1/2011)


    Need t-sql script to backup a sql 2005 sp2 database with compression.

    This is not working on SQL 2005:

    BACKUP DATABASE myDatabase TO DISK = 'C:\BackupFolder\myDatabase.BAK' WITH COMPRESSION

    compression was...

  • RE: DB_Owner cannot insert

    is there a trigger on the table that is inserting into an audit table somewhere? maybe it's permissions on the Triggers Audit table that the user has no permissions for.

  • RE: 2 Indexes in same columns, but the column order is different - Whats the difference?

    the order of the columns are important.

    i hate the pseudocode of col1,col2, so lets switch to a little more detailsed example.

    suppose you have an index like this:

    CREATE INDEX IX_OrdersTable ON...

  • RE: database mail error

    i'd say the issue's what you put for the mail server value..."could not connect to mail server." to me says that the url, say "mail.yourdomain.com is actually something else.

    it seems...

  • RE: Where Do You Park?

    there was a mornings worth of controversy on a local radio station in south florida this week on this subject...someone who had been working for a business for 14 years...

  • RE: how do I join these 3 updates into 1

    this is just a stab in the dark; i'm assuming the query you pasted was ok for Access,a nd also that access supports updates via a case statement...pretty reasonable guesses:

    UPDATE...

  • RE: how do I join these 3 updates into 1

    you can do it like this in SQL...i had to replace your MID functions witht eh SQL equivilents.

    this will definitely work for SLQ server, not sure if it works for...

  • RE: Using Intersect in a IF statement

    Blue Rabbit (8/31/2011)


    Lowell, your answer was spot on. I did want to update an extracted table if true. Your code worked perfectly, Thanks!

    woot! glad i could help! i...

  • RE: Using Intersect in a IF statement

    you were a little loose on the detaisl as to what flag you want to update...you might need to provide more detials.

    IF EXISTS can help i think:

    IF EXISTS(

    SELECT col1

    FROM...

  • RE: Get list of months, monthname and Year

    SELECT [year], [month], datename(month,dateadd(mm,[month] -1,DATEADD(yy, DATEDIFF(yy,0,[year] - 1900), 0)))

    FROM (

    SELECT 2005 AS [year] UNION ALL

    SELECT 2006 UNION ALL

    SELECT 2007 UNION ALL

    SELECT 2008 UNION ALL

    SELECT 2009 UNION...

Viewing 15 posts - 6,841 through 6,855 (of 13,469 total)