Recent content by geoffcodd

  1. G

    RecordCount ?

    rs.movelast i = recordcount rs.moverfirst I think
  2. G

    Replacing Chr(9) / Tab in Import File

    Here is a small example, the files can be anything from a couple of line too 1000's of lines. I would prefer to clean file before import, if possible someone did mention about using a batch file to do this? E|GERMANY|2103|SV01|SV01|DEA0207006|DEA0207006|DEA0207006|ashampoo GmbH & Co...
  3. G

    Replacing Chr(9) / Tab in Import File

    Yes, no Tabs Thanks Geoff
  4. G

    Change field data based off of previous record field

    Maybe something along these lines Dim db As Database Dim rs As Recordset Dim i As Integer Dim sValue As String i = 0 Set db = CurrentDb Set rs = db.OpenRecordset("tbl_PreviousRowExample") rs.MoveFirst Do Until rs.EOF If (i <> 0) Then rs.Edit rs!StartMsecTime =...
  5. G

    Replacing Chr(9) / Tab in Import File

    Hi, Hopefully someone can help, I have a text file where some of the lines have a tab within them which is forcing the data on to a new row. Is there a way with ay a batch file that I can remove these before importing the file. Thanks in advance
  6. G

    Error converting datatype vchar to numeric

    Sorry it's ok was being a muppet thanks for your help
  7. G

    Error converting datatype vchar to numeric

    Thanks for the reply, I have files of 200k+ rows what is the quickest way of stripping out the commas, Thanks
  8. G

    Error converting datatype vchar to numeric

    Hi, I have the following SQL INSERT INTO dbo.tblC0200_nSAP_FI_Line_Items_Cleaned (CoCd, [Year/month], DocumentNo, Itm, [Amount in doc], Curr, [Amount in local cur], LCurr, [Amount in loc curr 2], LCur2) SELECT CoCd, [Year/month], DocumentNo, Itm, CONVERT(decimal(18...
  9. G

    Group By not working no clue why

    Hi, I have the following SQL SELECT 'MNC (NASP)' AS Type , NASP_ID , Region_1 , '/' AS Country , Sum(Total) As Total FROM TMA.tblG2100_TMA_Target_Complete WHERE ((Type)='MNC (Accounts)') GROUP BY Type, NASP_ID, Region_1, Country I get the following results, and as you can see it doesn't...
  10. G

    New to SQL Server 2nd Problem - Stored Procedures

    Hi finally got it to work so really happy with, that just need to understand the best way to run the stored proc from access Thanks
  11. G

    New to SQL Server 2nd Problem - Stored Procedures

    Hi, Hope someone can help me with my 2nd issue. I have a View saved as TMA.qryD1300_Complete_Accounts_with_Allocation, I would like to create a temp table of it results. As a complete noob I need to know 1) How to create a Stored Proc to create this 2) How to call this from Access (VBA) 3)...
  12. G

    New to SQL Server and Hit my first problem

    Brilliant :D Thanks very much, big change from doing stuff in Access to SQL Server but is paying dividends Thanks
  13. G

    New to SQL Server and Hit my first problem

    As I said I have shorted the SQL to just show the bits that are causing the issue, full SQL is SELECT DISTINCT TMA.tblB0100_Accounts.Suspected_Non_Biller , TMA.tblB0100_Accounts.On_Initial_Scrub , TMA.tblB0200_Account_Details.Inactive ,'BusOps_Region' = CASE WHEN...
  14. G

    New to SQL Server and Hit my first problem

    Hi there, I have the following SQL which I have shortened SELECT DISTINCT TMA.tblB0100_Accounts.Suspected_Non_Biller ,'BusOps_Region' = CASE WHEN TMA.tblA1000_Country_OpCo_Codes.Region Is Null THEN TMA.tblA1000_Country_OpCo_Codes.region ELSE TMA.tblA1000_Country_OpCo_Codes.region...
  15. G

    7zip Command line Problem

    Hi, Our company are moving from WinZip to 7zip, I had no issues with WinZip but I am struggling to get 7zip to work. I am using the below vba in access, it creates the zip file but it is empty, any help in the right direction would be appreciated. Thanks Function...
Back
Top Bottom