Forum Replies Created

Viewing 15 posts - 436 through 450 (of 1,183 total)

  • RE: fixed length format file

    Here's the jist of it.....

    DECLARE @myTable TABLE

    (val1 CHAR(9)

    ,val2 CHAR(9)

    ,val3 CHAR(5)

    ,val4 CHAR(9))

    INSERT @myTable

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: ReportViewer Control in WinForm not showing edits.

    I found that my ASSUMPTIONS were wrong... LOL

    I create a SQL Dataset/Command and ASSUMED that the parameters for that command are "linked" to the report when the Dataset is linked....

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Adding a Total Column with a Pivot Table

    Jeff Moden (11/17/2008)


    You might not want to use a pivot... please see the following... especially the performance chart near the end of the article...

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    Might I hope that you always continue...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Adding a Total Column with a Pivot Table

    B (11/17/2008)


    Jason is right.... Why didn't I see the obvious?!?!

    B

    You just made it more complicated than it was. 🙂 It happens to all of us.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Adding a Total Column with a Pivot Table

    No need for CTE here. the pivoted columns exist as columns in the outer level so you can simply add them together there.

    SELECT

    OS

    ,Severity

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Does OPENROWSET using BULK preserve the original file's order?

    The problem is that the line number is NOT a column in the source file.

    I tested with a file of 10 million rows and it worked fine, but that's not...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Does OPENROWSET using BULK preserve the original file's order?

    I have a PK on the table, and the original file's line number is all that is important. That is, I'm not concerned how it is stored in the table,...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: How to find last accessed Date of a database ??? on sql server 2000

    Emilio.Mendoza (7/8/2008)


    Well for me I think this could be done in a very simple way, why don't you check at OS level when was the last time de MDF file...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Delete duplicate data

    Sometimes, just stepping back from the problem, walking around behind it and looking from the other side helps. 😀

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Delete duplicate data

    You're close ...

    DECLARE @mytable TABLE (IdentityKey INT IDENTITY(1,1), field1 VARCHAR(10))

    INSERT @mytable

    select 'test1' UNION ALL

    select 'test1' UNION ALL

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: UPDATE .... SET .Write

    From BOL ...

    .WRITE ( expression, @Offset , @Length )

    Specifies that a section of the value of column_name is to be modified. expression replaces @Length units starting from @Offset of column_name....

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: create a function to make columns into rows

    Sure, create a Tally table and use the below function ....

    (compliments to Jeff Moden)

    ALTER FUNCTION [dbo].[split]

    (@String VARCHAR(8000)

    ,@Delimiter VARCHAR(5))

    RETURNS @RtnValue TABLE

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Trigger Not Firing

    I'm still not sure why yours isn't working, but the code below seems to get the correct results. 😀

    ALTER TRIGGER [trUpdateBeginVacant]

    ON [dbo].[propbut_mi]

    FOR INSERT, UPDATE

    AS

    IF (UPDATE(DDELIVERED) OR UPDATE(DMOVEIN) OR UPDATE(DMOVEOUT))

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Trigger Not Firing

    jim.powers (7/3/2008)


    I used FOR since that was how the examples were written. Plus the documentation says, "AFTER is the default when FOR is the only keyword specified."

    It seems like it...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Trigger Not Firing

    Change to ... ????

    CREATE TRIGGER trUpdateBeginVacant

    ON propbut_mi

    AFTER INSERT, UPDATE

    AS

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 15 posts - 436 through 450 (of 1,183 total)