Forum Replies Created

Viewing 15 posts - 13,126 through 13,140 (of 13,469 total)

  • RE: Get database name for a particular user

    here's noeld's script witht he username pulled out as a parameter:in my example the username is 'hds'; i don't know how this will work for NT logins.

    declare @cmd varchar(300)

    declare...

  • RE: I don''''t understand this serror:

    you've got to look at the vb6 code; the issue is that you are referencing an object that hasn't been initialized; for example, if you create an ADODB.Connection but forgot...

  • RE: Copy Table to Different DB

    here's an idea pending better definition of the WHERE statement: note that everything would be in foreign key hierachy as described previously.

    this assumes that the foreign key column name is...

  • RE: Copy Table to Different DB

    i've got a decent idea how to do this, but what is your filter criteria?

    i assume it is sometable.columname in(1,2,3) or sometable.columname  < 3000 or something, and you want to...

  • RE: Get No. of times a colum of a table appears in another table.

    the DDL helps a lot, in this case i think i'd need row values to extrapolate this correctly.

     

    i think this group by statement would give you the question as well...

  • RE: Errortrap in sp

    error trapping in TSQL is pretty limited;

    if an error is level 16 or above(foreign key constraint violations, primary key, etc), they raise an error that cannot be trapped in TSQL,...

  • RE: Copy Table to Different DB

    there is a stored procedure you can use to get all the tablenames in hierarchy order.

    here's an example:

    create table #tuser (type int, oname varchar(517), owner varchar(517), seq int)

    insert #tuser exec...

  • RE: How do I query to separate tables?

    you can do it in a single with something like this:

    declare @somekey int

    set @somekey=1

    if exists(select * from ItemTableOne  where someval=@somekey)

    select * from ItemTableOne  where someval=@somekey

    else

    select...

  • RE: Urgent:search for a key word.

    nothing predefined, but you can easily take Tyson's example and create a stored proc witht eh same code.

  • RE: if I change web.config after deployment do I have to recompile the project

    if you change a .config file or .aspx, no recompilation is needed. if you change a .vb file, then yess you have to recompile.

  • RE: Multi-part identifier could not be bound

    i'm guessing table joining and reserved word issues here?

    does this look a little better?

    SELECT ICDCODE FROM DIAGS

    INNER JOIN [PROCEDURE] ON  DIAGS.DIAGID = Procedure.DIAGID

  • RE: SQL Manager Troubles

    i think the issue is permissions. the user running the app does not have write permissions to HKey LocalMachine;

    When you type in an instance in the SQL manager, it tries...

  • RE: Re-write trigger to handle multiple rows

    I think something like this will work for you:

    CREATE TRIGGER InsPeriods ON dbo.table2

    FOR INSERT

    AS

    insert into dbo.table3 (itemID, installment, periodvalue, paymentdate)

    select

      INSERTED.itemID,

      INSERTED.installment,

      --avoid division by zero or...

  • RE: How should databases be named

    there's no good reason to limit yourself to 8 characters on the name of the database. just because that was the limit in older systems, doesn't mean you should handicap...

  • RE: database security

    who owns the data? doesn't the company you deploy to own the data in the database?

    We have a very similar situation...we provide a blank database with default values, and...

Viewing 15 posts - 13,126 through 13,140 (of 13,469 total)