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 Mike Lewis 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. Khanson82

    Seems Basic but Difficult Sql Query

    At quick glance it looks like it works with my test..I will test on the real database and let you know. Thanks again!
  2. Khanson82

    Seems Basic but Difficult Sql Query

    So out of my insert and your insert above the desired results should be: '2011-02-23 00:00:00.000' '22803668' 2 3 '2011-02-24 00:00:00.000' '22803789' 5 13 '2011-02-24 00:00:00.000' '22803668' 2 14 '2011-02-24 00:00:00.000' '22803668' 2 13 '2011-02-24 00:00:00.000' '22803668' 5 3 Thanks again.
  3. Khanson82

    Seems Basic but Difficult Sql Query

    You might add this too so you can get the date check too..and another case too. insert into list values ('2011-02-23 00:00:00.000','22803668',5,3) insert into list values ('2011-02-23 00:00:00.000','22803668',2,3) insert into list values ('2011-02-24 00:00:00.000','22803789',5,13)
  4. Khanson82

    Seems Basic but Difficult Sql Query

    Only thing now is it only pulls the error_type 2 for my test case when on one page it doesnt have an errortype 2 so I would want it to show. So with the data below, it should pull the page 3 error and the error 2 type errors for page 13 and 14 only. So 3 total rows in the results There will...
  5. Khanson82

    Seems Basic but Difficult Sql Query

    Casenumber is unique.
  6. Khanson82

    Seems Basic but Difficult Sql Query

    Rows.. Here is random example. Date casenumber error page 2011-02-18 00:00:00.000 0000045404 1 12 2011-02-18 00:00:00.000 0000045404 1 12 2011-02-18 00:00:00.000 0000045404 1 12 2011-02-21 00:00:00.000 22820767 3 3 2011-02-21 00:00:00.000 0000062666 3 1 2011-02-21...
  7. Khanson82

    Seems Basic but Difficult Sql Query

    I have a table with 1.date 2.casenumber 3.errortype 4.pagenumber columns I want to pull all records in the table . but, if an error_type of '2' is present for a pagenumber/case_number on the same day that there are other error types for that page, I only want to pull the error type 2 log...
  8. Khanson82

    SQL GETDATE

    That worked..All i needed was your getdate expression, since my original column is datetime already too.. Thanks again!
  9. Khanson82

    SQL GETDATE

    Im trying to get all records that are >= (previous day at noon) This would seem easy but not so much for me..... Our dates are stored like '1995-01-01 00:00:00.000' The time is in military units.(0-24) Any ideas? Thanks again..
  10. Khanson82

    Select Expert With Year Select

    Got it to work. I took that logic but had to turn this year({@Hire Date}) = year(currentdate) - 1 into this: year({@Hire Date}) <> year(currentdate) to exclude this years new hires...Thanks again!
  11. Khanson82

    Select Expert With Year Select

    I have this right now.. year({@Hire Date}) = year(currentdate) - 1 and month({@Hire Date}) = month(currentdate) Which originally everyone wanted, now they want the same exact thing but instead of just last year, I want it to take in all previous years... Basically, every month this report...
  12. Khanson82

    Reference Material

    Wanted to get some ideas for good books or sites that I could get to learn StoredProc/Temp Tables/Variables/MyCursor ...Stuff similar to that... Sql Server 2005-2008.. I've been learning sql for a few months now and I think I'm ready to jump into those.. Thanks again..
  13. Khanson82

    Basic Help on AND query

    Couldn't you also just do:? convert(varchar,p.expenditure_ending_date,101) between 2010-06-10' AND '2010-06-11'
  14. Khanson82

    Date Range Inclusion

    Beautiful! It worked! Thanks again..
  15. Khanson82

    Date Range Inclusion

    I have a hire date in this format (mm/dd/yyyy)..the report will run the 1st day of every month and I want to capture all records that are within the same month, 1 year ago for th whole month... For example, if it 07/01/2010, I want the report to capture all records with a hire date of...
  16. Khanson82

    Easy mask

    Sorry figured it out.. if isnull(field) then 0 else (field)
  17. Khanson82

    Easy mask

    Version XI
  18. Khanson82

    Easy mask

    In crystal, if i have a column that includes nulls and numbers..How can I make the Nulls show up as 0 and the other fields show up as what they are? Thanks again..
  19. Khanson82

    On first record and Last

    I have this in my suppress section: {Command.ProviderID}<> previous({Command.ProviderID}) and {Command.ProviderID}<> next({Command.ProviderID}) And want to add except on first record and last record.. Is this possible? Im basically wanting to hide any records where the providerid used is the...

Part and Inventory Search

Back
Top