473,387 Members | 1,476 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,387 software developers and data experts.

Select of multipel data from database

Hello

I have this codeline:

Set rs = Conn.Execute("SELECT * FROM nyhedsbrev Where postnummer = 7430
")
Where the postcode 7430 is selected, but y nead to draw many ´specifik
numbers at the same time, as well as exclude others. Can anybody help?
Best regard.

Nov 22 '06 #1
3 817
"Claus G" <cl******@jubii.dkwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Set rs = Conn.Execute("SELECT * FROM nyhedsbrev Where postnummer = 7430")
Where the postcode 7430 is selected, but y nead to draw many ´specifik
numbers at the same time, as well as exclude others. Can anybody help?

SELECT *
FROM nyhedsbrew
WHERE postrunner IN (7430,7431,7432)
AND postrunner NOT IN (7433,7434,7435)
Nov 22 '06 #2

Mark Rae skrev:
"Claus G" <cl******@jubii.dkwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Set rs = Conn.Execute("SELECT * FROM nyhedsbrev Where postnummer = 7430")

Where the postcode 7430 is selected, but y nead to draw many ´specifik
numbers at the same time, as well as exclude others. Can anybody help?

SELECT *
FROM nyhedsbrew
WHERE postrunner IN (7430,7431,7432)
AND postrunner NOT IN (7433,7434,7435)
Thank You it works, everything is so easy whwn you now have to do it. i
am very greatfull.
Claus G

Nov 22 '06 #3
"Claus G" <cl******@jubii.dkwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Thank You it works, everything is so easy whwn you now have to do it. i
am very greatfull.
No problem.

Don't take this the wrong way, but the T-SQL I gave you is *really* basic,
so you might benefit hugely from a beginner's guide...

Everybody has to start somewhere, and this sort of thing can be really
daunting without the basic building blocks...

Also, if you are building up SQL dynamically, you can run into problems with
SQL injection (Google it), so you should at least investigate using a stored
procedure / parameterised query if you can...
Nov 22 '06 #4

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

Similar topics

16
by: lkrubner | last post by:
Are there any benchmarks on how much an extra, unneeded VARCHAR, CHAR, INT, BIGINT, TEXT or MEDIUMTEXT slows down a database call with MySql? PostGre info would also be useful. I'm trying to...
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...
3
by: Luigi Donatello Asero | last post by:
Hi! Can I use this code to show data of column of a certain database on the page which I create by writing the following code? <?php $open = mysql_connect("localhost", "user", "password"); ...
2
by: phpuser32423 | last post by:
Hi everyone Is it by any chance possible to use mysql and php to auto create the content for drop-down lists on forms by retrieving the values from a database? The reason i ask is that on a site...
3
by: nandan | last post by:
Hi, Has any one ever compared the performance of calling a DataTable's Select method with a stored procedure doing the same thing? My point is: dataRows = DataTable.Select(filter) is better or...
19
by: Shwetabh | last post by:
Hi, I have two tables: Code and Color. The create command for them is : create table Color( Partnum varchar(10), Eng_Color char(10), Span_Color char(20), Frch_Color char(20), CONSTRAINT...
3
by: eholz1 | last post by:
Hello PHP programmers. I had a brilliant idea on one of my pages that selects some data from my mysql database. I first set the page up to display some info and an image, just one item, with a...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
1
by: robin1983 | last post by:
Hi to all, i m newer to this site and fresher in Ajax world. Actually i get a problem while accessing data from Database. I have a combo box in my pages. Actually i want to access data from the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.