Viewing 15 posts - 11,131 through 11,145 (of 26,486 total)
Here is some code to play with as well.
create table dbo.EmployeeWork
(
empid int,
CountryWorkAt Varchar(20)
);
insert into dbo.EmployeeWork values (1,'China');
insert into dbo.EmployeeWork values (1,'Germany');
insert into dbo.EmployeeWork values(1,'USA');
insert into dbo.EmployeeWork values(2,'China');
insert into dbo.EmployeeWork values(3,'India');
insert...
June 21, 2012 at 4:33 pm
And before I go any further, please verify what version of SQL Server you are running. I just noticed that this is in a SQL Server 7/2000 forum, and...
June 21, 2012 at 4:16 pm
themangoagent (6/21/2012)
I just want the ID as long as it is continuously eligible from let's say January through June.
So
select * from #mytable
should return 999.
Again, what are we trying to...
June 21, 2012 at 4:13 pm
SQLRNNR (6/21/2012)
Koen Verbeeck (6/21/2012)
Lynn Pettis (6/21/2012)
OMGPlease, I really hope this person was joking.
Oh god not him.
He's the most important reason I have such a high post count. Trying to help...
June 21, 2012 at 3:52 pm
james-1023125 (6/21/2012)
Nope. sorry but you have sp. in there and no AS for sp. GTry running it yourself
Also, didn't see you suggest any alternatives, so keep your snarkiness...
June 21, 2012 at 3:49 pm
james-1023125 (6/21/2012)
Nope. sorry but you have sp. in there and no AS for sp. GTry running it yourself
Yep, I missed changing a couple of sp aliases. Sorry.
June 21, 2012 at 3:47 pm
ssc_san (6/21/2012)
You haven't answered the question, how does a SQL query know that '01-' is supposed to be '001' not '010'? You have said that '010' is not...
June 21, 2012 at 3:45 pm
Try this script:
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET...
June 21, 2012 at 3:43 pm
Based on the data provided, what is your expected output?
June 21, 2012 at 3:38 pm
Evil Kraig F (6/21/2012)
June 21, 2012 at 3:33 pm
ssc_san (6/21/2012)
Lynn Pettis (6/21/2012)
ssc_san (6/21/2012)
Here is my problem, I would expect you want '010' not '007' if the '-' in '01-' were a '0', why would you expect '01-' to...
June 21, 2012 at 3:20 pm
ssc_san (6/21/2012)
Here is my problem, I would expect you want '010' not '007' if the '-' in '01-' were a '0', why would you expect '01-' to be less than...
June 21, 2012 at 3:08 pm
Sean Lange (6/21/2012)
Can you explain the rules behind why ID 1 returns 1 value and ID 5 would return 2?
Because there are two columns with the value Company Name:
insert...
June 21, 2012 at 2:53 pm
Viewing 15 posts - 11,131 through 11,145 (of 26,486 total)