Do Foreign Key Boost Performance?

Aug 31, 2007

Hello,

can Foreign Keys boost performance resp. Select or Where Statement in combination with a join?

Silas

View 14 Replies


ADVERTISEMENT

To Boost Performance

Apr 1, 2006

We are designing the database for a high load web application.

We used 4 techniques.

1.No outer joins,No Unions, > only in reports
2.No joins in main forms
3.Choose the smallest dataTypes possible.
4.Used a single instance for all users.


Are there any additional MAJOR ones?

View 14 Replies View Related

Tables Partitioning -- Performance Boost

Nov 13, 2007

Hi

I have a question about the partitioning a table.

I have a database with more 50 tables and 25 tables are having more than 10 lakhs records which includes history records.I have two data files for this database under PRIMARY FILE GROUP.Now i want to transfer these history records to some other database.
I wanted to know if this kind of activity will boost the database performance?.If yes how should i configure my new database.
On what factors of partitioning my performance will boost.

Thanks in advance

Regards
Arvind

View 1 Replies View Related

Can Partitioning A Table Boost My Performance?

Sep 28, 2007

I have an existing database with a table of about 50 milion records. There are also about 20 other tables, but they are alot smaller. The large table has a uniqueidentifier as it's Primary key (not sequential) and a forien key to a 'parent' table. The table also has a column telling when it was created. So, a bit simplified, it looks like:

ChildTable
---------------
Id uniqueidentifier <PK>
ParentId uniqueidentifier <FK>
CreationDate DateTime

ParentTable
-----------------
Id uniqueidentifier <PK>
CreationDate DateTime


Most of the questions accessing the Child table (the large table) is doing so by referensing the parent table, and not the CreatingDate, i.e.
SELECT *
FROM ChildTable
WHERE ParentId = '......'

All records with a specific ParentId will have very similiar CreationDates.

Now, my question is, will Partitioning the ChildTable boost performance for me? In case it will, what column(s) would define the Partitions? If I do it by CreationDate, a select-query like the one above will have to scan all partitions anyway, doesn't it? Doing it by Id isn't soo easy either I guess? If it helps, it might be possible to change the primary keys in the tables to have sequential guids.

Is there perhaps a performance tool to get help with suggestions about how to partition the table? Something like the 'Performance dashboard' reports, but for partitioning?

Regards Andreas



View 10 Replies View Related

Foreign Keys Improve Performance?

Dec 4, 2006

I have this queston that I cannot get a clear answer on. I have searched the internet to find out if using foreign keys have any performane benefits but some articles yes and some say no. So what should I believe here. Does foreign keys have any performance benefits.

View 4 Replies View Related

Priority Boost

Jan 19, 2001

Hi guys.

Is there anyway to increase the priority of a Service in NT services in processing like we have in SQL Server.

-MAK

View 1 Replies View Related

Formatting T-SQL Performacne Boost?????

May 5, 2006

Hey, I'm using PHP with MSSQL, and I'm not having any performace problems or anything, but at the same time I'm trying to optimise our system to work as best as it can as it's going to have a very heavy load once we launch.

I'm running into the age old problem with the battle between optimizing your code and still keeping it readable. I read somewhere that using whitespace in SQL queries is really bad as it take a lot more bandwidth and puts more stress on SQL Server parsing the SQL it is sent. Right now I have a query like so:-

<?php

$selQ = 'SELECT
n.pknewsID AS newsID,
n.title,
n.full_text,
n.publish_up AS datePublished,
CONCAT(u.fname," ",u.lname) AS author,
i.loc AS img_file,
i.descr AS img_caption
FROM tblnews n
LEFT JOIN tblusers u
ON n.fkcreated_by = u.pkuserID
LEFT JOIN tblnews_images i
ON i.fknewsID = n.pknewsID
WHERE
n.pknewsID = '.$articleID.' AND
n.published = 1
LIMIT 1';


$selQ = $DB->setQuery($selQ);

/**
* $DB->setQuery basically is a preg_replace function that
* removes all the tabs in the query string, and replaces them
* with a single space.
*
*/

echo $selQ;


/**

* Printed out it looks like this :-
* SELECT
* n.pknewsID AS newsID
* n.title
* n.full_text
* n.publish_up AS datePublished
* CONCAT(u.fname," ",u.lname AS author,
* i.loc AS img_file,
* i.descr AS img_caption,
* FROM tblnews n
* LEFT JOIN tblusers u
* ON n.fkcreated_by = u.pkuserID
* LEFT JOIN tblnews_images i
* ON i.fknewsID = n.pknewsID
* WHERE
* n.pknewsID = 6 AND
* n.published = 1
* LIMIT 1
*
*/
?>

So the question I have is, does it really matter how the SQL query is sent? I mean, if I put it all on one line (which would kinda suck as it is harder for me to read then), would it speed up transactions significally?

View 1 Replies View Related

Boost SQL Server Priority On Windows 2003

Dec 8, 2005

Hi,

I've noticed declining performance on our main accounting server. We have a Windows 2003 server running SQL 2000 Enterprise and 8 GBs of RAM.

Has anyone used the "boost SQL Server priority on windows" before? If so, were there any major benefits in using it?

This server is excusively used for SQL btw...

Thanks,
DJ

View 3 Replies View Related

[Performance Discussion] To Schedule A Time For Mssql Command, Which Way Would Be Faster And Get A Better Performance?

Sep 12, 2004

1. Use mssql server agent service to take the schedule
2. Use a .NET windows service with timers to call SqlClientConnection

above, which way would be faster and get a better performance?

View 2 Replies View Related

Extremely Poor Query Performance - Identical DBs Different Performance

Jun 23, 2006

Hello Everyone,I have a very complex performance issue with our production database.Here's the scenario. We have a production webserver server and adevelopment web server. Both are running SQL Server 2000.I encounted various performance issues with the production server with aparticular query. It would take approximately 22 seconds to return 100rows, thats about 0.22 seconds per row. Note: I ran the query in singleuser mode. So I tested the query on the Development server by taking abackup (.dmp) of the database and moving it onto the dev server. I ranthe same query and found that it ran in less than a second.I took a look at the query execution plan and I found that they we'rethe exact same in both cases.Then I took a look at the various index's, and again I found nodifferences in the table indices.If both databases are identical, I'm assumeing that the issue is relatedto some external hardware issue like: disk space, memory etc. Or couldit be OS software related issues, like service packs, SQL Serverconfiguations etc.Here's what I've done to rule out some obvious hardware issues on theprod server:1. Moved all extraneous files to a secondary harddrive to free up spaceon the primary harddrive. There is 55gb's of free space on the disk.2. Applied SQL Server SP4 service packs3. Defragmented the primary harddrive4. Applied all Windows Server 2003 updatesHere is the prod servers system specs:2x Intel Xeon 2.67GHZTotal Physical Memory 2GB, Available Physical Memory 815MBWindows Server 2003 SE /w SP1Here is the dev serers system specs:2x Intel Xeon 2.80GHz2GB DDR2-SDRAMWindows Server 2003 SE /w SP1I'm not sure what else to do, the query performance is an order ofmagnitude difference and I can't explain it. To me its is a hardware oroperating system related issue.Any Ideas would help me greatly!Thanks,Brian T*** Sent via Developersdex http://www.developersdex.com ***

View 2 Replies View Related

Very Poor Performance - Identical DBs But Different Performance

Jun 22, 2006

Hello Everyone,I have a very complex performance issue with our production database.Here's the scenario. We have a production webserver server and adevelopment web server. Both are running SQL Server 2000.I encounted various performance issues with the production server witha particular query. It would take approximately 22 seconds to return100 rows, thats about 0.22 seconds per row. Note: I ran the query insingle user mode. So I tested the query on the Development server bytaking a backup (.dmp) of the database and moving it onto the devserver. I ran the same query and found that it ran in less than asecond.I took a look at the query execution plan and I found that they we'rethe exact same in both cases.Then I took a look at the various index's, and again I found nodifferences in the table indices.If both databases are identical, I'm assumeing that the issue isrelated to some external hardware issue like: disk space, memory etc.Or could it be OS software related issues, like service packs, SQLServer configuations etc.Here's what I've done to rule out some obvious hardware issues on theprod server:1. Moved all extraneous files to a secondary harddrive to free up spaceon the primary harddrive. There is 55gb's of free space on the disk.2. Applied SQL Server SP4 service packs3. Defragmented the primary harddrive4. Applied all Windows Server 2003 updatesHere is the prod servers system specs:2x Intel Xeon 2.67GHZTotal Physical Memory 2GB, Available Physical Memory 815MBWindows Server 2003 SE /w SP1Here is the dev serers system specs:2x Intel Xeon 2.80GHz2GB DDR2-SDRAMWindows Server 2003 SE /w SP1I'm not sure what else to do, the query performance is an order ofmagnitude difference and I can't explain it. To me its is a hardware oroperating systemrelated issue.Any Ideas would help me greatly!Thanks,Brian T

View 2 Replies View Related

Foreign Key

Dec 27, 2003

Hello,

I want to make a poll and have to use a foreign key in my database. This is not possible in Web Matrix so I have to use SQL Enterprise Manager. But don't know how. I read the help but can't figure it out. Can someone help me??? Thanks in advance.

Regards,

Roel Alblas

View 5 Replies View Related

Foreign Key

Sep 14, 1998

Hi!

Is it possible in SQL 6.5 to create a Foreign Key on a field that
has a datatype of SMALLINT? I have created FK`s with
other datatypes, but it doesn`t seem to work with this particular
datatype. Is there some trick to this?


Thank you for your assistance!
Toni

View 2 Replies View Related

3NF Foreign Key

Mar 30, 2006

When you set a foreign key to reference a primary key on another table, does the foreign key automatically update? Can anyone explain just how to make a relational table from just the nuts and bolts SQL statements.

View 1 Replies View Related

Two Foreign Key ?

Dec 20, 2004

Hi there,

I'm trying to make a few tables in SQL (First time user). The tables have been derived from a logical model based around my assignment...

I'm having problem getting two foreign keys in one table in the SQL. I keep getting the duplicate foreign key error...

I'm not sure where i'm going wrong.....

http://img.photobucket.com/albums/v294/Jertsy/Agh.jpg


there’s a pic of my tables.... There are 4 tables, blog, blogger, blog_entry, and comment.. Blog is only table without a FK.

have a look & thanks for any and all help....

Spencer.

View 1 Replies View Related

Foreign Key

Jun 23, 2007

Hi Friends,Is there any way to get the table name which is referenced by theforeign keyfor example: consider two table "Staff" and "Department"Staff with following columnsPK_IDFK_DepartmentIDNameAddressDepartment with following columnsPK_DepartmentIDDeptNameActually what i need is: Initially i would be having the table name as"Staff"from Staff table i need to identify that the column FK_DepartmentID isa foreign keyand the primary key is in the Department tablei need to traverse from Staff table and identify that FK_DepartmentIDis a primary key in Department tablethis has to be accomplished by sql query.... probably this could befetched fromData Dictionary but i couldnt find the relationship between the systemtables.ThanksArunDhaJ

View 1 Replies View Related

Foreign Key

Jun 5, 2007

I would like to create a foreign key but the Primary table has 2 fields as it Primary Key. Is there a way to create a Foreign Key that links only on one field of the primary key.



Ex: table 1: id int , language char(2), description varchar(100) PK = ID + language

table 2 : id int, idlanguage int PK = id FK (idLanguage refers to id from table 1)



This cause an error because the foreign key does not include all part of the primary key.



Rufen

View 3 Replies View Related

Foreign Key

Jan 4, 2008

table1
-------
a1 number(10) PK
b1 varchar2(3)
c1 number(10)

Table2
----------
d1 number(10) PK
b1 varchar2(3)
c1 number(10)

Can I make a Foreign key from Table2(b1,c1) to table1(b1,c1) if b1 in table1 might be null.


When I tried that I got this.
ORA-02270: no matching unique or primary key for this column-list

View 6 Replies View Related

Getting Rid Of Foreign Key, How Do I Do That

Apr 13, 2008

Hi everyone,
My main table has a column named "customer" which is a foreign key pointed to my secondary table consisted of a column "customer_id".
I wanted to change my secondary table's customer_id's name into another name whereby deleting it and create a new column instead (i dont know another way of changing names by code) but i'm not allowed to do that due to "customer_is"'s being attached to my main table as FK.
Any suggestion how to do it ?
Thanks a lot.

View 9 Replies View Related

Foreign Key

Aug 10, 2007

i want to make primary key and foreign key relationship of table A1 and table B1 but A1 exist in database A and B1 exist in database B
column name u can pretain as C1, C2

View 5 Replies View Related

Foreign Key Columns

Aug 8, 2006

I am deleting a column from a table in code.  Before I drop the colum I need to find if the column belongs to a foreign key.  I have the names of the foreign keys for the table from sysobjects.How can I determine what columns are part of the foreign key?

View 9 Replies View Related

Foreign Key Problem?

Oct 5, 2006

Just installed this the Forum starter Kit and am getting this message when I try to add the first threadI'm a bit of a newbie but not only damp behind the earsThe INSERT statement conflicted with the FOREIGN KEY constraint "FK_MembersForums_MemberInfo". The conflict occurred in database "SQL2005_****_*****01", table "dbo.MemberInfo", column 'memberid'.The statement has been terminated.  What do I need to do to the SQL Tables in order to get this to work?

View 3 Replies View Related

Problems With Foreign Key

Nov 9, 2006

Hi, i have 3 tables.
Orders: {OrderNr(PK, autonumber), date}
Order_Line: {OrderNr(FK), ItemNr(FK), number}
Items: {ItemNr(PK), Name, ...}
 
How do I insert a new Order with a new order_line? I get this error: The INSERT statement conflicted with the FOREIGN KEY constraint
I can't figure out how to capture the autogenerated OrderNr.

View 1 Replies View Related

Foreign Keys

Apr 17, 2007

Can any body tell me how to know to what columns of other table it refers to.
shiva kumar

View 2 Replies View Related

How Do I Create A Foreign Key

Apr 27, 2007

I have a one to many relationship between two tables. The master table is keyed using an int ID field set to IsIdentity yes and this is the primary key. The field name is ChurchID. Likewise the detail table has such a field as it's primary key and is named ContactID.
 I carry the ChurchID field in the detail table and would like to make it the foreign key. I could not find this explained in the two books I have and the help was anything but that )perhaps it's just me afterall).
 Well, any help in this matter would be greatly appreciated as I find myself at a standstill until this can be resolved.
Thanks in advance.

View 2 Replies View Related

Help With Foreign Key Relationship

Jul 3, 2007

When I try to insert a record on my DB (SQL 2005 Express) I get a constraint error. This is my table setup which has been simplified to expose the problem I have:
Categories TABLEint CatId PKvarchar CatName    :
Items TABLEint ItemId PKvarchar ItemName      :
X_Items_Categoriesint CatIdint ItemId
So  basically I have a one-to-many relationship between Items and Categories, in other words each item is associated to one or more categories and this association is done via the X_Items_Categories cross table. On this cross table I set two constraints:


The CatId of each entry in the cross table (X_Items_Categories) must exist in the Category table, and

View 4 Replies View Related

SQL Syntax For Foreign Key

Nov 30, 2007

I am new beginner for SQL .I have requirement of using foreign key in tables I have created earlier.Can anyone tell me the syntax for the same  ?
Please help me, Your suggestions are welcome.
 
 
 
 

View 6 Replies View Related

Foreign Key Problem

Mar 13, 2008

I'm trying to enter data into a SqlServer 2005 database programatically.  The databases are part of an open source program I have.  I'm encountering the following error when I try to enter data into a particular table:The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CMRC_ProductImages_CMRC_Products". The conflict occurred in database "hscom", table "dbo.CSK_Store_Product", column 'productID'. The statement has been terminated. I understand what's happening theoretically, but I don't know where to look for where the constraint is defined, or how to fix it.  I don't see FK_CMRC_ProductImages_CMRC_Products as a file name or a stored procedure.  Diane 

View 3 Replies View Related

Adding Foreign Key

Apr 7, 2008

tell me how to add foreign keys in sql 2005 express

View 3 Replies View Related

Remove Foreign Key

Apr 26, 2004

Hi

Can anyone tell me how I can remove a foreign key in a SQL database?

Thanks in advance

View 4 Replies View Related

Foreign Key Conflict

Sep 24, 2004

Hi;

I have 2 tables Users and DVDTestResults these tables have a relation over UserID
Users.UserID
DVDTestResults.UserName

both char

But when I try to insert in DVDTestResults I am having an error:

INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_DVDTestResults_Users'. The conflict occurred in database 'Test', table 'Users', column 'UserID'. The statement has been terminated.


can you help me why?
thank you....

View 7 Replies View Related

Foreign Key Tangle

Aug 12, 2005

I'm using stored procedures to update my tables. If I disable the foreign key constraint all works perfectly. Otherwise I get this error:INSERT statement conflicted with TABLE FOREIGN KEY constraint 'FK_wansub_invoice'. The conflict occurred in database 'test1', table 'invoice'. The statement has been terminated. I don't understand why I'm getting the error, because when I disable the constraint even the foreign key fields are updated properly and there is no apparent conflict with the linked table. I've included my c# code and the stored procedure below.FYI the foreign keys in question are InvoiceDate, AccountNum, CarrierId, and Cycle. These are the primary keys in the "invoice" table, and foreign keys in the "wansub" table. It is vital that all records in the wansub table are matched with a record in the invoice table, so I have to have this constraint in place. C# code to create parameters and call the sp:
public int updateWanTable(WanSubaccount sub, Invoice invoice)
{
SqlCommand cmdUpdateWan;
int returnvalue = 0;

cmdUpdateWan = new SqlCommand("usp_updatewan", conn);
cmdUpdateWan.CommandType = CommandType.StoredProcedure;

SqlParameter invoicedate = cmdUpdateWan.Parameters.Add("@InvoiceDate", SqlDbType.SmallDateTime);
invoicedate.Value = DateTime.Parse(invoice.InvoiceDate.Trim());

SqlParameter subaccountnumber = cmdUpdateWan.Parameters.Add("@SubaccountNumber", SqlDbType.VarChar, 50);
subaccountnumber.Value = sub.SubaccountNumber.Trim();

SqlParameter addressa = cmdUpdateWan.Parameters.Add("@AddressA", SqlDbType.VarChar, 50 );
addressa.Value = sub.Address.Trim();

SqlParameter citya = cmdUpdateWan.Parameters.Add("@CityA", SqlDbType.VarChar, 50 );
citya.Value = sub.City.Trim();

SqlParameter statea = cmdUpdateWan.Parameters.Add("@StateA", SqlDbType.VarChar, 50 );
statea.Value = sub.State.Trim();

SqlParameter zipa = cmdUpdateWan.Parameters.Add("@ZipA", SqlDbType.NChar, 10 );
zipa.Value = sub.Zip.Trim();

SqlParameter countrya = cmdUpdateWan.Parameters.Add("@CountryA", SqlDbType.VarChar, 50 );
countrya.Value = sub.Country.Trim();

SqlParameter addressb = cmdUpdateWan.Parameters.Add("@AddressB", SqlDbType.VarChar, 50 );
addressb.Value = sub.AddressB.Trim();

SqlParameter cityb = cmdUpdateWan.Parameters.Add("@CityB", SqlDbType.VarChar, 50 );
cityb.Value = sub.CityB.Trim();

SqlParameter stateb = cmdUpdateWan.Parameters.Add("@StateB", SqlDbType.VarChar, 50 );
stateb.Value = sub.StateB.Trim();

SqlParameter zipb = cmdUpdateWan.Parameters.Add("@ZipB", SqlDbType.NChar, 10 );
zipb.Value = sub.ZipB.Trim();

SqlParameter countryb = cmdUpdateWan.Parameters.Add("@CountryB", SqlDbType.VarChar, 50 );
countryb.Value = sub.CountryB.Trim();

SqlParameter speed = cmdUpdateWan.Parameters.Add("@Speed", SqlDbType.VarChar, 50 );
speed.Value = sub.Speed.Trim();

SqlParameter type = cmdUpdateWan.Parameters.Add("@Type", SqlDbType.VarChar, 50 );
type.Value = sub.Type.Trim();

SqlParameter monthlycharge = cmdUpdateWan.Parameters.Add("@MonthlyCharge", SqlDbType.Money );
monthlycharge.Value = sub.MonthlyServiceFee;

SqlParameter discounts = cmdUpdateWan.Parameters.Add("@Discounts", SqlDbType.Money );
discounts.Value = sub.Discounts;

SqlParameter other = cmdUpdateWan.Parameters.Add("@Other", SqlDbType.Money );
other.Value = sub.Other;

SqlParameter ucc = cmdUpdateWan.Parameters.Add("@UCC", SqlDbType.Money );
ucc.Value = sub.Ucc;

SqlParameter fedtax = cmdUpdateWan.Parameters.Add("@FedTax", SqlDbType.Money );
fedtax.Value = sub.FedTax;

SqlParameter statetax = cmdUpdateWan.Parameters.Add("@StateTax", SqlDbType.Money );
statetax.Value = sub.StateTax;

SqlParameter othertax = cmdUpdateWan.Parameters.Add("@OtherTax", SqlDbType.Money );
othertax.Value = sub.OtherTax;

SqlParameter accountnum = cmdUpdateWan.Parameters.Add("@AccountNum", SqlDbType.VarChar, 50 );
accountnum.Value = invoice.AccountNumber.Trim();
SqlParameter carrierid = cmdUpdateWan.Parameters.Add("@CarrierId", SqlDbType.Int );
carrierid.Value = invoice.CarrierId;

SqlParameter isthirdparty = cmdUpdateWan.Parameters.Add("@IsThirdParty", SqlDbType.Bit );
isthirdparty.Value = sub.IsThirdParty;

SqlParameter thirdparty = cmdUpdateWan.Parameters.Add("@ThirdPartyBillingCompany", SqlDbType.VarChar, 50 );
thirdparty.Value = sub.ThirdPartyBillingCompany.Trim();

SqlParameter var = cmdUpdateWan.Parameters.Add("@Comments", SqlDbType.VarChar, 255 );
var.Value = sub.Comments.Trim();

SqlParameter notes = cmdUpdateWan.Parameters.Add("@Notes", SqlDbType.VarChar, 255 );
notes.Value = sub.Notes.Trim();

SqlParameter cycle = cmdUpdateWan.Parameters.Add("@Cycle", SqlDbType.Int );
cycle.Value = invoice.Cycle;



// try
// {
conn.Open();
// }
// catch{
//
// }
// try{
returnvalue = cmdUpdateWan.ExecuteNonQuery();
// }
// catch(SqlException e){
// returnvalue = 2;
// }
// finally{
conn.Close();
fill(this);
// }

return returnvalue;
}The SP:CREATE PROCEDURE usp_updatewan( @InvoiceDate smalldatetime, @SubaccountNumber varchar(50), @AddressA varchar(50), @CityA varchar(50), @StateA varchar(50), @ZipA nchar(10), @CountryA varchar(50), @AddressB varchar(50), @CityB varchar(50), @StateB varchar(50), @ZipB nchar(10), @CountryB varchar(50), @Speed varchar(50), @Type varchar(50), @MonthlyCharge money, @Discounts money, @Other money, @UCC money, @FedTax money, @StateTax money, @OtherTax money, @AccountNum varchar(50), @CarrierId int, @IsThirdParty bit, @ThirdPartyBillingCompany varchar(50), @Comments varchar(255), @Notes varchar(255), @Cycle int)
AS
if exists  ( select  *  from  wansub where InvoiceDate = @InvoiceDate and   SubaccountNumber = @SubaccountNumber and   AccountNum = @AccountNum and   CarrierId = @CarrierId and   Cycle = @Cycle ) Begin --if the record exists update  wansub set  AddressA = @AddressA,  CityA = @CityA,  StateA = @StateA,  ZipA = @ZipA,  CountryA = @CountryA,  AddressB = @AddressB,  CityB = @CityB,  StateB = @StateB,  ZipB = @ZipB,  CountryB = @CountryB,  Speed = @Speed,  Type = @Type,  MonthlyCharge = @MonthlyCharge,  Discounts = @Discounts,  Other = @Other,  UCC = @UCC,  FedTax = @FedTax,  StateTax = @StateTax,  OtherTax = @OtherTax,   IsThirdParty = @IsThirdParty,  ThirdPartyBillingCompany = @ThirdPartyBillingCompany,  Comments = @Comments,  Notes = @Notes  EndElse Begin
 insert into wansub values (@InvoiceDate,  @SubaccountNumber, @AddressA, @CityA, @StateA, @ZipA,  @CountryA, @AddressB, @CityB, @StateB, @ZipB, @CountryB, @Speed,  @Type,  @MonthlyCharge, @Discounts, @Other, @UCC, @FedTax, @StateTax, @OtherTax,  @AccountNum,  @CarrierId, @IsThirdParty, @ThirdPartyBillingCompany, @Comments,   @Notes, @Cycle)
 EndGOAny help is greatly appreciated! Especially since I have other tables with this very problem as well . . .

View 4 Replies View Related

Foreign Key In One To Many Relationship

Feb 20, 2006

Hi
I have a one to many relationship between two MS SQL tables.
When inserting a record in the master table (primary key is autoinc) how can I get this value for setting in the foreign key details table?
TIA

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved