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: *

  • Users: Cpreston
  • Content: Threads
  • Order by date
  1. Cpreston

    division by zero

    Hi I have a report that as been working fine until today. I am getting the below when running the report. I presumed someone had entered bad figures somewhere in the files but cannot find anything. Is there anything in the syntax I can put in that will allow the zero in the calculation. I...
  2. Cpreston

    Group results into one row

    Hi I have a query that I want to display all results into one row The query currently returns the following But I want it to display the figures in one row for Status as Free and one row as Status Allocated with the Total being the total of all the row. I have tried group by and other...
  3. Cpreston

    CSV to SQL table with not allow null issue

    I have a CSV file import which as a couple of issues due to the Source file not having some data One of the columns will always be Empty but the database destination does not allow Nulls A column in the Destination is not present in the CSV file and also does not allow null values So obviously...
  4. Cpreston

    Seconds to minutes

    Hi I have a field that the results show in seconds. I want to display this in minutes and seconds but unsure how to do this. downtime AS Downtime is the filed name and the result for example on one record is 2299.35800027848 I want that to show the result 2299.35800027848 / 60 which I...
  5. Cpreston

    Select Top 2 rows where field = 2,3,4 and 5

    Hi I have made another thread as I feel my last one as become complicated than it needs to be I have forumla that does as below for Source = 1 and Finished = 6, I want Processed to be numbered 2 to 5 (there are always just 4 processes) and then select only numbers 2 and 3 to display in my...
  6. Cpreston

    Pivot Table Issue

    Hi I have a Pivot table which as a filed for the rows called ProdGroup. It as numbers from 1 to 12 and I have managed to do the totals and subtotals on each group. However the numbers for the columns are out of number order, so instead of going from 1 to 12 it is putting the 1's first so I...
  7. Cpreston

    Excel Networking days

    Hi I have a long list of dates in 2 columns and want to calculate the days between them but exclude weekends and bank holidays. I have used =NETWORKDAYS(F2,G2,P2:P10) The P2:P10 have the bank holiday dates in but when I copy the formula down it changes for example =NETWORKDAYS(F3,G3,P3:P11)...
  8. Cpreston

    Only Select certain rows

    Hi I have a report that is grouped by orderlines. The orders may have up to 6 rows or mote. However, I want to create 2 sperate reports. One report that only shows the first 2 rows of the orderlines and hide the rest The other report to only show the 3rd and fourth row of the orederlines and...
  9. Cpreston

    Trim Multiple items in one column

    Hi I have a large spreadsheet that as one column with all the information. I want to spilt the data into different columns before and after a ; appears (example line below). I have looked for Trim commands on google but cannot find anything quite what I am after. Could some assist please...
  10. Cpreston

    whats wrong with Vlookup

    Hi I am trying to do a vlookup and it looks perfect =VLOOKUP(I2,A:G,10,TRUE) but I am getting #N/A I have looked at a lot of examples and it seems ok. Attached is an example row, in the real sheet there are 100's of rows. Thanks in...
  11. Cpreston

    How to add a Letter to datepart

    Hi I have a line of code which works ok CAST(DATEPART(qq, dbo.JourneyHeader.JourneyDate) AS VARCHAR(4)) + ' - '+ CAST(DATEPART(yy, dbo.JourneyHeader.JourneyDate) AS VARCHAR(4)) AS QTRYEAR This gives me the result 4 - 2023 however I would like it to look like Q4 - 2023 I have tried to add...
  12. Cpreston

    Working Days giving NULL values

    Hi I have a complex query which appears to populate the workingdaysL1 column sometime and other times I get a NULL. If it is run with NULL values showing I get this in the message Warning: Null value is eliminated by an aggregate or other SET operation. But it brings in results except the...
  13. Cpreston

    vlookup issue

    Hi I have a sheet with a vlookup which I cannot get to work. In the Vlookup tab column C I want it to bring the information in the data tab column c where column A in both sheets match. But I am getting #N/A for all of the results. I have googled how to the vlookup so I think I have it right...
  14. Cpreston

    Formula Advice

    Hi I have a spreadsheet that as data in column H called OldValue. Then entry's could start with Total Price or Unit Price. an example of the Total one is Total Price=91.36 I just want to get the price out of this , if I use the following formula =MID(H2,13,LEN(H2)-10) I get 91.36...
  15. Cpreston

    If cell is blank use data from another cell

    HI I ahve a sheet that uses2 columns for mileage. Columns H and K If H is blank then I want it to copy what is in K and if not blank then leave it as the figure it as.. I have tried the following formula but it just returns a 0 and not 841 for example. =IF(H16="",K16,H16) =IF(TRIM(H16) =...
  16. Cpreston

    Add characters to a cell Excell

    Hi I have a cell of Text which I want to add some characters to and then join them all together in one string separated by a comma. I have managed to join all 455 rows with a comma using this formula =TEXTJOIN(",",TRUE,A1:A455) A-GRN-R2-ARM1,A-GRN-R2-ARM2, etc...... However I want to...
  17. Cpreston

    Last date per userid

    HI I am trying to get the last date by a userid they last logged something. If I sue the following simple command I get the last date in the table, which is correct. SELECT MAX(dbo.ScanTrackImage.DateTimeTaken) AS MaxTaken FROM dbo.ScanTrackImage However the table as various...
  18. Cpreston

    Update with a month name

    HI I have a small query. The name column which is varchar returns 01,02,03 etc.... I want to replace if 01 to say Jan, If 02 to say Feb etc.... How can achieve this please. Any ideas, many thanks in advance SELECT asset, name AS Month, MoulderEvents, ModTime, PLEvents, PLTime...
  19. Cpreston

    Update File with only new records

    HI I want to be able to export from SQL a group of data into a CSV or Excel file. This is not problem at all and I can achieve this, however, I only want to update the rows for the text file or excel document if the import rows are new and not already in the file. Is this possible and if so...
  20. Cpreston

    Remaining Text does not appear problem

    Hi I am not the best at Crystal Syntax and I know the following is bad syntax. But I cannot seem to get away for the code to work after many google searches. Basically, I am looking at 3 different fields and if they are blank then Stock if not then the filed entry. The last one is just a...

Part and Inventory Search

Back
Top