Forum Replies Created

Viewing 15 posts - 13,141 through 13,155 (of 13,469 total)

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

  • RE: How to list allcolumn names and their data types from a view?

    you might also want to look at some of the built in views;INFORMATION_SCHEMA has a lot of nice data.

    in my database, all my views start with VW_; change your WHERE...

  • RE: Cursor or not

    unless you need to handle the @@IDENTITY /SCOPE_IDENTITY() to insert into child records after you insert into a parent table, there's no real need to use the cursor in your...

  • RE: Table names involved in a CONSTRAINT

    here's a version that i use; it includes the alter table add constraint format as well, in case you were readding them to your database or whatever.

    select

    sysobjects.name as fkname1,...

Viewing 15 posts - 13,141 through 13,155 (of 13,469 total)