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
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...
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...
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...
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...
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]'%'
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.
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...
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 )...
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.