Viewing 15 posts - 121 through 135 (of 283 total)
mandania (6/29/2015)
Hi, i tried but the rowNum column is returning null. I can only see the inserted values.
I just checked the docs and they state that cte's and Row_Number are...
June 29, 2015 at 9:38 am
This gives the output you specified:
declare @t table
(
subID int,
prodgdate date,
salesdate date,
prodendDate date
)
insert @t (subID, prodgdate, salesdate, prodendDate) values
...
June 29, 2015 at 8:30 am
Glad it worked for you!
June 24, 2015 at 10:04 pm
SandyTucker (6/23/2015)
June 23, 2015 at 7:57 pm
Oops. Didn't see it had been taken care of!
June 5, 2015 at 2:38 pm
bsmith 63193 (6/4/2015)
Looking at the query, I don't see anywhere that is calculating the percentages?
No, there are no percentages. The query I came up with might make it easier to...
June 4, 2015 at 9:18 am
Give this a try:
;with cte_Name as
(
Select StudentID,
AVG(Focus1) FocusAvg,
...
June 3, 2015 at 5:33 pm
bsmith 63193 (6/3/2015)
INSERT INTO [dbo].[LDCScores]
([studentName]
,[studentID]
...
June 3, 2015 at 5:19 pm
subhashacharya1 (5/27/2015)
i don't think you need to use the count function.
For this particular data set, you are right. But the OP's specs included this requirement:
records that has single entry...
May 27, 2015 at 11:20 am
This little snippet returns your expected output:
declare @t table
(
id char(2),
type int
)
insert @t (id, type) values
('c1', 0)
,('c2', 5)
,('c3', 0)
,('c4', 0)
...
May 27, 2015 at 12:38 am
DBA2015 (5/26/2015)
I am trying to update a table called CardioStaffClinical which has a field called LightsonLongname which is currently blank
Part of the query is comparing First Name and Last name...
May 26, 2015 at 11:27 am
When I see that Joe Celko has posted a message I know that some level of entertainment will be attained:rolleyes:. I guess he crossed some boundary. It seems every single...
May 23, 2015 at 7:00 pm
You may have a really good reason for wanting to have a table with this structure, but, in my opinion, it is a very bad idea. You are de-normalizing the...
May 23, 2015 at 6:31 pm
DonFord81 (5/22/2015)
LinksUp (5/22/2015)
For an average of all the prices for a given SalesID, this seems to work just as well:
select SalesID, AVG(price) from @t
group...
May 22, 2015 at 4:06 pm
DonFord81 (5/22/2015)
SalesID RxFill_ID Price QuotaYear QuotaMonth
16 ...
May 22, 2015 at 3:51 pm
Viewing 15 posts - 121 through 135 (of 283 total)