Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mind_grapes
Yak Posting Veteran
71 Posts |
Posted - 2009-08-05 : 06:47:37
|
Really need some confirmation guys, I am new so apologies if this is obvious / silly question.I'm not sure if im missing something or just being silly, but i have 4 tables that i thought were linked, but now im not so sure.the four tables are:tblzonetypes, tblzones, tblstores2zones and tblstores.tblstores2zones links together stores and zones (fairly obvious i know) by fk's, fk_storeID and fkZoneID. ZoneTypes is linked to Zones.The four columns in tblstores2zones are: stores2zonesID, fk_storeID, fk_zoneID and active.However, when i put in a digit to ref zoneID in the fk_zoneID (in tblstoes1Zones), it is picking up the zonetypeID form the tblZoneType? Is this how it normally works?I thought it would pick up the fk_zoneID, as the column is named?any help would be greatThank all,kind regardsMG |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-08-05 : 07:18:22
|
Confused is the right word!Are we talking about a select statement or what?What is the meaning of "when i put in a digit to ref zoneID", are we talking about an application? No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
mind_grapes
Yak Posting Veteran
71 Posts |
Posted - 2009-08-05 : 08:11:45
|
Hi, Yeah i use a select statement in a stored procedure to output the contents to a drop down menu.Well, the table stores2zones has a column called fk_storeID, which is a unique number for a store/shop, and a number for something called Zones (fk_zonesID - areas within stores/shops such as windows, cabinest etc.).This "digit" is a unique number that has been set to zonesID/fk_zoneID, that picks up from the tblzones as having X against it. Hope this makes sense? What d'you think the prob could be? RegardsMGquote: Originally posted by webfred Confused is the right word!Are we talking about a select statement or what?What is the meaning of "when i put in a digit to ref zoneID", are we talking about an application? No, you're never too old to Yak'n'Roll if you're too young to die.
|
|
|
johnconstraint
Starting Member
23 Posts |
Posted - 2009-08-05 : 08:13:46
|
If you are talking about SQL statements, can you place a sample code here ? That would help to underrstand the question. |
|
|
johnconstraint
Starting Member
23 Posts |
Posted - 2009-08-05 : 08:14:47
|
oops..sorry never mind...just saw your latest post... |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-08-05 : 08:19:48
|
even better, follow the HOW TO link in my signature, and restate your question. :)http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
|
|
|
|
|