Forum Replies Created

Viewing 15 posts - 46 through 60 (of 94 total)

  • RE: Error Handling - Pass Error as variable

    Thanks it worked, the group by replace is a good one didn't think of that I ended up with this.

    IF OBJECT_ID(N'tempdb..#tmp_Supplier') IS NOT NULL

    DROP TABLE #tmp_Supplier;

    ...

  • RE: Error Handling - Pass Error as variable

    Thanks Orlando, I will try your's now my idea was something like this but it not finished yet.

    DECLARE @II INT, @iiMax INT, @Code VARCHAR(100),@corporate_id VARCHAR(100)

    DECLARE @TemporaryStagingTable TABLE(id INT IDENTITY(1,1) PRIMARY...

  • RE: Error Handling - Pass Error as variable

    There not duplicate until I run the update and remove the double quotes in the column.

  • RE: Error Handling - Pass Error as variable

    Thanks for the replies. The plan is to delete duplicate records, there's nearly 100k records hence I don't want to manually enter the values from the error message.

  • RE: Denormalized XML File

    Thanks for the reply, how do you create a TSV file from a XML\XSLT file?

  • RE: Denormalized XML File

    I have altered the XSL code\file and have managed to get columns in 4 outputs, item, Items, invoice, invoices.

    <?xml version='1.0' ?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/">

    <Export>

    <xsl:attribute name="BatchNo">

    <xsl:value-of select="Export/@BatchNo"/>

    </xsl:attribute>

    <Invoices>

    <xsl:for-each select="Export/Invoices/Invoice">

    <Invoice>

    <AgencyName>

    <xsl:value-of select="AgencyName"/>

    </AgencyName>

    <TransDescription>

    <xsl:value-of select="TransDescription"/>

    </TransDescription>

    <CampaignName>

    <xsl:value-of...

  • RE: Denormalized XML File

    ok i have created a new XSL file, but the resulting denormalised XML file header doesn't look right (see attached screen shot new.jpg)

    New XSL Code

    <?xml version='1.0' ?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template...

  • RE: Group Count

    Thanks for your help, I got it.

    select

    --TOP 15 t1.[Spend]

    [MediaName]

    ,[Spend]

    ,[ClientName]

    ,[BookingYear]

    , ROW_NUMBER() OVER(PArtition by [MediaName] ORDER BY [Spend] DESC) As Row

    from(

    select

    lhe.LHECRELongDesc as [MediaName]

    ,cast(sum(spo.SPODiscountedCost) as money) as...

  • RE: Group Count

    Sorry about 17 rows in the expected, that was a mistake should have been in current.

    When I use top 15 t1.[spend] it only returns 15 rows from 2013. I would...

  • RE: Exporting to 32 Bit Excel in 64 Bit Enviroment

    Finally found the answer.

    Launching the install of a Microsoft ACE OLEDB Provider on a machine with an Office install other than the current one (e.g. 32 on 64) will cause...

  • RE: Horizontal Axis show all categories

    I guess i need something like a page break after say 10 categories, is such a thing possible?

  • RE: Insert with self reference

    Thanks a lot chris, i have never heard of cross join before works.

    I ended up with this

    UPDATE p1

    SET

    ...

  • RE: Split Data

    Thanks for the replies, I got it working with a union for each statement. I was originally using two unions (for same DB) and then added a another statement (different...

  • RE: Query Performance

    ChrisM@Work (8/16/2013)


    Stefan_G (8/16/2013)


    thava (8/15/2013)


    ...

    This is a good idea - scan the large tables a single time.

    To improve performance even more you should include a WHERE condition for GNLFSMID as well:

    WHERE...

  • RE: Find number in String and Return INT

    Ah perfect Koen thanks heaps.

Viewing 15 posts - 46 through 60 (of 94 total)