Forum Replies Created

Viewing 15 posts - 76 through 90 (of 94 total)

  • RE: Don't show null

    thanks for the code tip.

    Unfortunately isnull() forces you to declare a replacement of the same data type of the column.

    Invoice_Id(int, not null)

    Code: ISNULL(invoice_id, 0) returns a zero

    Code: ISNULL(invoice_ID,)...

  • RE: Single Invoice Row with Orders

    I am adding the code to package flow I have designed that will be added to a SQL job so it can run automatically everyday. I tried doing it in...

  • RE: Single Invoice Row with Orders

    I have finally got it after a couple of weeks, here's the code if anyone is interested;

    [Code="SQL"]

    WITH cte ( Invoice_id, IssueDate,optional_1,scandate,supplier,optional_2,invoicenumber,rejected,completed,notified,comments,transferred,

    ...

  • RE: Records from yesterday if not monday

    ALZDBA (7/14/2011)


    just to add to the replies ...

    1) of course. Your operator is ">=" !

    You should alter it with a ">=" and "<" ( between can have...

  • RE: SQL Grouping Data

    Hi,

    I have uploaded two spreadsheets one shows the acutal results and the other expected results. The example invoice is number 132887, you can see the differences.

    There is also two...

  • RE: SQL Grouping Data

    Many thanks for your help :-D, but it is still not what I need.

    I have uploaded a spreadsheet that shows the difference. Invoice ID 135393 only has one purchase...

  • RE: SQL Grouping Data

    thanks for update Jeff, it is more like.

    invoice_id Line_id

    1..............1

    1..............2

    1..............3

    2..............1

    2..............2

    3..............1

    4..............1

    5..............1

    6..............1

    6..............2

    And you got gets an error when I compile...

  • RE: SQL Grouping Data

    Sorry I thought it was clear, the previous provided SQL script is almost exactly what I need.

    I have attached a excel spreadsheet that show the format of invoice that...

  • RE: SQL Grouping Data

    Can you explain the end of the second case statement, why the it has

    'END AS [Invoice Date], Account,ApproveDate', but the first case only has [Invoice Date]?(what do you have...

  • RE: SQL Grouping Data

    David Burrows (7/7/2011)


    1. where in the code do I put the alias i need for the column names, eg. issue date as Invoice Date.

    Just add the alias to the end...

  • RE: SQL Grouping Data

    Jeff Moden (7/7/2011)


    ringovski (7/6/2011)


    Not sure you mean by DDL & DML, but here are the table specs.

    Take a look at the first link in my signature line below... it'll help...

  • RE: SQL Grouping Data

    Thanks David and opc.three you guys are awesome, it seem to give the basic structure I need even though I don't understand the code that well.

    A couple of questions

    1. where...

  • RE: SQL Grouping Data

    opc.three (7/6/2011)


    ringovski (7/5/2011)


    Jeff Moden (7/5/2011)


    It may make a difference...

    Where will the result set of this query be used? In a reporting tool? In a GUI? or...

  • RE: SQL Grouping Data

    Jeff Moden (7/5/2011)


    It may make a difference...

    Where will the result set of this query be used? In a reporting tool? In a GUI? or ???

    I am...

  • RE: SQL Grouping Data

    No I don't want a cross join I was only trying to reference the companies table as it is used in the lower join.

    SELECT ...

Viewing 15 posts - 76 through 90 (of 94 total)