Viewing 15 posts - 6,526 through 6,540 (of 7,636 total)
This example seems very efficient:
DECLARE @Items TABLE (ID INT IDENTITY(1, 1), Item1 CHAR, Item2 CHAR, Grp bigint)
INSERT ...
June 22, 2008 at 9:20 pm
Try this:
Select C.*, K.Constraint_Name, K.ORDINAL_POSITION as [KEY_POSITION]
From INFORMATION_SCHEMA.COLUMNS C
Left Outer Join INFORMATION_SCHEMA.KEY_COLUMN_USAGE K
ON K.Table_Schema=C.Table_Schema
And K.Table_Name=C.Table_Name
And K.Column_Name=C.Column_Name
And K.Constraint_Name Like 'PK_%'
Order By Table_Schema, Table_Name, Ordinal_Position
June 22, 2008 at 7:50 pm
I think that this is the "connected subgraphs" problem from my Discrete Algorithms class in college. Of course it was in Pascal, not SQL, and it was 30 years...
June 22, 2008 at 4:06 pm
Jeffrey Williams (6/22/2008)
June 22, 2008 at 3:55 pm
Glad it worked out for you.
June 22, 2008 at 3:28 pm
Jeffrey Williams (6/22/2008)
I am not sure where synonyms cannot be used that views can. Any examples?
Synonyms can not use Schema-binding nor be referenced by schema-bound objects. That means...
June 22, 2008 at 12:43 pm
Jeffrey Williams (6/22/2008)
June 22, 2008 at 11:51 am
A View consists of a single Select statement, only.
You can often transform procedural code into a single Select in unobvious ways, but this is always very case-specific. So in...
June 22, 2008 at 11:38 am
It's "While ...", but I would recommend that you figure out how to write set-based code instead of relying on loop-based techniques. The performance difference is about an order...
June 22, 2008 at 11:31 am
It is also possible to automate this process, though that is a bit of work in itself.
June 22, 2008 at 10:26 am
This is a duplicate topic. Please do not cross-post.
Please direct all future replies to this topic:http://www.sqlservercentral.com/Forums/FindPost521163.aspx
June 22, 2008 at 10:24 am
Can you show us the procedure and the execution plans?
June 21, 2008 at 7:37 pm
Garfi61416 (6/21/2008)
June 21, 2008 at 7:14 pm
Well a Veiw will filter all queries through its SELECT statement. If you need to filter it through a procedure, then you woul dneed the view to SLEECT from...
June 21, 2008 at 7:01 pm
Viewing 15 posts - 6,526 through 6,540 (of 7,636 total)