Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. codrutza

    Concatenate the Results

    The table is Containers. Few records are: JobNumber ContainerNumber 1120339 1120339 TTNU2499140 1 1120423 1120423 ICUU9601717 1120423 ICUU9606365 1120423 CAIU4202803 3 1121260 1121260 MRKU5429434 1121260 MSKU8439227 2 1121739 1121739 HASU5138730 1121739 SUDU6551036 1121739 TCKU6954748 3...
  2. codrutza

    Concatenate the Results

    SAP CR2003 Hello eg I have 4 records in the result: 1.Cont.NumberX 2.Cont.UnitA 3.Cont.UnitB 4.Cont.UnitC and I need the result in a record: 1.Cont.NumberX 2. Cont.UnitA +' '+Cont.UnitB +' '+Cont.UnitC where 2 = a field Please help.
  3. codrutza

    Formula Extracting Numeric from String, with £

    Thank you, LB. It works for £10,000, but stops at some record saying: the string is not numeric and highlights Tonumber(Mid(x,2)). Could you explain the formula, please?
  4. codrutza

    Formula Extracting Numeric from String, with £

    Hello I have a formula: @extract if isnumeric ({FreightJobs.SpecialCharacter06}) then tonumber({FreightJobs.SpecialCharacter06}) else 0; and when it has to extract from £10,000, the 10,000, it gives me 0, so it says that are not numeric in £10,000. The formula works fine for €500, $30,000, ...
  5. codrutza

    Combine Several Select Statements in a SP

    I use SAP Crystal Reports and Microsoft SQL Server Management Studio. I have a select1 which retrieve all the jobs, sales I have another select2 which retrieve only the jobs which have invoices to customs; for taking the invoices to customs, I have to link other tables to the original link; I...
  6. codrutza

    Running Totals On Group Headers

    Hello CR2013 I have running total sales in the Group Footer Year and the running totals for each client. I can't use sum. I know that I can't have the running totals in Group Header, but I have to display the Total sales per year first. Is it a way around this? Could I have within the group...
  7. codrutza

    CTE Missing

    Thank you Boris. Sorted :)
  8. codrutza

    CTE Missing

    I wrote a basic stored procedure from TableJ, that selects all jobs and I developed a report with Crystal Reports which shows the jobs with missing vessels, missing dates,….. Each job has one vessel, one date, … 1. Some jobs with the field value TableJ.car='F' have one or more containers, 2...
  9. codrutza

    2 CTE in one select

    Please help on writing this. I have to combine in one select 2 CTEs: one which count the containers for a job, and one with sum sales for a job. 1. ;WIH Cont_CTE AS ( SELECT CJNo , COUNT(1) AS ContCount FROM Cons GROUP BY CJNo ) 2. ;WIH Sales_CTE AS ( SELECT J.JNo, sum(H.Amount*H. Sign) as...
  10. codrutza

    Select Result One Record Per Job

    Maybe you help me with something else. I have to combine in one select 2 CTEs: one which count the containers for a job, and one with sum sales for a job. How do I write this? 1. ;WIH Cont_CTE AS ( SELECT CJNo , COUNT(1) AS ContCount FROM Cons GROUP BY CJNo ) 2. ;WIH Sales_CTE AS ( SELECT...
  11. codrutza

    Select Result One Record Per Job

    ;WITH ConsSum AS ( SELECT CJNo , COUNT(1) AS ConsCount FROM Cons GROUP BY CJNo ) SELECT j.JNo , j.JDate , j.Sales , c.ConsCount AS TotalCNoperJob FROM Jobs j JOIN ConsSum c ON j.JNo = c.CJNo ORDER BY j.JNo I have the select above for j.type=’A’, where I have to...
  12. codrutza

    Multiple Rows Same Data

    Hi I have to put in a report details on 11 lines the very same data. Does anybody has an idea? I have to copy/paste in sections 1 to 11 the same fields or is another way? JNo JDate Sales 10 21/01/2015 10 line 1 10 21/01/2015 10 line 2 10 21/01/2015 10 line 3 10 21/01/2015 10 line 4 … 10...
  13. codrutza

    Select Result One Record Per Job

    It works, thank you, kjv1611. Am I right when I say could be more then one CTE? From what I read. I have in the report some other subreports, each with their selection for which I'd like CTEs.
  14. codrutza

    Select Result One Record Per Job

    Thank you. Can you repeat ;WITH ConsSum AS ( SELECT CJNo ,COUNT(1) AS Cons FROM Cons GROUP BY CJNo ) SELECT j.JNo, j.JDate, j.Sales, c.Cons AS TotalCNoperJob FROM Jobs j JOIN Cons c ON j.JNo = CJNo ORDER BY j.JNo with the correction ConsSum? I am confused.
  15. codrutza

    Select Result One Record Per Job

    Thanks Andy. kjv1611 I read now about CTE, I didn't know about them, thank you. If I use a CTE: - it is not clear for me the join: ON j.JNo = CJNo? - where is the table ConsSum in the second select? - can you explain me Count(1)?
  16. codrutza

    Select Result One Record Per Job

    Thank you both for your patience. I want to do a report from the data in the output. JNo JDate Sales TotalCNoperJob 10 21/01/2015 10 5 11 21/01/2015 20 1 12 22/01/2015 30 2 13 23/01/2015 10 1 14 26/02/2015 10 1 15 26/02/2015 40 16 26/02/2015 30 4 17 27/03/2015 20 18 28/03/2015 40 19...
  17. codrutza

    Select Result One Record Per Job

    Thank you, Skip. So what if I have to select many more fields in my select? - Do I put them all in the group by; maybe it is silly, I'm afraid of group by all the fields; could have some influence in the result or not? I will have to add as well the rest of the fields by month, year, ...at the...
  18. codrutza

    Select Result One Record Per Job

    I have the table Jobs: JNo JDate Sales 10 21/01/2015 10 11 21/01/2015 20 12 22/01/2015 30 13 23/01/2015 10 14 26/02/2015 10 15 26/02/2015 40 16 26/02/2015 30 17 27/03/2015 20 18 28/03/2015 40 19 29/03/2015 30 20 29/03/2015 60 40 22/01/2016 0 41 23/01/2015 50 42 24/01/2016 50 43 24/01/2016 60 44...
  19. codrutza

    Different Colors for Different Fields

    Hello I have in a report a group based on @Name: if {T.Name}='SUA' then 'A' else if {T.Name}='Europe' then 'B' else if {T.Name}=.... I have to put on A a color -crred, on B another color -crblue.... on 3 fields - in Group Header on Group Name - in Group Footer on the sum(sales) - in Group...
  20. codrutza

    Summaries Print in Report Footer

    Please help me with this: I have a report Prints Group 1 Via Group 2 Client Group 3 Agent Group 4 jobs Details Job, sales1 Job, sales2 Job, sales3 Prints in Group Footer totals I want to print at the end of the report, in Report Footer totals as Sea Agent1 totaljobsag1sea totalsalesag1sea...

Part and Inventory Search

Back
Top