Viewing 15 posts - 4,021 through 4,035 (of 15,381 total)
I agree with Alvin. A cte is nothing but chatter in this instance. If you used a cte it would look like this.
with MyCTE as
(
SELECT .... FROM Active_Table WHERE ......
UNION...
August 13, 2014 at 3:07 pm
eval_stuff (8/13/2014)
August 13, 2014 at 1:53 pm
eval_stuff (8/13/2014)
August 13, 2014 at 1:22 pm
abhas (8/13/2014)
I am having temp table where i am inserting records from to queries.
eg.
insert into #temp 1
select distinct ft.Teacher,ft.Namefrom #Freqteacher1 ft
insert into #temp 1
select distinct ...
August 13, 2014 at 11:04 am
Ed Wagner (8/13/2014)
SQLRNNR (8/13/2014)
Sean Lange (8/13/2014)
whereisSQL? (8/13/2014)
batgirl (8/13/2014)
Sean Lange (8/13/2014)
VacationEnvy
Desire
Over (sadly)
neener neener
Next (as in, the next vacation)
Not soon enough...but scheduled at least. 😀
August 13, 2014 at 10:27 am
Not completely sure what you are trying to do here but shouldn't you be referencing INSERTED somewhere in there?
August 13, 2014 at 10:00 am
Qira (8/13/2014)
Sean Lange (8/13/2014)
August 13, 2014 at 9:14 am
whereisSQL? (8/13/2014)
batgirl (8/13/2014)
Sean Lange (8/13/2014)
VacationEnvy
Desire
Over (sadly)
August 13, 2014 at 8:28 am
Not sure what the question is here. Where does job vacancy come from? The structure you have posted seems reasonable enough but I don't at all understand where all of...
August 13, 2014 at 8:20 am
Lynn Pettis (8/7/2014)
Sean Lange (8/7/2014)
August 13, 2014 at 7:39 am
Well off for vacation for a few days to Colorado Springs. Will be nice to be in cooler air for a few days. See you all next week at some...
August 7, 2014 at 2:59 pm
Here is one way.
declare @Table table (someString varchar(25))
insert @Table
select 'asdf - 10' union all
select 'asdf - jeik - 10'
select left(someString, len(someString) - charindex('-', REVERSE(someString)) - 1)
from @Table
August 7, 2014 at 2:18 pm
Take a look at this article from Jeff Moden. It does exactly what you are asking for. http://www.sqlservercentral.com/articles/T-SQL/71550/%5B/url%5D
August 7, 2014 at 1:53 pm
SQLRNNR (8/7/2014)
Sean Lange (8/7/2014)
jcrawf02 (8/7/2014)
Sean Lange (8/7/2014)
GilaMonster (8/7/2014)
Ed Wagner (8/7/2014)
Put them in the same boat as WC.
Speaking of... If you tried running a query against a table (a simple select)...
August 7, 2014 at 1:48 pm
Viewing 15 posts - 4,021 through 4,035 (of 15,381 total)