Viewing 15 posts - 76 through 90 (of 122 total)
Although I'm not sure why you would want to do this there is a way. You can create a stored procedure which calls your exec('create view...') statement.
create...
April 14, 2009 at 9:35 am
Do you have the option to temporarily map an external drive and set the tempDB to use that drive during this process?
April 14, 2009 at 9:31 am
If you are using a UNION instead of a UNION ALL that is a performance hit as well. UNION returns distinct rows of data so you have to deal...
April 14, 2009 at 9:28 am
Look into OPENDATASOURCE in Books Online. That should get you started
April 13, 2009 at 12:45 pm
Another interesting point, if you modify the query like this:
select P.fldYear as JIMMY, cast(P.fldYear as varchar) +
case when P.fldStage > 2 then ' Final' else ' Initial'...
March 12, 2009 at 3:49 am
Jeff, quick question. Since I used a clustered index couldn't I "assume" that the order would be as I want it?
I know to never assume...
ST
March 5, 2009 at 7:56 am
Gail, I'm confused as to why to use the datediff function.
declare @dt datetime
set @dt = '1/31/2008'
-- 2 months out
-- Note that this adds 2 to the...
March 4, 2009 at 12:51 pm
I knew I remembered a way to do this with variables!
Credit where it's due, Jeff showed me this a while ago. It took me a while to remember it.
set...
March 4, 2009 at 8:21 am
Is this a better approach, Jeff?
set nocount on
set statistics io on
set statistics time on
-- Drop if necessary
drop table #tbl
create table #tbl (IID int identity(1, 1), num int)
create clustered index tmpIndexIID...
March 4, 2009 at 6:44 am
Ashwin M N, please forgive the flames but it had to have taken you longer to write that the answer didn't match your requirements than it would have taken for...
February 18, 2009 at 5:56 am
create table #tmp (fldID int identity(1, 1), fldNum int)
insert into #tmp (fldNum)
select 1 as x union all
select 2 as x union all
select 3 as...
February 18, 2009 at 4:42 am
Ken is correct. I apologize that my original queries were incomplete. Here is a query which demonstrates my point:
set statistics io OFF
set nocount on
CREATE TABLE #foo (
...
February 17, 2009 at 8:54 am
Unfortunately it did need tableA in the two sub queries. As I was posting pseudo code I didn't include the many other joins in the sub queries. I...
February 17, 2009 at 8:10 am
Thanks, Jack. I have lots of options as to how to correct the issue. I was interested in a discussion as to why the query would create the...
February 17, 2009 at 7:30 am
Viewing 15 posts - 76 through 90 (of 122 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy