Forum Replies Created

Viewing 15 posts - 8,866 through 8,880 (of 13,460 total)

  • RE: How to Find "include columns"

    doh the script i posted was coded for tempdb specifically, this will work in any old database:

    SELECT

    SCH.schema_id, SCH.[name] AS schema_name,

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to Find "include columns"

    Bhuvnesh (8/26/2010)


    @lowell

    i am not able to see the required "include column" . i can only see the system related info.

    run my script against any database; look at the column...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: BULK INSERT a file produced from a UNIX machine - SQL 2005

    for files originating from unix, i've always used ROWTERMINATOR = '\r' ({slash r} if the forum doesn't like to print it),

    otherwise regualr PC files get {slash n}

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to Find "include columns"

    sys.index_columns has a 0/1 column named is_included_column;

    here's a script example that pulls some of that info out into a comma delimited list that i use for scripting out indexes:

    SELECT ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Quickest way to get SQL 2000 database up and running on SQL 2008.

    also if you don't actually turn off the original satellite servers, change all the databases to read only on the old servers the moment you switch over;

    it will help...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: best way to insert imported data?

    loki1049 (8/25/2010)


    Lowell, are you saying that you would join your imported data to a view to get the appropriate values, and then place it into the staging table?

    what i...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Missing sequence number

    you need to do two things;

    you'll need a Tally Table so you have all the possible values for your comparison;

    second , you have to get your data into a table,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Primary key on City Table

    dtopicdragovic (8/25/2010)


    Therefore, I guess for Countries Table if I have just a column CountryName I can set it as Primary Key. I don't need to create a new field CountryID....

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Primary key on City Table

    my table is similar, where we have an ID, cityname,state;, witht he PK being on the identity column ID, but with a unique constraint on cityname,state; at least in the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Copy database with a backup/Restore script

    one of the options when you do a full backup is the "Copy Only Backup" command, which allows you to take a full backup without disrupting the existing trnasaction/differential backups...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: best way to insert imported data?

    i know SSIS is built for this, but I always end up using what i know well...like you suggest, i do it the way you describe: bulk insert into a...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: linked server in trigger

    i believe the error you are seeing is because the service MSDTC (Distributed Transaction Coordinator)

    must be running on both servers in order to support the cross instance transaction; you'll need...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: update table statement

    low hanging fruit, my friend; so easy i couldn't resist 😀

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: update table statement

    looks like all you are missing is the FROM clause:

    update ct_user

    set dbo.nt_name = [ct_users1$]._nt_name

    FROM [ct_users1$]

    where dbo.ct_user.name = dbo.[ct_users1$]._staffName

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to search across all SQL Instances

    i've done something similar two differnet ways; i ended up making an application because i had more control;

    you can get a list of servers several ways, form osql to using...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 8,866 through 8,880 (of 13,460 total)