Forum Replies Created

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

  • 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...

  • RE: database security

    if you can't trust your system admin, you've got a flaw in your business;

    if he's making copies, tell him to stop and destroy and copies he has made. Sysadmins are...

  • RE: Dumping all users off a database

    here's another version of a cursor to kill users off of a database; i put this in the master database;

    syntax is sp_kill databasename and it will list the hostnames of...

  • RE: Problem creating Oracle sequence numbers within a SSIS (2005) package

    Walter i don't know if this helps. you might not have access to change the DDL on the oracle server.

    In my situation, i use a trigger to insert the sequence...

  • RE: discover all indexes in one DataBase

    ok here's an updated version that has all the cREATE INDEX statements in it; i could not figure out how to do it without a cursor, but this is more...

  • RE: discover all indexes in one DataBase

    hee's something i've been fiddling with; i still have to get hte column names for each index, but this finds all indexes i think; remove the top 100 for all...

  • RE: DISTINCT problem

    what happens if you run this query?

    select Distinct

    ContactID,

    LastName,

    FirstName,

    ActiveInd,

    ContactTypeDescription,

    ContactTypeID,

    OrganizationID,

    OrganizationName,

    City,

    State,

    HomePhone

    from

    (

    select Distinct (T_Contact.ContactID),

    LastName, FirstName, T_Contact.ActiveInd, ContactTypeDescription,

    T_ContactType.ContactTypeID, T_Organization.OrganizationID, OrganizationName,

    City, State, HomePhone

    from

    T_Contact

    join T_ContactTypeContact on T_Contact.ContactID =...

  • RE: sysindexes STATISTICS and INDEXES

    Hi Dave;

    I think the value you are looking for is STATUS & 64=0 means index, STATUS & 64 <> 0 means statistics:

    hope this helps: examples:

    select  top 100 object_name(I.id) as...

  • RE: Extracting a specific word???

    yet another thought: if you have the zipcode you could just look up the city and state from a separate table and ignore parsing the addr field ...plenty of free...

  • RE: Extracting a specific word???

    here's a couple of other ideas that might help:

    if we can assume that single-word city/towns have all address elements, so there is always 4 spaces in the document,something like this...

  • RE: developing Import export utility

    your program would simply call the TSQL commands for backup and restore via TSQL;

    Get the list of databases that could be backed up:

    SELECT * FROM master.dbo.sysdatabases; that has the name...

  • RE: Extracting a specific word???

    here's a little bit of help. since you cannot determine whether a cityname has 1,2, or more words, i can't see of any way to not do at least a...

  • RE: Password reset for more than 100 users

    --in Theory, this would generate thecode to reset all SQL Logins to a default password

    declare

    @isql varchar(2000),

    @username varchar(64),

    @newpassword varchar(20)

    set @newpassword='dataaccess'

    declare c1 cursor for select name from sysusers

      where uid >...

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