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 sizbut 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. gencom99

    DATE COLUMN

    Is there any way I can accomplish the following? I am connecting to Oracle through MS QUERY Set Query = QuerySheet.QueryTables("MONEY") Query.Sql = "SELECT NUMB_TBLE.NUMB_NAME, TO_CHAR(NUMB_DATES_TBLE.DAY_MTH_YR, 'MONTH') AS MONTH, SUM(NUMB_TBLE.NUMB_PAY) " _ & "FROM JES.NUMB_TBLE NUMB_TBLE...
  2. gencom99

    DATE COLUMN

    It didn't work; It grouped the data by each date. For example if there were 10 January records, the result contained 10 records. The purpose of the query is to sum the data by month. There should have been one record for January
  3. gencom99

    DATE COLUMN

    It didn't work. Also the column has an alias I tried Set Query = QuerySheet.QueryTables("MONEY") Query.Sql = "SELECT NUMB_TBLE.NUMB_NAME, TO_CHAR(NUMB_DATES_TBLE.DAY_MTH_YR, 'MONTH') AS MONTH, SUM(NUMB_TBLE.NUMB_PAY) " _ & "FROM JES.NUMB_TBLE NUMB_TBLE, JES.NUMB_DATES_TBLE NUMB_DATES_TBLE" _...
  4. gencom99

    DATE COLUMN

    I am connecting to Oracle through MS QUERY. The result is put into excel. Set Query = QuerySheet.QueryTables("MONEY") Query.Sql = "SELECT NUMB_TBLE.NUMB_NAME, TO_CHAR(NUMB_DATES_TBLE.DAY_MTH_YR, 'MONTH'), SUM(NUMB_TBLE.NUMB_PAY) " _ & "FROM JES.NUMB TBLE NUMB TBLE, JES.NUMB_DATES_TBLE...
  5. gencom99

    Column alias

    Yes, I have Preserve Column/Sort/Filter Order checked
  6. gencom99

    Column alias

    I am connecting to Oracle through Microsoft Query
  7. gencom99

    Column alias

    If I add an ORDER BY to my SELECT statement, the data in the columns get sorted. I do not want to sort the data. I want to alias the some of the columns to make the names more user-friendly. When I alias a column, it changes the placement of the columns in the result. For example if my...
  8. gencom99

    Run-Time Error '1004' General ODBC Error

    When I put Msgbox Query.Sql before Debug.Print Query.Sql I saw the SQL
  9. gencom99

    Column alias

    I would like to put column aliases on some of the fields in the SELECT statement. Private Sub CommandButton1_Click() Dim NumList As String Dim SourceBook As Workbook Dim ListSheet As Worksheet Dim QuerySheet As Worksheet Dim Query As QueryTable Dim Numb As String Set SourceBook =...
  10. gencom99

    Run-Time Error '1004' General ODBC Error

    After I ran it, there was no code in the Immediate window
  11. gencom99

    Run-Time Error '1004' General ODBC Error

    I copied the code and put it before Query.Refresh (False). I put a break on this line--Debug.Print Query.Sql How do I copy it?
  12. gencom99

    Run-Time Error '1004' General ODBC Error

    Private Sub CommandButton1_Click() Dim NumList As String Dim SourceBook As Workbook Dim ListSheet As Worksheet Dim QuerySheet As Worksheet Dim Query As QueryTable Dim Numb As String Set SourceBook = Application.ActiveWorkbook Set ListSheet = SourceBook.Worksheets("Main") Set QuerySheet =...
  13. gencom99

    Run-Time Error '9' Subscript out of range

    I am using a spreadsheet. It has two tabs MAIN and TOTAL CASH. On the MAIN tab is a BUTTON and a cell where to enter a number. After you put a number in the cell and click the button, the results of the query is in the tab TOTAL CASH Private Sub CommandButton1_Click() Dim NumList As String Dim...

Part and Inventory Search

Back
Top