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...
...Because in the end sharepoint they want 1 row per delegatename but in backend it is distinct across many things. so this is part of what I did
/*now work with the multiple delegatesfunction to find out how many delegatesfunction are per delegatesname do a count*/
select distinct...
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
...based on passed in parameters
If (filtertext <> "") And (filterType <> "") Then
Select Case filterType
Case "Quality"
'*****This is where the Select is located to find things easily********
sqlwhere = "WHERE ((MEASURES.HEDIS_MEASURE Like '*" &...
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...
...<> "") Then
Select Case filterType
Case "Quality"
sqlwhere = "WHERE ((MEASURES.HEDIS_MEASURE Like '*" & filtertext & "*') OR (PROGRAM.Prog_NM Like '*" & filtertext & "*') OR (CONTACTS.ContacT Like '*" & filtertext & "*') OR (COMMUNICATION.Comm_type Like...
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.
...Dim strSql As String
Dim strWhere As String
strWhere = GetFilterFromListBoxes
Set qdf = CurrentDb.QueryDefs("qryFilteredReport")
strSql = "Select * qualQ1 WHERE " & strWhere
Debug.Print strSql
End Function
Private Sub cmdReport_Click()
CreateFilteredQuery
DoCmd.OpenReport "rptSearchQuality"...
...Dim strSql As String
Dim strWhere As String
strWhere = GetFilterFromListBoxes
Set qdf = CurrentDb.QueryDefs("qryFilteredReport")
strSql = "Select * qualQ1 WHERE " & strWhere
Debug.Print strSql
End Function
Private Sub cmdReport_Click()
CreateFilteredQuery
DoCmd.OpenReport "rptSearchQuality"...
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.