Forum Replies Created

Viewing 15 posts - 10,891 through 10,905 (of 13,460 total)

  • RE: script for getting all the server job details

    there is a scripts section here on SSC with literally thousands of script contributions.

    you can use the search feature in the upper right corner of this page...

    i used it to...

    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: getdate()

    the default value for a column is used only if the column was not referenced in the insert.

    if you include the column and it's value in the insert, the default...

    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 flag on table 1 based on values in table 2

    doh i did not know using SSIS was a requirement....sorry...

    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 flag on table 1 based on values in table 2

    here's how i did it:

    i created a userdefined function that evaluates the three temperature types, and used a Calculated column fo rthe "flag" field.

    Note I changed a few table and...

    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: Understanding RAISERROR

    Elliott (7/2/2009)


    Following the execution of the raiserror sproc you should look at @@ERROR

    It would look like this:

    IF ( @@ERROR = 0 )

    BEGIN

    EXEC SPMy_wrapper_insert

    END

    CEWII

    that is the advantage of SET XACT_ABORT...

    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: Understanding RAISERROR

    i think if you want code to stop on an error, you want to use SET XACT_ABORT ON and use a transaction...in that situation, when an error is raised, execution...

    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: Insert Query

    Just as Dave said,

    that's what is a main difference between any database system and a flat file/excel spreadsheet.

    SQL Server, or any other DataBase Management System, does not guarantee the order...

    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: islowercase

    sarvesh singh (7/2/2009)


    Try this

    select * from customer where upper(surname) surname

    that won't work the way you think, unless the database you are using is using case sensitive collation...you've got to...

    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: Need Help for a procedure

    your explanation is too abstract...you did not clearly define the matrix and the possible values(at least for me), nor the actual format of the data that will come from 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: SQL TRACE

    here's the proc I use to create the trace I use; note that it creates a view at the end so I can also see the results easily.

    this runs till...

    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: Diff date formats in single column

    i assume you have them stored in a varchar column instead of in a datetime column?

    ideally, everything should be the datetime datatype...

    can you rebuild the table, and set 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: How to add a New Row in between the existing rows in a Table using SQL SERVER Mangement Studio

    that's what is a main difference between any database system and a flat file/excel spreadsheet.

    SQL server, or any other DataBase Management System, does not guarantee the order of the data...

    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: Triggers - Database to Database

    Like Roshan said, the INSERTED virtual table makes both your triggers cleaner and easier to read;

    note how your trigger would not work if multiple rows get inserted...it would only move...

    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: Showing column as decimal in select

    it's the shortcut SQL uses for data types; integer divided by integer yields an integer result.

    multiply either the numerator or denominator by 1.0 and you'll get your 0.17

    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: Replacing misspellings in a string

    lk (6/30/2009)


    Hi, Lowell:

    Thank you--this will save me a lot of typing! I also enjoyed your use of the word "doink" in your comments. 😛 This is very much appreciated!

    your welcome!

    it...

    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 - 10,891 through 10,905 (of 13,460 total)