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. ciarra41

    format dates correctly to mm/dd/yyyy

    I have these dates fomatted like these mm/dd/yy to mm/dd/yyyy I tried to convert function but to luck 01/21/98 07/17/96 12/15/04 Need them to look like this" 01/21/1998 07/17/1996 12/15/2004 any help would do
  2. ciarra41

    Rollup to one record with same order number

    here's the example; employeecode Monday Tuesday Wednesday Thursday Friday Saturday Sunday 502025 Rostered NULL NULL NULL NULL NULL NULL 502025 NULL Rostered NULL NULL NULL NULL NULL 502025 NULL NULL Rostered NULL NULL NULL NULL 502025 NULL NULL NULL Rostered NULL NULL NULL 502025 NULL NULL NULL...
  3. ciarra41

    Rollup to one record with same order number

    I have multiple rows with duplicate orders numbers and separate order types where as some are null and some are not. How can I roll these up into one record by order number and where there’s null it will pick the corresponding value that is not null for the same order number? It can be two are...
  4. ciarra41

    Split field record into multiple fileds at second value occurrance

    Thanks to everyone, you guys are awesome. I added the replace string; bingo!
  5. ciarra41

    Split field record into multiple fileds at second value occurrance

    hmm, that did not work Here's how the field look: >59>rt>mb>50
  6. ciarra41

    Split field record into multiple fileds at second value occurrance

    Super but I need to add '>' as the separate where do I add that?
  7. ciarra41

    Split field record into multiple fileds at second value occurrance

    I'm trying to parse a field whereas at any second occurrance of a character value(') start from there and drop them into another field separately by ('). The below query works but keeps ASC the values exp. tr'1245'lt'ba'max'74 tr'1845'lkt'bf1a'7max'749 It needs to start at the second (') and...
  8. ciarra41

    Show data at any giving point of the filed

    I have a list of file names in a table; I'm only trying to query the report name starting at the last forward(\) slash. So anything starting at the last slash will be the report name. k:\documents\myfolder1\reports\analysis\march\04\ordersReports.xls It should look like this. Any example sql...
  9. ciarra41

    Split a field (space delimiter) into separate columns via sql

    It combines all the numers in one unique jobnumber and separate columns per unique orderNM OLD jobNumbers orderNM 78506766 0850 0853 2542 9907 78506766 0850 0853 2592 78506766 0851 0853 2542 4801 9907 78506766 0851 0853 2542 9907 78506766 0851 0853 2592 End Result jobNumbers orderNm1...
  10. ciarra41

    Joining tables with a like wildcard

    I trying to join two tables with table a has a single value whereas the table b may have multiple values but still has the value in table a. Possible easy fix? select a.* FROM tableA as a inner join tableB as b on b.CODE = LIKE '%'[a.code]'%'
  11. ciarra41

    conver varchar time into datetime

    actually the second example worked. it was a date field that was causing the error. Oops!
  12. ciarra41

    conver varchar time into datetime

    Hi there; I'm trying to convert this 11:15:AM into a datetime format. The problem I see is the second (:) I've tried to remove it but still I'm getting an error. I've tried these: CONVERT(varchar(8),mytime,108) RTRIM(SUBSTRING(mytime,1,5)+' '+SUBSTRING(mytime,7,2)) any other suggestions.
  13. ciarra41

    multiple values into separate columns by its unique id field

    old table: idnum values 5548 2s1dd 5548 35dd6 5548 4548p 5584 22de1 New table or sql: idnum value1 value2 value3 value4 5548 2s1dd 35dd6 4548p 22de1
  14. ciarra41

    removing dups by min dates keeping the max but sum all the values

    Hi there, I've recently submitted a thread #183-1648000 to remove all the min dated records but it kept the max. I need to do the same thing but I need it to add the values in each of the rows before it roll up to max date. The sql below works but it only summing the max value from the date...
  15. ciarra41

    removing dups by min dates keeping the max

    yes thanks for you help.
  16. ciarra41

    removing dups by min dates keeping the max

    start id dates 244547 4/1/2011 244547 4/12/2011 645877 4/24/2011 645877 4/4/2011 588478 4/5/2011 588478 4/16/2011 588478 4/17/2011 854778 4/17/2011 854778 4/8/2011 325411 4/9/2011 325411 4/10/2011 end 244547 4/12/2011 645877 4/24/2011 588478 4/17/2011 854778 4/17/2011 325411 4/10/2011
  17. ciarra41

    removing dups by min dates keeping the max

    I’m trying to remove duplicates records ids keeping the max date and deleting the min. Delete from mytable where id=(select a.id, MIN(CONVERT(varchar(12),a.dates,101)) from mytable as a where a.id=mytable.id and id IN(select id, count(*) rcrds from mytable group by id HAVING count(id) >1 )...
  18. ciarra41

    Arithmetic overflow error

    I think this got it; I did not get that error. convert(bigint,CAST(count(*)AS bigint))* 8192 / (1024 * 1024)

Part and Inventory Search

Back
Top