Viewing 15 posts - 21,436 through 21,450 (of 26,490 total)
No cursor needed, here is a set based way to accomplish your task.
select
COL1,
SUBSTRING(COL2,1,10) as COL2,
COL1 + SUBSTRING(COL2,1,10) as...
April 18, 2009 at 12:43 pm
Alvin Ramard (4/18/2009)
April 18, 2009 at 12:38 pm
Here is another way to do it:
Create Table #Bar (
EmployeeID int
, EName varchar(50)
, VisitedState varchar(60)
)
Insert into #Bar(EmployeeID, EName,...
April 18, 2009 at 12:11 pm
May I ask why you need to do this in the stored procedure? This is something that really should be done by the front end application or report, not...
April 18, 2009 at 10:19 am
Steve Jones - Editor (4/18/2009)
Stop quoting him as well. The...
April 18, 2009 at 9:29 am
Downloading and installing SQL Server Express is great, but if you really want to learn more SQL Server you may want to look at spending a little money. For...
April 18, 2009 at 9:23 am
GilaMonster (4/18/2009)
Lynn Pettis (4/17/2009)
April 18, 2009 at 9:10 am
steve dassin (4/17/2009)
Lynn Pettis (4/17/2009)
steve dassin (4/17/2009)
dphillips (4/17/2009)
steve dassin (4/17/2009)
April 17, 2009 at 8:23 pm
Actually Alvin, your answer is perfect. It's what you are doing behind the locked doors with the phone off the hook that is important. Doing all that just...
April 17, 2009 at 8:18 pm
Hmmm, blame me not for Air Force flashback. Alvin's comment it was.
April 17, 2009 at 7:59 pm
Strange, but something to check, are there any NULL values in Table2 (the one being queried in the WHERE ... NOT IN ?
April 17, 2009 at 7:34 pm
I like Alvin's answer. Reminds me of my days in the Air Force back in England. If the computer crashed, the first thing we did was take the...
April 17, 2009 at 7:31 pm
steve dassin (4/17/2009)
dphillips (4/17/2009)
steve dassin (4/17/2009)
April 17, 2009 at 7:25 pm
Jack Corbett (4/17/2009)
Lynn Pettis (4/17/2009)
April 17, 2009 at 6:17 pm
Change your inner join to a left outer join.
April 17, 2009 at 5:12 pm
Viewing 15 posts - 21,436 through 21,450 (of 26,490 total)