Hello,
I have two Tables: Table1: GroupID1, GroupName1 and Table2:GroupID2 ,
GroupName2.
I have only one dropdown list (DropDownList1) in my application and through
a stored procedure I want to populate my DropDownList1 from GroupName1 and
GroupName2. How should I write my query?
Thanks,
Jim. 3 1160
You'll probably want to use a union.
select companyname from suppliers union select shipcity from orders
try this on Northwind, it'll return the companynames and shipcity in one
long list.
HTH
Pete
-- http://www.xboxracing.net/
"JIM.H." wrote: Hello, I have two Tables: Table1: GroupID1, GroupName1 and Table2:GroupID2 , GroupName2.
I have only one dropdown list (DropDownList1) in my application and through a stored procedure I want to populate my DropDownList1 from GroupName1 and GroupName2. How should I write my query? Thanks, Jim.
Jim,
You need to join 2 tables with a UNION query.
Eliyahu
"JIM.H." <JI**@discussio ns.microsoft.co m> wrote in message
news:31******** *************** ***********@mic rosoft.com... Hello, I have two Tables: Table1: GroupID1, GroupName1 and Table2:GroupID2 , GroupName2.
I have only one dropdown list (DropDownList1) in my application and
through a stored procedure I want to populate my DropDownList1 from GroupName1 and GroupName2. How should I write my query? Thanks, Jim.
Can you give me an example?
"Eliyahu Goldin" wrote: Jim,
You need to join 2 tables with a UNION query.
Eliyahu
"JIM.H." <JI**@discussio ns.microsoft.co m> wrote in message news:31******** *************** ***********@mic rosoft.com... Hello, I have two Tables: Table1: GroupID1, GroupName1 and Table2:GroupID2 , GroupName2.
I have only one dropdown list (DropDownList1) in my application and through a stored procedure I want to populate my DropDownList1 from GroupName1 and GroupName2. How should I write my query? Thanks, Jim. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brian |
last post by:
I have a dataset containing 2 tables. I need to fill a datagrid using
data from both of these.
If I could create a SQL Statement to fill the datagrid, it would look
like this:
SELECT fields.fieldname, fieldvalues.value FROM fields, fieldvalues
I am having trouble finding documentation explaining how to populate
|
by: Marc Jennings |
last post by:
Hi there,
I'm new to C#, and I have a small problem.
I have created a new DataSet using the code below, and I would like to
be able to populat a drop-down list with the results of the "name"
field. Can anyone help me, please?
*************************************************
|
by: Sharon |
last post by:
I have successfully loaded a DataSet object with a XML schema (XSD).
Now I wish to populate the tables that was created in the DataSet.
I have an XML file/string that contain all the needed data in the same
format as the XSD (the XML file/string was created using this same schema).
The XML file/string may contain data for a single table or...
|
by: Yul |
last post by:
Hi,
We are in the process of designing an ASP.NET app, where a user will
enter some 'Customer ID' to be queried in the database. If the ID is
valid, several stored procedures will be called to populate multiple
webpages containing customer information. There isn't a one-to-one
correlation between the stored procedure and a webpage. In other...
|
by: crjunk |
last post by:
I have 4 different databases that I'm having to pull data from in order
to populate a datagrid. I am able to do this, but my problem is that
because I'm pulling the data from 4 different databases, the data is
ordered alphabetically but is grouped by database.
Here is an example of what is happening to the data in the datgrid with
the code...
| |
by: DSR |
last post by:
Help Please... I would like to populate a combo box on a form with a
query that compares data from two tables. Any record that is unique in
table1 should continue to populate my combobox. The instant the record
appears also in table2 it should no longer be listed in my combo box.
This is not a key field in either of the tables. Basically what...
|
by: john wright |
last post by:
I have my code done to populate a treeview, but when I move it to the
backgroundworker I get an error "Action being performed on this control is
being called from the wrong thread. Marshal to the correct thread using
Control.Invoke or Control.BeginInvoke to perform this action (code to
follow). What am I doing wrong. I moved the LoadWIP...
|
by: Rich |
last post by:
Hello,
I have a search application to search data in tables in a database (3 sql
server tables). I populate 2 comboboxes with with data from each table. One
combobox will contain unique CompanyID's. The second combobox will contain
unique memberID's. Each of the tables that I have to search contain a
CompanyID and a memberID field, and...
|
by: Nate |
last post by:
I am looking to populate a Schedule table with information from two
other tables. I am able to populate it row by row, but I have created
tables that should provide all necessary information for me to be
able
to automatically populate a "generic" schedule for a few weeks or
more
at a time.
The schedule table contains:
(pk) schedule_id,...
|
by: Nate |
last post by:
I am looking to populate a Schedule table with information from two
other tables. I am able to populate it row by row, but I have created
tables that should provide all necessary information for me to be
able
to automatically populate a "generic" schedule for a few weeks or
more
at a time.
The schedule table contains:
(pk) schedule_id,...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |