473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

select 3 values from one table to return in one rs

strSearch is a dynamically created search string

Copy of select statement below

sql = "SELECT
Master.Master_Key,Master.First_App,Original_Info_D ate,Last_Info_Date,Area.Ar
ea_Name
AS Area_Name, State_Cntry.State_Cntry_Name, Company.Oper_Name1 AS
Oper_Name1, Company.Oper_Name2 AS Oper_Name2, " _
& " Company.Oper_Name3 AS Oper_Name3, Location.City AS City,
Projects.Project_Name AS Project_Name, " _
& " Expansion.Expansion_Code AS Expansion_Code,
Master.Cap_Size AS cap_size, Cap.Cap_Unit AS Cap_Unit, Master.Cost AS
Cost, " _
& " Master.Status AS Status, Master.Estimated_Year_Completed
AS Estimated_Year_Completed " _
& " FROM Master INNER JOIN " _
& " Area ON Master.Area_Key = Area.Area_Key INNER JOIN " _
& " Company ON Master.Company_Key = Company.Company_Key INNER
JOIN " _
& " Location ON Master.Location_Key = Location.Location_Key
INNER JOIN " _
& " Expansion ON Master.Expansion_Key =
Expansion.Expansion_Key INNER JOIN " _
& " Cap ON Master.Cap_Key = Cap.Cap_Key INNER JOIN " _
& " Projects ON Master.Project_Key = Projects.Project_Key
INNER JOIN " _
& " State_Cntry ON Location.State_Cntry_Key =
State_Cntry.State_Cntry_Key " _
& " WHERE " & strSearch _
& " ORDER BY Area.Area_Key, State_Cntry_Name,Oper_Name1,City"
The table I need to access is called LEC

LEC_Key (PK)
Master_Key - Database Master Key
Company_Key - matches the company
LEC_Type_Key - 3 types per company (values L,E or C)

Each Master Key will have 3 values in the table, one each of L,E and C

Hope this makes some sort of sense

Thanks in advance

Simon Christie
Jul 20 '05 #1
0 977

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
11
by: Jeff Sandler | last post by:
I need a MySQL select statement as part of a PHP script. I want to find rows where a certain column either starts with or equals a user-supplied string. The string will be 1 or more characters in...
0
by: steve stevo | last post by:
I am having trouble accessing a table and am seeking out some advise on how to do it. I have a select statement that joins several tables and everything works ok , however I want to access a...
7
by: Sunny K | last post by:
Hi guys, whilst working on a project which I thought was nearly complete I have come across a problem which was some how over seen, which I am hoping one of you guys know how to resovle. ...
5
by: Reestit Mutton | last post by:
Hi, I'm currently learning the ropes with CSS, PHP, MYSQL, Javascript etc... by redesigning my website as a database driven site. Okay, so I'm skilled at perl, data manipulation and data...
7
by: | last post by:
I can't get IE 6 to read the values in my <SELECT..> data entry fields. Netscape 7 and Opera see them, and IE will pass the values to the database, but the javascript validation script gets a null...
4
by: Ed L. | last post by:
I think I'm seeing table-level lock contention in the following function when I have many different concurrent callers, each with mutually distinct values for $1. Is there a way to reimplement...
4
by: satish | last post by:
Values of two columns in two different tables--presentation using select Hi Everyone, i have two tables in the database . One is called address table and one is adressPhone Table. Below...
13
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.