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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by sardine53

  1. sardine53

    SQL Max with Fields from 2 Other Tables

    Any ideas with my new info?? Thanks!
  2. sardine53

    SQL Max with Fields from 2 Other Tables

    I tried the above but substituted T.PAYEE CODE - error "Invalid column name 'PAYEE'" Then I removed the AS PAYEE: SELECT MAX(TRANS_ENTRY_DATE) AS LATEST_TRANS, PAYEE_CODE, PAYEE_NAME, CLIENT_CODE FROM ( SELECT T.TRANS_ENTRY_DATE, T.PAYEE_CODE, P.PAYEE_NAME, C.CLIENT_CODE FROM...
  3. sardine53

    SQL Max with Fields from 2 Other Tables

    P.PAYEE_CODE can't be used but when I use either P.PAYEES_ID or T.PAYEE_CODE it returns the correct columns but 1M+ rows and I am expecting 610 rows. Thanks
  4. sardine53

    SQL Max with Fields from 2 Other Tables

    The query that works: SELECT max(T.TRANS_ENTRY_DATE)AS LATEST_TRANS, T.PAYEE_CODE, P.PAYEE_NAME FROM [xx].[xx].[dbo].[SQL_PREMIUMS_TRANSACTION_CODE] T INNER JOIN [xx].[xx].[dbo].[SQL_PAYEES] P ON T.PAYEE_CODE = P.PAYEES_ID INNER JOIN [xx].[xx].[dbo].[SQL_CLIENTS] C ON T.BILLTO_ID =...
  5. sardine53

    SQL Max with Fields from 2 Other Tables

    Thanks for your speedy reply Andy I corrected my error: FROM {PREMIUMS_TRANSACTION] TRANS to T and removed the where clause but I am still getting Incorrect syntax near 'CLIENT_CODE' the last line. What am I missing?
  6. sardine53

    SQL Max with Fields from 2 Other Tables

    I am using SQL 2008R2 and need some assistance. This query gives me the result I need except the CLIENT_CODE (in the C table) that corresponds with the LASTEST_TRANS: SELECT max(T.TRANS_ENTRY_DATE)AS LATEST_TRANS, P.PAYEE_CODE, P. PAYEE_NAME FROM {PREMIUMS_TRANSACTION] TRANS INNER JOIN...
  7. sardine53

    Combining Multiple Rows into One Row

    SSRS 2008R2 Hello, I need to have the results of a certain ID it one row rather than multiple rows. SQL (Simplified): SELECT ID, CAST(CONTACTDATE AS DATE) AS 'DT', DESCRIPTION, CAST(ASSOC_ROW AS INT) AS 'ROW' FROM SERVER.dbo.TABLE ORDER BY 'DT', 'ROW' Expression in SSRS - used in the group...
  8. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    Tried both with no luck. No leading or trailing spaces in the Column Heading. Maybe I missing something else? I can still bring in the values using the text box with my initial code/post.
  9. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    Member is only one column (not Member plus ID or something else) I am expecting the drop-down to pull up the Member name and associated other columns from the stored procedure. I was trying to convert the input box (which worked) to a drop down. I'm probably the one that's missing something! I...
  10. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    Private Sub ComboBox1_Change() Dim Customer As String Member = Sheets("Sheet1").Range("K8").Value With ActiveWorkbook.Connections("ABCWEB2 SQLReports sysdiagrams").OLEDBConnection .CommandText = "EXEC dbo.usrsp_S_Customer_Census '" & Customer & "'" ActiveWorkbook.Connections("ABCWEB2...
  11. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    Everything is on the same page "Sheet1
  12. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    Active sheet (tab) is "Sheet1" Combobox1 is on the "Sheet1" in cell K8 The SQL field I what is "Member" The Parameter is "Customer"
  13. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    Tried with all suggestions and no luck. Any other ideas?
  14. sardine53

    Excel Populate Combo Box with Dynamic SQL Values

    I did try to refresh. I'm just afraid I have something wrong with my syntax.

Part and Inventory Search

Back
Top