Viewing 15 posts - 76 through 90 (of 283 total)
Raxter (2/10/2016)
Original data
AppIDBreedage
101Pitbull2
102Boxer4
103Pitbull1
104Pitbull5
105Boxer2
106Pitbull2
107Boxer8
108Pitbull1
109Pitbull3
110Boxer8
Expected output
AppIDBreedage
101Pitbull2
102Boxer4
103Pitbull1
104Pitbull5
105Boxer2
106Pitbull2
107Boxer8
108Pitbull1
109Boxer 3
110Boxer8
This raises more questions.
Your example has 2 breeds. What happens when there are more?
How do you relate Pitbulls to Boxers? Or any...
February 10, 2016 at 8:04 am
For example, 'pitbull' is in the table 6 times and 'boxer' is in the table 4 times. They both need to be listed in the database 5 times each based...
February 10, 2016 at 7:29 am
I am posting this as A solution, not as THE solution. I am hoping to learn from a critique of the answer as much as you are!
Deleting is easy. The...
February 9, 2016 at 11:02 pm
archyya (2/1/2016)
etc . . .
WinsLast5games would be an aliased field that would be in this lineup:
team W L Ov Un WinsLast5games
STL 11 5 6...
February 1, 2016 at 11:15 pm
This is untested air code. But, it should be close enough to get you pointed in a direction that should work.
;with cte as
(
Select team, ats, atsloss, O,...
February 1, 2016 at 9:22 pm
abdellahmoh2016 (1/22/2016)
Hi Thank you for your replyIt's because my boss suggested me simple like that
Quite frankly, your boss does not know what he/she is talking about. Reuse of ID's like...
January 22, 2016 at 11:12 pm
imba (1/14/2016)
SELECT A+|+B+|+C
Output is A|B|C similar to a text file.
Is there anyway that I can insert A, B, C into a table...
January 14, 2016 at 4:16 pm
imba (1/14/2016)
SELECT A+|+B+|+C
Output is A|B|C similar to a text file.
Is there anyway that I can insert A, B, C into a table...
January 14, 2016 at 3:34 pm
Welsh Corgi (1/14/2016)
I need to create a new table that has an Identity Column so that I can delete the duplicates.
Setting aside the fact that you don't need an Identity...
January 14, 2016 at 3:28 pm
John Mitchell-245523 (1/11/2016)
Is it not as simple as this?
I don't know. The specs keep changing.
January 11, 2016 at 5:41 am
What the heck. Here are two solutions! The first is a 2012 or better, the other for 2008. Of course, using lead provides much better performance in this case....
January 8, 2016 at 9:38 pm
I'm pretty sure I have a solution. You need to provide a little more information. I need to know which start_date and which end_date you are using in the datediff...
January 8, 2016 at 8:32 am
karine.gambarjan (1/8/2016)
This returns DATEDIFF from the startdate and end_date of the same row where End_date is not null, while I need to calculate a DATEDIFF between 2011-02-01 (end_date row 2)...
January 8, 2016 at 5:18 am
This is a naive way of doing it, but it works.
declare @iDate int = 01092015
select cast(substring(cast(@iDate+100000000 as char(11)), 6, 4) + substring(cast(@iDate+100000000 as char(11)), 2, 4) as date)
January 8, 2016 at 4:33 am
Here is a slightly less complicated version that gives you the difference in days: (Note the setup of table and data!)
declare @t table
(
id int,
product...
January 8, 2016 at 3:54 am
Viewing 15 posts - 76 through 90 (of 283 total)