Hi, This is an oracle DB? Are you looking for Help writing the query? If so can you provide me a DB schema?
Hi! I'm Brian, I'm a .NET developer, so I should be able to help.Can you upload your code so I can take a look and see if there is an error? Feel free to remove the password ***** the connection string (just replace it with ***) - I'm assuming that you have already confirmed the password... correct?
Ok, give me a few minutes to look it over, and I will get back to you. :)
Ok, so I've taken a look over it, nothing is jumping out at me as being incorrect (although, granted... it's been awhile since I've worked on code from this version of asp). Could you take a screenshot of how the page displays when you load it?
Hmm. I'll be honest, I'm really not sure why this isn't working. I'm going to have to opt-out and see if I can't get this escalated to someone who has more experience with this version of asp. Sorry I couldn't help more!
I took a look at your test site and code, and have a theory:
The filter variables that are used to create the SELECT clause, such as statusCount__MMColParam2, are set from the corresponding QueryString variable by comparing it to an empty string - however, it looks like perhaps you intent is to indicate "any" with the first selection in the dropdown box, a dash "-" .
Then, in your select statement, in your AND clause you append a "%" wildcard, so I think the first portion of your WHERE clause would actually end up being
WHERE status like '-%' and campus like ...
Chances are, there is no matching row with a status that begins with a dash "-" ???
THe same theory holds for your "campus" filter; there, you don't have any wildcards, but again, is the dash supposed to mean "any campus" ?Just a though, I don't know your assumptions and such...
In addition, I then see a third filter criteria included, derived from
statusCount__MMColParam4 = Request.QueryString("statusDate")
Not sure where this even comes from in the query string; it feels like it is unnecesary and mabye conflicting with the intended range of dates within which to search.
Generally, I would suggest that you debug this by printing out the final value of your assembled SELECT statement, once it's assigned to
I bet you'll find that if you compare that to the manual SQL query that returns data for you, it'll lead you down the right track.
Hope that helps,...
Just make a temporary row in the output part of the page, maybe just at the end, and output the statusCount.Source string as the table data, just like it's trying to do with the result fields of the statusCount object.
Post your updated source file here after your changes so I can have another look. My next guess is that you need to properly format the date fields for SQL to work right, I'm not sure off the top of my head if it accepts the month/day/year form.
I do know it works with yyyy-mm-dd in case you want to just try that.
Well, I just checked, and all 3 of these are valid, and represent the same date:
select convert(smalldatetime, '1980-12-25')select convert(smalldatetime, '12-25-1980')select convert(smalldatetime, '12/25/1980')
I'm not quite sure what else your SELECT is trying to accomplish; I'm afraid I'm out of ideas on this one.
My name is ***** ***** I'll also give it a try. I'll need about 24 hours to test it and then give you a feedback.