SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 im confused, but not sure if im just being stupid
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mind_grapes
Yak Posting Veteran

71 Posts

Posted - 08/05/2009 :  06:47:37  Show Profile  Reply with Quote
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 great

Thank all,


kind regards
MG

webfred
Flowing Fount of Yak Knowledge

Germany
8679 Posts

Posted - 08/05/2009 :  07:18:22  Show Profile  Visit webfred's Homepage  Reply with Quote
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.
Go to Top of Page

mind_grapes
Yak Posting Veteran

71 Posts

Posted - 08/05/2009 :  08:11:45  Show Profile  Reply with Quote
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?

Regards
MG


quote:
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.

Go to Top of Page

johnconstraint
Starting Member

Canada
23 Posts

Posted - 08/05/2009 :  08:13:46  Show Profile  Reply with Quote
If you are talking about SQL statements, can you place a sample code here ? That would help to underrstand the question.
Go to Top of Page

johnconstraint
Starting Member

Canada
23 Posts

Posted - 08/05/2009 :  08:14:47  Show Profile  Reply with Quote
oops..sorry never mind...just saw your latest post...
Go to Top of Page

DonAtWork
Flowing Fount of Yak Knowledge

2143 Posts

Posted - 08/05/2009 :  08:19:48  Show Profile  Reply with Quote
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.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000