Viewing 15 posts - 1 through 15 (of 27 total)
I was able to use an ISO Week function, then just subtract the week number of the first of the month....add 1 to that and come up with my result...
October 27, 2011 at 7:27 am
Performace Guard (Shehap) (10/12/2011)
select JB.ID1, JB.ID2, JB.stat,JB.item,JR.oper_num, JR.complete, JR.qty_complete,max_date
from TABLE1 JB
join TABLE2 JR on JB.ID1 = JR.ID1 and JB.ID2 = JR.ID2
inner join (
select...
October 12, 2011 at 4:45 pm
I can't seem to get it to translate to my actual tables (I thought I could use Northwind as an example - but it's not quite the same)
use [tempdb]
go
CREATE TABLE...
October 12, 2011 at 3:39 pm
nitin1309 (10/12/2011)
You said
"and this is my query2:
SELECT Orders.CustomerID, customers.companyname, max(Orders.ShippedDate)
FROM Orders INNER JOIN
Customers ON Orders.CustomerID = Customers.CustomerID
where Customers.Country='usa'
GROUP BY Orders.CustomerID, Customers.CompanyName
I want query...
October 12, 2011 at 1:51 pm
R.P.Rozema (10/12/2011)
October 12, 2011 at 1:50 pm
nitin1309 (10/12/2011)
I didn't sleep at all last night so I'm not able to even comprehend that today. To put it...
October 12, 2011 at 12:00 pm
nitin1309 (10/12/2011)
have you ever tried using Rank By Partition() ?
Only in easier examples than this. Not sure how to do it here.
October 12, 2011 at 11:36 am
My mistake - when I was translating everything back from the generic code I had a typo - all is good. Thank you - that was EXACTLY what I...
September 21, 2011 at 1:42 pm
Thanks Sean - that's almost there! For some reason it's cutting off the first digit in that new column. (e.g. 16 is showing as 6 for me)
September 21, 2011 at 11:19 am
If you take that query - what I need is third column that shows the first value that is in the concat field (the one with the "stuff" command).
September 21, 2011 at 9:39 am
Thank you GSquared!
I still need help. I was working on finding the first value of a field and then concatenation all values for that field. I am able...
September 21, 2011 at 7:36 am
Again - it's been a tough day so please go easy on me.
I've revised what I want:
create table #temp
(
ID nvarchar(20),
...
September 20, 2011 at 3:59 pm
I tried code that someone else posted (but has now deleted). The code above does work. Thank you!!! (I just hadn't read that far when I tried...
September 20, 2011 at 2:34 pm
For some reason that's just returning every row. Any other ideas? How about first location by alpha?
September 20, 2011 at 2:11 pm
ok - just found a column with unique values that we could use. Let's call it COL3 (ADDED UP IN FIRST POST)
September 20, 2011 at 1:48 pm
Viewing 15 posts - 1 through 15 (of 27 total)