Viewing 15 posts - 5,416 through 5,430 (of 7,631 total)
I just noticed:
CREATE FUNCTION dbo.file_exists (@filenam as varchar(max))
RETURNS @tabexist TABLE (fileexist int,fileisdir int,parentexist int)
AS
BEGIN
Declare @Exists int
Set @Exists = 0
--INSERT INTO @tabexist EXEC master..xp_fileexist @filenam
EXEC master..xp_fileexist @filenam, @Exists OUTPUT
Insert into...
[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]
September 30, 2008 at 1:28 pm
Heh. Now this is one of the few things that SQLCLR is good for. It is fairly easy to write a SQLCLR Function with EXTERNAL_ACCESS rights to do...
[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]
September 30, 2008 at 1:19 pm
Jeffrey Williams (9/30/2008)
tbeadle (9/29/2008)
SELECT ...
FROM table1
LEFT JOIN table2 ON table2.fkey = table1.key
...
[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]
September 30, 2008 at 1:10 pm
As far as I know, this article is correct (not entirely sure about #2, I think that may only be partialy true). Also, it misses another one: Temp Tables...
[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]
September 30, 2008 at 12:59 pm
Maybe you could write a Logon trigger that does a SET ROWCOUNT 1000? 😀
Of course there are a whole lot of potential problems with 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]
September 30, 2008 at 12:51 pm
Matt Miller (9/30/2008)
And - considering this is getting around a prohibition from the devs - I wouldn't be incredibly surprised if this loophole does get closed at some point.
Aye, there'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]
September 30, 2008 at 12:43 pm
Cool. Have you tried it yet? (Its not that I doubt you :), its just that I have been surprised more than once by how thorough they were 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]
September 30, 2008 at 12:21 pm
dale_keller (9/30/2008)[hrI just wish SQL Server Management Studio would display the record in question when it comes back with the duplicate error message.
Yeah, but what if there were a million...
[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]
September 30, 2008 at 12:16 pm
Here are the queries to find the dupes:
--Find duplicates between source and target
Select T1.PARTY_ID, T1.Client_ID
From PARTY AS T1
Inner Join [PSS_STAGING].[dbo].[party] O1
ON O1.Party_ID = T1.Party_ID
--Find duplicates in source:
Select...
[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]
September 30, 2008 at 12:05 pm
Matt Miller (9/30/2008)
If you allow for using OPENQUERY, it gets a whole lot easier....
That would be better, but I am not actually sure that OPENQUERY can do it Matt. ...
[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]
September 30, 2008 at 11:52 am
ND (9/17/2006)
one way is to use xp_cmdshell to call a batch file where the batch file contains the exec proc statement.
First of all, that is not "one way", it...
[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]
September 30, 2008 at 11:46 am
Ninja's_RGR'us (9/14/2006)
As I said EXCLUDING CLR you can't call a proc in a function.
Even in CLR it is d*mned hard to do. I know, I've tried.
[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]
September 30, 2008 at 11:37 am
ND (9/13/2006)
you can do whatever you want in a function, update/insert/delete exec proc..etcAs long as the function returns a value.
This is absolutely not true.
SQL, like Excel and some other high-level...
[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]
September 30, 2008 at 11:36 am
You would need an additional query to find the duplicate Primary Keys, or you will need a WHERE clause to pre-filter the duplicates out. If you can tell us...
[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]
September 30, 2008 at 11:22 am
You could use INSTEAD OF triggers on B, but I think that you will still have problems.
What you really need is a combined trigger from A & B, but of...
[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]
September 30, 2008 at 11:03 am
Viewing 15 posts - 5,416 through 5,430 (of 7,631 total)