Viewing 15 posts - 2,611 through 2,625 (of 7,631 total)
SQL Guy (5/7/2009)
When you pass a table name as an input parameter to dynamic SQL, it is really impossible. ...
Right. Unfortunately what dynamic SQL is typically used for is...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 2:44 pm
Heh, "was that so hard?" 🙂
Let's see, originally you were loading 4000 files in 90 minutes, so that's about 45 files/minute. Now your loading almost 5000...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 2:38 pm
Jules Bonnot (5/7/2009)
for a large dataset would it not be better to insertt he results of the cte1 into a temp table and run the max query on that
That's definitely...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 2:09 pm
steve smith (5/7/2009)
Bruce W Cassidy (5/6/2009)
RBarryYoung (5/6/2009)
Ah well, that's not too bad then. I mean he could have called me carbuncular, that's not too good. 😛[font="Verdana"]Wait! Oracular![/font]
In...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 1:46 pm
SQL Guy (5/7/2009)
To parse each word from definition from sys.sql_modules and loop them against all objects...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 1:40 pm
No, you're still confusing variable names and column names, only more so now. Try it like this:
alter procedure [dbo].[usp_ImportMultipleFiles]
@filepath varchar(max),
@pattern varchar(max),
@TableName varchar(max)
as
set quoted_identifier off
declare @query varchar (max)
declare...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 1:31 pm
Almost forgot: the "101 rows" have nothing to do with the "299 rows" earlier. The second (299) is the number of files that you want to read in....
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:40 pm
OK, here's your problem. These first and last lines here:
...
select identity(int,1,1) as '@ID', resume into #y from #x
drop table #x
set @max1 = (select max(@ID) from #y)
...
Are problematic in that...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:37 pm
Since you haven't told us where this output is coming from or how each lines is associated with your routine, I am not sure that I can say.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:29 pm
I am not aware of anything like that. In fact, since Dynamic SQL procedures' dependencies are presumably parameter-based, I have no idea how such a thing even could be...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:16 pm
Greg J (5/7/2009)
Was that introduced in 2005?
Yes.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:09 pm
ifila (5/7/2009)
(300 row(s) affected)
(1 row(s) affected)
(299 row(s) affected)
(101 row(s)...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:07 pm
I have to admit, before today I thought that it was possible too. The "you can view what you can access" rule is generally pretty consistent and I was...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 12:06 pm
I was going to rephrase my previous answer, but after re-reading it I cannot think of anyway to make it clearer:
RBarryYoung (5/7/2009)
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 11:43 am
GilaMonster (5/7/2009)
If you do not watch the water fall, the pebbles will never speak.
Unless you take enough Dilaudin. After a few days of that in your IV, those little...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 7, 2009 at 11:37 am
Viewing 15 posts - 2,611 through 2,625 (of 7,631 total)