Forum Replies Created

Viewing 15 posts - 2,146 through 2,160 (of 4,080 total)

  • RE: MS SQL alternative to SUBSTRING_INDEX

    The following code could be incorporated into a stored procedure, user defined function, or an inline table valued function.

    declare @input varchar(max)

    declare @count int

    set @count = 5

    set @input = 'The skilful...

    __________________________________________________

    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 - Update Query Not Working

    If PREMPL table is large, I'd bring the employee master data over. But you said your join was running acceptably fast?

    SELECT convert(int,Empno) as Empno, other columns.....

    INTO #Employee_Master

    FROM SQLSERVER.SourceDatabase.dbo.Employee_Master...

    __________________________________________________

    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: Looking for Input on Use of WHILE Loop In Job Step

    Exactly. In the current loop, if the download fails for a particular db, we just log the error and move on to the next in the list. ...

    __________________________________________________

    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: Are the posted questions getting worse?

    Emperor Paulpatine,

    XML makes db design much simpler too:

    create table XMLTable (ID bigint, Data xml)

    __________________________________________________

    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: Looking for Input on Use of WHILE Loop In Job Step

    If something breaks in the middle of a loop, how is it different from breaking in the middle of one long sequential job with multiple steps? Either...

    __________________________________________________

    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: Looking for Input on Use of WHILE Loop In Job Step

    Steve, if I'm going to loop at all, I do a WHILE because I'm told it's bad to leave a cursor open if anything breaks. No danger of...

    __________________________________________________

    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: Looking for Input on Use of WHILE Loop In Job Step

    I do that when building batch tests of stored procedures, Jeff, but a WHILE loop through a table of 20 or so rows is going to run fast enough that...

    __________________________________________________

    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: Need help with a query to concatenate records

    A quick trick I stored in my cookbook.

    I think I originally got it from one of Jeff's articles on concatenation.

    declare @sample table (ID int, PID int, FILE_NO...

    __________________________________________________

    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: EAV Model

    I was looking for "MUCK"[/url] to be an option.

    "Open Schema" makes it sound like a legitimate approach to database design.

    __________________________________________________

    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: Multi/Nested CONVERT's

    Just for fun. 🙂

    select dateadd(ss,1296001,dateadd(month,datediff(month,0,getdate())-1,0))

    Classic first day of previous month plus seconds equal to 15*24*60*60+1.

    __________________________________________________

    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: Looking for Input on Use of WHILE Loop In Job Step

    We have stored procedures somewhat similar in nature that pull data from a number of similar databases into a single database. They are driven by a while loop...

    __________________________________________________

    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: Are the posted questions getting worse?

    No accountants, how about statisticians?

    __________________________________________________

    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: Are the posted questions getting worse?

    Good luck, man.

    __________________________________________________

    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: Are the posted questions getting worse?

    Can you get a GMAIL account and use Google authentication, Roy?

    Wayne, can you at least take escalate this within your organization to say the quality of the work that has...

    __________________________________________________

    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: How to get the rest of top 5 records?

    You're welcome. This was a valuable learning experience for me.

    Just in case anyone is curious. There is a follow-up discussion posted 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

Viewing 15 posts - 2,146 through 2,160 (of 4,080 total)