Forum Replies Created

Viewing 15 posts - 4,471 through 4,485 (of 5,678 total)

  • RE: Please help with SQL code

    On this portion:

    from NCV_BL_DHL_TEMP a

    INNER JOIN

    DHL_TRADE_ASSIGNMENT b

    on a.POL_COUNTRY_CD = ltrim(rtrim(substring(b.COUNTRY_CD,1,2)))

    INNER JOIN DHL_TRADE_ASSIGNMENT c

    on a.POD_COUNTRY_CD = ltrim(rtrim(substring(c.COUNTRY_CD,1,2)))

    You'll need your join code to handle the AND/OR switching you'll need to do.

    Please...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Interview

    I agree with the above, but in case you're not quite willing to spill your guts for whatever reason, for anyone else who's interested in these topics:

    vinodh247 (1/5/2011)


    1) Log shipping/Replication/Mirroring/Clustering-uses-steps...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Are the posted questions getting worse?

    Koen (da-zero) (1/5/2011)


    GilaMonster (1/5/2011)


    Koen (da-zero) (1/5/2011)


    I have never understood the fuzz about "division by zero". It is possible, it just doesn't return a normal number.

    However if you allow it,...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Violation of PRIMARY KEY constraint 'OHEM_PRIMARY'. Cannot insert duplicate key in object

    rizkhan92 (1/5/2011)


    Hi i have already seen the DDL on table SBO_Rehnuma.dbo.OHEM .

    But i couldn't found any answer related to this table OHEM..

    so please guide me what should i have to...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Please help with SQL code

    What I wish to accomplish is only display data for either FRN or FRS. If the country code begins with FR(France) in the POL_COUNTRY_CD or POD_COUNTRY_CD column in NCV_BL_DHL_TEMP table...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to search for a pattern of consecutive records?

    First, tertiusdp needs to be thanked for making consumable sample data.

    Now, for the code. I modified the sample data to remove the typo:

    IF OBJECT_ID('tempdb..#tbl1') IS NOT NULL

    DROP TABLE #tbl1

    IF...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Violation of PRIMARY KEY constraint 'OHEM_PRIMARY'. Cannot insert duplicate key in object

    violation is coming from this statement (it's the only insert/update):

    Insert Into SBO_Rehnuma.dbo.OHEM(empid,jobTitle,

    firstName,middleName,lastName,

    sex,dept,branch,

    workStreet,workBlock,workZip,workCountr,

    officeTel,mobile,homeTel,

    email,startDate,status,

    salary,termDate,

    bankCode,bankBranch,bankAcount,

    homeStreet,homeBlock,homeZip,

    homeCountr,birthDate,

    govID,U_JobTitle,U_EmpName,position)

    Values( @EmpID,@EmpCode,

    @FName,@MName,@LName,@Sex,@DeptCode,@branch,

    @CAddress1,@CAddress2,@Work_Zip,'PK',

    @OfficeTel,@hometel,@mobile,@email,@StartDate,

    @Status,@Salary,@termdate,@bankcode,@bankBranch,@bankAccount,

    @PAddress1,@PAddress2,@home_Zip,'PK',

    @birthdate,@govID,@JTitle,@U_Name,@DesgCD)

    We'll need to see the DDL on table SBO_Rehnuma.dbo.OHEM to answer your question. Check out the first...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Violation of PRIMARY KEY constraint 'OHEM_PRIMARY'. Cannot insert duplicate key in object

    Duplicate post, please send all replies to:

    http://www.sqlservercentral.com/Forums/Topic1042892-391-1.aspx


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to search for a pattern of consecutive records?

    Sebastian,

    In the sample data you included this:

    1 dog a

    2 dog c

    3 dog b

    4 dog d

    4 dog a

    5 dog c

    6 dog c

    Note, the 4 for dog d and a is repeated....


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Using a Instead of Recursive Trigger

    You're looking to recursion a cascade delete? Yikes.

    Does this HAVE to be a trigger? Can you do this from a called proc level or are you doing this...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Are the posted questions getting worse?

    Koen (da-zero) (1/5/2011)


    Dave Ballantyne (1/4/2011)


    Had to share ... On facebook one of my wifes friends posts

    On drilling into C++ from C#, I know now why C# is so called "word...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: how to get date difference in years month and date

    Junglee_George (1/5/2011)


    Hi..Try this

    select cast(datediff(yyyy, '2006-01-01', '2008-01-01') as varchar) + 'Y : '

    + cast(datediff(mm, '2006-01-01', '2008-01-01') as varchar) + 'M : '

    + cast(datediff(dd, '2006-01-01', '2008-01-01') as varchar) + 'D'

    Right...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How To Alter a datetime column to Numeric

    panwar.jt (12/21/2010)


    I had fix the problemmm.

    As per my understanding we can't alter a datetime column directly into numeric type. So I convert frist into varchar(8) then to Numeric.

    Thanks for your...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: sp_send_dbmail fails in SQL Server Agent Job

    JayK (1/4/2011)


    Hi Craig - thanks for the reply....

    In youe extract is says : "When no profile_name is specified, sp_send_dbmail uses the default private profile for the current user."

    But in my...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: sp_send_dbmail fails in SQL Server Agent Job

    I wonder if it's bogging up on the Profile name.

    From here: http://msdn.microsoft.com/en-us/library/ms190307.aspx

    [ @profile_name= ] 'profile_name'

    Is the name of the profile to send the message from. The profile_name is of type...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 15 posts - 4,471 through 4,485 (of 5,678 total)