Forum Replies Created

Viewing 15 posts - 12,751 through 12,765 (of 13,460 total)

  • RE: Identity Column

    you'll want to do the following:

    do this on test first, and not production. I'm recommending using Enterprise manager for part of this, because it will handle a lot of 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: selecting all index info

    I had previously written a script that does exactly that...build sthe commands: try this out:

    Results:
    CREATE  UNIQUE             INDEX [UQPRJEXC]                    ON [GMPRJEXC]            (PRJTBLKEY,GMSFEXCTBLKEY) WITH...

    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: selecting all index info

    not 100% sure that this is what you want, but this is pretty close: limiting to top 100 because this can be a whopper of a resultset.

    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: Validating a directory on the SQL server

    there are several scripts in the scripts section that do this:

    i searched "directory exists"

    Verify Directory Exists and Create if Necessary

    http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1463

    therre are several others as well:

    ScriptsRatingSearch...

    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: triggering a view filtered by getdate()

    don't try and find the items that are no longer in the view....create the OPPOSITE of the view, and have a schedule job email you or something for every item...

    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 Task - Where Does The First Row Begin

    i typically bulk insert EVERYTHING into a staging table, and then in the staging table i would Select * from the column where column not (like HEDR%') and not like...

    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: Create one database, or several?

    On the other hand, if the applications are even slightly related, there's an advantage to having a single, unified schema though...ease of deployment and maintenance, because you need to support...

    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: query tuning

    structure wise, if you were to change it all to inner joins, the execution plans would be the same, so there's no speed difference...

    i think this is functionally the same...

    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: Random numbers generation SP

    here's an example of random letters:

    select ' C7116A-'

    + char(65 + convert(int, 25 * Rand() + 1 ))

    + char(65 + convert(int, 25 * Rand() + 1 ))

    + char(65 + convert(int,...

    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: Random numbers generation SP

    it sounds like you need just a random number of a fixed length, which you are appending to the first 6 fixed characters.

    you already identified that a random number does...

    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: query tuning

    a single query isn't too hard to diagnose, but rather than give specific suggestions, let me give you some general hints i think might help.

    the key is to test 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: How to setup Parent>>Child>>Child relationship...?

    yes i meant that you had a choice on the naming of a foreign key;

    you can leave the CONSTRAINT CONSTRAINTNAME portion off, and SQL will automatically give it a unique...

    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 setup Parent>>Child>>Child relationship...?

    here's my suggestions:

    I've added foreign keys to your script im bold below. I've always been taught it's good practice to have the Identity to be the first column of 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: Char vs Date comparision...convert(varchar(10),task_date,101) >= convert(varchar(10),GetDate(),101) vs task_date > GetDate()

    i encountered this issue similarly when sorting a  formatted date in a grid; because it is text, it would sour by month, so all the 01/01/200X are together, followed by...

    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: speed up this query?

    John thanks for taking the time to explain how UK postal codes work;

    I've only being only exposed to US postal codes, which are all numeric but can have preceeding...

    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 - 12,751 through 12,765 (of 13,460 total)