Forum Replies Created

Viewing 15 posts - 13,186 through 13,200 (of 13,445 total)

  • RE: Update row values on insert

    two ways to tackle this: a computed column is my suggestion, but you can use a trigger if you want to:

    create table xample(xid int identity(1,1) not null primary key,

    rateofpay money,

    bonuspay...

  • RE: Random varchar function exposed?

    actually, I was sitting around playing with a schema generator program, and because i had too much time on my hands, I wondered if whatever SQL uses was exposed or...

  • RE: Enterprise Manager - SQL Server Registration script

    if EM was open when you imported the key, the changes would not show up...whem EM closes, it overwrites the keys with it's running configuration....

    you need to make sure EM...

  • RE: Enterprise Manager - SQL Server Registration script

    i guess i'm confused a bit.... this works perfectly on my machine; let me explain a bit:

    enterprise manager looks on the local machine for the key we exported....

    so when i...

  • RE: Enterprise Manager - SQL Server Registration script

    register your servers, and then call regedit.

    browse to this key:

    [HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\80\Tools\SQLEW\Registered Servers X\SQL Server Group]

    you'll see all the servers you registered; simply export that key.

    to test, delete the key...

  • RE: TOP with parameter

    while TOP doesn't allow a variable in SQL2000(but does in 2005) you can use rowcount instead for the same results:

    drop procedure pr_search

    create procedure pr_search(@limit int=0)

    as

    --rowcount of 0 = all,

    --rowcount of...

  • RE: Triggers

    and here's another method that i use myself; i need to find all trigers and their trigger body if it exists:

    select parent_objects.name,  

      trigger_sysobjects.name,  

      syscomments.text  

      FROM sysobjects trigger_sysobjects  ...

  • RE: How to use variable table name and field name in select command

    if you need to know the maximum possible length of all the text fields, you could use this, whihc does not use a cursor:

    select sysobjects.name as TableName,

    sum(syscolumns.length) as LenOfTextFields

    from sysobjects

    inner...

  • RE: creating a copy of a table programmatically

    views ,functions and procs are easy:

    sp_helptext viewname

    sp_helptext functionname

    sp_helptext procedurename

    gives you the DDL for the view, or the text of the function/proc:

     

  • RE: Table insert issue ( Only once in a while)

    He didn't specifically mention any errors, so i jumped to the conclusion tha that it must be a hardware issue;Kory is right, are you getting any errors back before we...

  • RE: creating a copy of a table programmatically

    this copies the basic structure, but it doesn't copy foreign keys, column defaults, check constraints, etc.

    there are several scripts here on SSC that can programatically export the structure of a...

  • RE: Table insert issue ( Only once in a while)

    could this be related to an index with a high fill factor? if an index is created with a high fill factor, say 90%, but you have a lot of...

  • RE: Help with Bulk Insert Error

    am i wrong, or is this just a simple file does not exist error?

    i realize you probably changed some values for the example, but is there really a \\server1?

    in...

  • RE: Adding column with Identity

    i bet he wants the column in a specific location for this reason:

    in our shop, business rules state the PK columns are always the first columns of the table;

    if the...

  • RE: ReMapping Windows account Login SIDs on Standalone server

    this might help you out:

    replace NTDomain** with your real domain name, otherwise domain users will not be fixed, only SQL login users.

    the sid for sa /dbo on all machines everywhere...

Viewing 15 posts - 13,186 through 13,200 (of 13,445 total)