select distinct ((concat(trim(EXTRACT(month FROM(rqst.admt_dt))), '/01/', trim(EXTRACT(year FROM(rqst.admt_dt))))) as date format 'mm/dd/yyyy' end) as MonYr
from companydatabase.um_rqst rqst
The DD could be any day of a month but we are forcing it to the first of the month with the 01...
Thanks. The attachment not sure why it did not work but I will just have to build it like case statements. No other way I have found to do it. Someone gave me this but it does not work in SQL R2008. I have 36 measureids in all with 14 markets and 2 prodabbrevs. So trying to figure out how to use...
I started to do an update query like:
update comprank set ranking = '1 out of 1' where measureid = '234' and prodabbrev = 'hmo' and rank = 1 and market = 'ca;
but then I realized that is not going to work based on the raw data I have. Here is an example of the data and I also have 3924 total...
Thanks, I actually figured out a way to do it with separate pivots in sql server. I opted for this solution because this is going to change time and time again the more the folks that update sharepoint add data and I have to align as well as make what they change in sharepoint look right in the...
I deleted my old post and reposting since I did not make myself clear what I was looking to do.
I have a 4800 approx. row database in SQL Server. I need to either take that data and in SQL Server perform SQL code to be able to pivot the data. An example of some pivot code is:
SELECT...
I am a total idiot. I just completely forgot about a varchar because the original table had this as char in the database so I just thought I had to keep it the same when doing my query. Thanks so much You just saved me a lot of digging.
I have a very large table and one of the columns is a char(25) datatype. The problem is not all the data in this column has the same length yet when I query to get the distinct length, everything comes back 25. I need to alter some of the data and was trying to do it by the length. Here is an...
Thanks. I had it wrong in the code. I was doing it like this: [dl_qpt_cqe].[measures].[hedis_measure] and all the other tables. I had to change it to:
dl_qpt_cqe_measures.hedis_measure, etc. It works now. Thanks
I have the following code and it worked when my tables were in Access, however the tables have been migrated to our Teradata server and I ODBC with Access. My tables are now named for example DL_QPT_CQE_Measures. I tried changing my code to DL_QPT_CQE_Measures.hedis_measures, however it does not...
I am getting an error where my export to graph button on the Excel portion of my code cannot find the pivot table property in my Excel sheet. The error is run-time 1004 and it says unable to get the pivottables property of the worksheet class. Here is the code I have and I commented where the...
The solution was that I did not have a right join and this is why all my records did not show up. I thought I had to do something different. Restart the count or rebuild the table and all the while it was not showing all the data because some fields had null values. When I changed my SQL to a...
Actually, I did not code this. Someone else did and after I made several attempts they said let me see your DB. I gave them it and this was what they came back with due to the intricacy of the database and forms. This is not a simple data entry or data update group of forms. It is a very complex...
Now I have 1.3 million records appended, due to time constraints and when I use my search form the listbox automatically begins at row 46. I used rows 1-46 prior to my append of the real data for testing purpose. I made up stuff. Then I copy and pasted 1-46 rows from the real data to overwrite...
I have a large Access db and created all my tables that are normalized, created forms, reports, and queries. I used fake test data that consisted of 14 rows. Everything looked great until I appended REAL data that overwrote the 14 rows and added 50k more rows. The forms are not picking up this...
Yeah I have had so many things I was attempting to make this work. I did this, everything you stated above and it works awesomely. Such an easy fix. I was making it so much harder than it was. I guess I need to follow my whole thing of KISS, right????? Thank MajP. You are awesome.
MainForm and when clicking on the button that has the report/embedded graph:
Option Compare Database
Option Explicit
Private Sub cmdReset_Click()
Dim ctrl As Access.Control
Dim itm As Variant
For Each ctrl In Me.Controls
If ctrl.ControlType = acListBox Then
If ctrl.MultiSelect...
When I run the below code it takes me to the report with embedded graph and the report is correct, but the graph is only showing line 1 of results.
Public Function CreateFilteredQuery()
Dim qdf As dao.QueryDef
Dim strSql As String
Dim strWhere As String
strWhere = GetFilterFromListBoxes
Set...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.