Forum Replies Created

Viewing 15 posts - 2,431 through 2,445 (of 4,080 total)

  • RE: Dates of the month

    Just to keep this clear for the newcomers. A "numbers" table and a "tally" table are the same thing.

    But "Tally Table" is much more...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Dates Issues

    The proper way to do an insert with a cte is like this:

    ;with cte (a,b,c) as (select whatever)

    insert into #temp (x,y,z)

    select a,b,c from cte

    -- or

    ;with cte (a,b,c) as (select...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Linked Server Error

    Can multiple copies of this procedure run at the same time? Perhaps when two users are logging at once?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Linked Server Error

    Please post the procedure with a copy-and-paste, instead of typing?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Raising Error from Procedure

    Three comments.

    1. Get in the habit of first storing @@ROWCOUNT in an integer variable. ( I use @rc. ) Do this to preserve the value...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Linked Server Error

    EXEC sp_dropserver @server=ServerName'', @droplogins='droplogins';

    That's not even going to run. You'll get a syntax error because the quotes are in the wrong place.

    What line does it say...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: comparing 2 tables columns if they match or not?

    Duplicate post. Reply here.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: comparing 2 tables columns if they match or not

    Please post your exact query, and the actual data you are running.

    (1) We need to know what columns you are joining ON. Row 1 in both...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Stored Procedure to format various Address Types?

    No problem, Baz. Glad I could help.

    Fortunately, there is a ton of material online. SSC has lots of articles published here, MSDN is...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: IF condition in CURSOR

    Jeff... my wife was just reading over my shoulder at your mirror text... she said (and I quote)....

    OMG... WTF... How do you do that without having a seizure?

    Then she stormed...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Stored Procedure to format various Address Types?

    Here's the example of a stored procedure that concatenates the addresses and puts them into a target table. Obviously you would use your own code with permanent target...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Stored Procedure to format various Address Types?

    Okay... one example at a time. Here I'm going to add a computed column. (I'm sorry for saying "calculated" in previous posts. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Dates Issues

    Use the CONVERT function instead of CAST.

    declare @datestring varchar(10)

    set @datestring = '04/08/00'

    select CONVERT(datetime,@datestring,3)

    result = 2000-08-04 00:00:00.000

    Look up the date styles table under CONVERT in books online. If...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: IF condition in CURSOR

    Sudhanva,

    Please do not think for a moment that we are making fun of you personally. Obviously, those of us who volunteer to help others have a...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: IF condition in CURSOR

    I hope Jeff never sees this thread...

    You mean Cardinal Moden of the SQL Inquisition? :w00t::w00t::w00t:

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 2,431 through 2,445 (of 4,080 total)