8 Reputation Points
Ranked #3K
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #55.0K
3 Posted Topics
Hi, First insert the row in parent table and save it after that insert in child table. This error comes when you try to insert a value in foreign key column which is not present in primary key column. Good Luck. Alok Pathak
Hello There, Try to use join instead of subquery. Use below given modified query. SELECT SUM(a.Population) FROM CBDemographics a JOIN CBTechProviderData b ON a.CensusBlockID=b.CensusBlockID AND LEFT(b.CensusBlockID, 5) = 55001 AND b.TransTech = 80 Create index on b.CensusBlockID and b.TransTech and try to avoid function with where clause. Regards, Alok Pathak
Re: copying rows
Hi, Just prepare rows in excel and save in .csv format. After that use load data infile to upload rows in bulk. Hope it helps. Regards, Alok Pathak
The End.
alokp16