Forum Replies Created

Viewing 15 posts - 811 through 825 (of 1,346 total)

  • RE: OH MY!

    It appears your missing an else Bolded below.

    Hint Indent your code for readability.

    ALTER PROCEDURE My_First_Transaction

     @FirstName varchar (50),

     @LastName varchar (50)

    AS

    BEGIN TRANSACTION

      INSERT INTO Employees (FirstName, LastName) VALUES (@FirstName,@LastName)

      IF @@ERROR =...

  • RE: Denormalizing Data

    First Try not to use a crusor.

    Put it in a function

    There are several examples on this site.

    --Creating a test table with some test data

    create table TestTable ( char(4), String...

  • RE: fn_trace_gettable error

    I don't know are you sure the value in the parameter @cFileName is correct?

     

  • RE: Better way to check for value

    The trigger works?

    This Looks a little funky

    if (SELECT TOP 1 accountno FROM deleted) in (SELECT  accountno from Contact1)

    try

    if exists (select * from Contact1 join deleted on Contact1.accountno = deleted.accountno)

    Begin

         ...

  • RE: DATEPART(quarter, DISCONTINUEDDATE) AS Quarter

    I'm a little confused on what your trying to do here.

     

    *** Select items

    SELECT DISCONTINUEDDATE,Q1,Q2,Q3,Q4,

    Is this how your final query needs to look?

    *** CREATE A FIELD CALLED SUNSET...

  • RE: Transaction Log will not shrink...

    About the only thing I can think of is an open transaction.

    shrinkfile pertains to the log also.

    the shrinking of the log file usually only takes the "Free" contiguous pages at...

  • RE: Which object is it?

    tough to say.

    Are you in the correct database when you manually execute statement

    select object_Name(750065858)

    Are you the dbo in the database, or SA on the server, it could be possible the...

  • RE: audit logout event class in sql profiler. LONG RUNNING!!!

    Don't know what the event is specifically addressing, but the duration is just the time.

    If the event is NOT taking server resources such as disk io, or CPU then I...

  • RE: Trigger problem

    Without your code, tables and data scenarios that do not work it will be difficult to help you.

    its probably a data scenario that your code does not account for.

    http://www.aspfaq.com/etiquette.asp?id=5006

  • RE: UNIQUE CONSTRAINTS & TRANSACTIONAL REPLICATION ??

    If you want to transactional replicate that table, you have to have a primary key defined. you cannot replicate with a unique constraint although symantically the same, sql server requires...

  • RE: Which object is it?

    if you run

    select object_name (750065858)

    and you get null, then there is no object with an id of 750065858

    to find the object id of a table use

    OBJECT_ID('Tablename')

     

  • RE: DBCC Commands

    Input for is a string

    if you do dbcc showcontig (objectowner.tablename) you get an error. But if you do

    dbcc showcontig ('objectowner.tablename') it should work.

    or you can do

    declare @TableID int

    select...

  • RE: Table Security

    The table is the lowest level. To avoind granting access directly thru a table permissions can be granted to stored procedures which can limit the amount of data viewed.

    Check it...

  • RE: help on this query!

    that is an update from clause

    some thing like this

    this will update every row in empower. Do you have more criteria to limit the # of rows to update?

    update A

    set fedref...

  • RE: Clustered Indexes and Disk Storage

    Sql server does not move 1 row from each page it does what is called a page split. It will move roughly half the rows on the first page to...

Viewing 15 posts - 811 through 825 (of 1,346 total)