Forum Replies Created

Viewing 15 posts - 35,866 through 35,880 (of 59,102 total)

  • RE: Need help writing the correct SQL

    Sergiy (11/28/2010)


    New tools make solutions more complex and less effective.

    😉

    Here how would it look with "classic" SQL:

    SELECT DocNo

    FROM #Docs QE

    WHERE LStatus = 'QE'

    ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Need to Delimiter from right to left

    sampathsoft (11/22/2010)


    Can you change this scenario from right to left .

    Thanks

    DECLARE @NextString NVARCHAR(40)

    DECLARE @Pos INT

    DECLARE @NextPos INT

    DECLARE @String NVARCHAR(40)

    DECLARE @Delimiter NVARCHAR(40)

    DECLARE @AddString NVARCHAR(50)

    --SET @String ='SQL,TUTORIALS'

    SET @String ='1.2.3 '

    SET @Delimiter...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Need to Delimiter from right to left

    Adi Cohn-120898 (11/22/2010)


    Not sure that I understood what you want. If I understood you correctly then this is the way to do it:

    DECLARE @NextString NVARCHAR(40)

    DECLARE @pos INT

    DECLARE @NextPos INT

    DECLARE...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: What is the difference between these two statements?

    Jason Norsworthy (11/28/2010)


    ... every constraint of every type will be named from now on.

    Thanks,

    Jason

    Just never name any constraint on a Temp Table or, like Craig said, you'll have some...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Setting up Database mail using gmail account

    sayfrend (4/7/2009)


    Try disabling your windows fire wall

    Don't do it for love nor money. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Do You Talk Salary in the Interview?

    TravisDBA (11/27/2010)


    Andy Warren (11/27/2010)


    This is one of the areas where having an agent, usally someone from a staffing company, makes a lot of sense, it shields you from having to...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Date format not working

    p.stevens76 (11/28/2010)


    Hi, many thanks for that, works fine.

    i now need to put something in place so that if the date is >= 30 mins ago then a stored proc...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: exec scope

    nadersam (11/28/2010)


    Thanks Gail,

    I appreciate your reply.

    But that means i have to rewrite the trigger code again 🙁 and so far i don't have other ideas on how to rewrite it.

    Thanks...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Date format not working

    p.stevens76 (11/28/2010)


    Hi

    can anyone tell me why when i run the following i get an error message. I need to be able to insert dates as yyyy-mm-dd hh:mm:ss.

    Many Thanks

    Create table mfSitPosition

    (

    sitPosition...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Searching stored procedure for table name but ignoring comments

    Here's what Steve means about "if they're up to date". This comes from Books Online under "sys.sql_dependencies"...

    [font="Arial Black"]Remarks[/font]

    Dependencies are established during CREATE only if the referenced (independent) entity exists...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Export/Import Task

    As a side bar, wouldn't a simple insert from one table to another work?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Export/Import Task

    sudhakara (11/25/2010)


    Hi,

    I am trying to copy the records from source server A to Destination server b by using the sql server task import/export wizard by using the query. While placing...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: open cursor takes long time

    Is it the cursor or the join? How long does it take to run the following?

    Select [Cmp],[App],[Cmd],[MsgID],[uid],[Date],[Sr],[Ct],[Rec],[E1],[Pr],[OP],[FDate],[R1],[U1],[CP],[Or],[udi2],[Se],[Se1],[Sp],[Cy],[Mt],[Ce],[Ida1],tblRec.Value

    From TempTable

    INNER JOIN tblRec ON TempTable.Rec = tblRec.Id

    Order By...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Searching stored procedure for table name but ignoring comments

    Wouldn't a search of dependencies tell you?

    {edit} Bad suggestion on my part. :blush: Like Steve says below, it's NOT 100% guaranteed. It's always worked for me in...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Database Standards Parsing

    ikjeft01 (11/27/2010)


    you are indeed lucky. NONE of the providers i've had to deal with can figure out how to pass UNformatted phone numbers! not to mention they often can't be...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 35,866 through 35,880 (of 59,102 total)