Viewing 15 posts - 19,966 through 19,980 (of 22,213 total)
Take a look at the OUTPUT clause. You can use that to capture inserted data, including identity values, into a temporary table for use in later processing.
July 15, 2008 at 6:08 am
In order to use a foreign key constraint you have to have either a primary key or a unique index/constraint on the table to which you are referencing. Otherwise, you'd...
July 15, 2008 at 5:58 am
We ran into a similar situation once, but in an OLTP system. Long story, short, we only had to do this in a few places and the data load was...
July 14, 2008 at 11:40 am
Access the INFORMATION_SCHEMA views. There's one for tables, columns, routines, parameters...
July 14, 2008 at 11:20 am
You're stuck. You can only reference what constitutes a candidate key, a pk or unique index and then the whole thing or the leading edge... You could create a second...
July 14, 2008 at 11:18 am
But you still have to change the context to run the ALTER/CREATE/whatever script on each of the different environments.
That said, listen to Brandie. Fight the very idea of running...
July 14, 2008 at 11:15 am
Not seeing the code, this might not be applicable, but if you're creating the same derived tables over and over again as part of the query of the view, you...
July 14, 2008 at 11:08 am
Snapshot replication is a one-time, either on demand or scheduled, operation where an entire database structure and all it's data (but not the security settings, etc.) are copied from one...
July 14, 2008 at 8:51 am
If I understand the question, the thing you're looking for is a snapshot. That's an immediate copy of the entire database.
July 14, 2008 at 8:25 am
Well, that depends. If you have the keys needed to find the right row or rows in the child table and all the columns you want are in the child...
July 14, 2008 at 6:31 am
If a PK looks like this:
Col1
,Col2
,Col3
Then in order to reference that as a foreign key, the code would look something like this:
ALTER TABLE [schema].[tablename]
CONSTRAINT [MyFKName] FOREIGN KEY
(Col1
,Col2
,Col3)
REFERENCES [schema].[parenttable]
(Col1
,Col2
,Col3)
The names of...
July 14, 2008 at 6:25 am
From the sounds of things, you should also check some of the basic operations in the code like access order and/or join order. You need to make sure that the...
July 14, 2008 at 6:19 am
If I do the entire design from scratch, how much of the fee do I get?
Seriously though. We're here because we enjoy the technical challenges and each others company. Ask...
July 14, 2008 at 5:23 am
Depending on what kind of data you're trying to get back, yeah. Generally I've seen either a derived table or a correlated sub-query within the ON clause work extremely well...
July 14, 2008 at 5:17 am
Yeah, if you want to equate data set or result set with derived table, then they're the same. Generally though, most people refer to a derived table as a subquery...
July 14, 2008 at 5:13 am
Viewing 15 posts - 19,966 through 19,980 (of 22,213 total)