Hi,
I'm storing in a database numbers separated by comma if more than one
number i.e
Record # Column
112
21,2,5,6
31,12,24,45
4
Hi Anthony,
You don't need REGEXP for this; LIKE will do. Try something like this:
... WHERE CONCAT(',', Column, ',') LIKE '%,2,%'
to search for rows that contain 2.
Hope that helps.
Matt
- Original Message -
From: award
Sent: Saturday, March 13, 2004 2:16 PM
Subject: query
, then the query I gave will work
fine for that because it adds a comma to the beginning and end of the
column (with CONCAT()) before doing the LIKE comparison.
Matt
- Original Message -
From: award
Sent: Saturday, March 13, 2004 5:10 PM
Subject: RE: query question using REGEXP
Hi thanks
I have a table containing information about different businesses. I
want to randomly select a single row from the table using a prepared
statement in a java bean.
What is the most eficient way to do this?
TIA
Jack
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
]
To: MySQL Mailing List [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 5:47 AM
Subject: Query Question
I have a table containing information about different businesses. I
want to randomly select a single row from the table using a prepared
statement in a java bean.
What is the most eficient
Jack Lauman [EMAIL PROTECTED] wrote on 11/02/2004 11:47:20:
I have a table containing information about different businesses. I
want to randomly select a single row from the table using a prepared
statement in a java bean.
What is the most eficient way to do this?
Try SELECT columns
I have a simple query:
SELECT id,year,month,day,cat_id FROM events
LEFT JOIN calendar_cat ON
events.cat=calendar_cat.cat_id
WHERE year=YEAR(CURDATE())
AND month=MONTH(CURDATE())
AND day=DAYOFMONTH(CURDATE())
AND cat_id='2' OR cat_id='5'
AND approved='1'
ORDER BY year,month,day ASC
Results:
From: John Croson [mailto:[EMAIL PROTECTED]
I have a simple query:
SELECT id,year,month,day,cat_id FROM events
LEFT JOIN calendar_cat ON
events.cat=calendar_cat.cat_id
WHERE year=YEAR(CURDATE())
AND month=MONTH(CURDATE())
AND day=DAYOFMONTH(CURDATE())
AND cat_id='2' OR cat_id='5'
AND
Hi John,
I think you missed on the precedence of AND/OR
if you change to
AND (cat_id='2' OR cat_id='5' )
it should work as you want it to
/Johan
John Croson wrote:
I have a simple query:
SELECT id,year,month,day,cat_id FROM events
LEFT JOIN calendar_cat ON
events.cat=calendar_cat.cat_id
WHERE
Mike Johnson wrote:
From: John Croson [mailto:[EMAIL PROTECTED]
I have a simple query:
SELECT id,year,month,day,cat_id FROM events
LEFT JOIN calendar_cat ON
events.cat=calendar_cat.cat_id
WHERE year=YEAR(CURDATE())
AND month=MONTH(CURDATE())
AND day=DAYOFMONTH(CURDATE())
AND cat_id='2' OR
At 09:35 AM 2/4/2004, John Croson wrote:
I have a simple query:
SELECT id,year,month,day,cat_id FROM events
LEFT JOIN calendar_cat ON
events.cat=calendar_cat.cat_id
WHERE year=YEAR(CURDATE())
AND month=MONTH(CURDATE())
AND day=DAYOFMONTH(CURDATE())
AND cat_id='2' OR cat_id='5'
AND approved='1'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wednesday 04 February 2004 16:03, mos wrote:
At 09:35 AM 2/4/2004, John Croson wrote:
I have a simple query:
SELECT id,year,month,day,cat_id FROM events
LEFT JOIN calendar_cat ON
events.cat=calendar_cat.cat_id
WHERE year=YEAR(CURDATE())
Hello,
For my final solution I decided to use the inner join method. The query
is created dynamically based upon a user interface component that
allows people to build queries using parenthesis, ands and or's. Plus
there is another field that I didn't include in the original question
so as
I think I figured out the time problem. If I make s2 in the or s1 and
remove any instances of s2 it works very fast with the 'or'.
Joe
On Tuesday, January 20, 2004, at 09:50 AM, sulewski wrote:
Hello,
For my final solution I decided to use the inner join method. The
query is created
Okay, I think I'm missing something obvious. I have two tables
Table 1 Table 2
___ _
ID rdid vid
___ _
ID in table 1 links to rdid in table 2. This
PM
Subject: SQL Query Question
Okay, I think I'm missing something obvious. I have two tables
Table 1 Table 2
___ _
ID rdid vid
___ _
ID in table 1
do it? :)
- Original Message -
From: sulewski [EMAIL PROTECTED]
To: Jamie Murray [EMAIL PROTECTED]
Sent: Monday, January 19, 2004 4:41 PM
Subject: Re: SQL Query Question
I asked a similar question but this time it's different. Last time I
was looking for places where the record in table 1
On Monday 19 January 2004 13:17, sulewski wrote:
Okay, I think I'm missing something obvious. I have two tables
Table 1 Table 2
___ _
ID rdid vid
___
Michael Satterwhite said:
On Monday 19 January 2004 13:17, sulewski wrote:
Okay, I think I'm missing something obvious. I have two tables
Table 1 Table 2
___ _
ID rdid vid
-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 4:39 PM
To: [EMAIL PROTECTED]
Subject: Re: SQL Query Question
Michael Satterwhite said:
On Monday 19 January 2004 13:17, sulewski wrote:
Okay, I think I'm missing something obvious. I have two tables
Table 1
Jochem,
I believe this works. This is also easy to build dynamically. The query
is going to be generated based upon some user input. Thank you very
much,
Joe
On Monday, January 19, 2004, at 04:38 PM, Jochem van Dieten wrote:
Michael Satterwhite said:
On Monday 19 January 2004 13:17,
Lincoln Milner said:
Or, if I'm not mistaken, you could do something like:
SELECT t1.*
FROM table1 t1, table2 t2
WHERE t1.id = t2.rdid
AND t2.vid IN (46, 554)
;
That should work
No. You are back to square one where there should only be one record
in t2 with a vid of either 46 or
On Monday 19 January 2004 15:38, Jochem van Dieten wrote:
So let's make it 2 fields:
SELECT
t1.*
FROM
table1 t1,
table2 t2 INNER JOIN table2 t3
ON (t2.rdid = t3.rdid AND t2.vid = 46 AND t3.vid = 554)
WHERE
t1.rdid = t2.rdid
Add GROUP BY/DISTINCT per your requirements.
Michael Satterwhite said:
On Monday 19 January 2004 15:38, Jochem van Dieten wrote:
So let's make it 2 fields:
SELECT
t1.*
FROM
table1 t1,
table2 t2 INNER JOIN table2 t3
ON (t2.rdid = t3.rdid AND t2.vid = 46 AND t3.vid = 554)
WHERE
t1.rdid = t2.rdid
Add GROUP BY/DISTINCT
On Monday 19 January 2004 16:30, Jochem van Dieten wrote:
Michael Satterwhite said:
On Monday 19 January 2004 15:38, Jochem van Dieten wrote:
So let's make it 2 fields:
SELECT
t1.*
FROM
table1 t1,
table2 t2 INNER JOIN table2 t3
ON (t2.rdid = t3.rdid AND t2.vid = 46 AND
Michael Satterwhite wrote:
On Monday 19 January 2004 16:30, Jochem van Dieten wrote:
Michael Satterwhite said:
On Monday 19 January 2004 15:38, Jochem van Dieten wrote:
So let's make it 2 fields:
SELECT
t1.*
FROM
table1 t1,
table2 t2 INNER JOIN table2 t3
ON (t2.rdid = t3.rdid AND t2.vid
I don't have much experience working with dates in Mysql; I've always
prefered to manage dates in code, so bear with me.
I've got the following definition (yes, no indexes right now):
CREATE TABLE se_t (
datestamp timestamp(14) NOT NULL,
remote_addr char(16) NOT NULL default '',
Hi
mysql 3.23.56 RH 8.0
I have got the sql query to work but is there a better way of writing the
syntax?
$sql = SELECT * FROM Contacts WHERE Categories=\$calltype\ and
BusinessCodes !=\R\ and BusinessCodes !=\I\ and BusinessCodes !=\L\
ORDER BY Company ASC;
basically i Categories (a limit
Hi, i have the following query:
SELECT person.name as Name, firmal.beskrivelse as Businessline, lokasjon.navn as
Location
FROM
firmal INNER JOIN (
person INNER JOIN lokasjon
ON person.lokid = lokasjon.lokid)
ON firmal.firmalid = person.firmalid
which will give me a list of Name, Businessline,
] with the primary key of the person table.
Andy
-Original Message-
From: Paal Eriksen [mailto:[EMAIL PROTECTED]
Sent: 11 November 2003 12:11
To: [EMAIL PROTECTED]
Subject: SQL query question
Hi, i have the following query:
SELECT person.name as Name, firmal.beskrivelse
So close, Thanks you very much Andy. I tried one similar to your suggestion, but
didn't get quite the result i expected.
Cheers
Paal
Ny versjon av Yahoo! Messenger
Nye ikoner og bakgrunner, webkamera med superkvalitet og dobbelt så morsom
* Obantec Support1
mysql 3.23.56 RH 8.0
I have got the sql query to work but is there a better way of writing the
syntax?
$sql = SELECT * FROM Contacts WHERE Categories=\$calltype\ and
BusinessCodes !=\R\ and BusinessCodes !=\I\ and BusinessCodes !=\L\
ORDER BY Company ASC;
basically
- Original Message -
From: Roger Baklund [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Obantec Support1 [EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 8:46 PM
Subject: Re: Query question (php)
* Obantec Support1
mysql 3.23.56 RH 8.0
I have got the sql query to work
: Paal Eriksen
To: [EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 7:11 PM
Subject: SQL query question
SELECT person.name as Name, firmal.beskrivelse as Businessline, lokasjon.navn as
Location
FROM
firmal INNER JOIN (
person INNER JOIN lokasjon
ON person.lokid
I've searched around on the lists archives and even did some googling, but I'm
having trouble finding the answer to this question.
Given that I have a table with 2 columns (say col1, col2) I want to be able to
search for the value of col1 in the value of col2. Let's say that in one
instance
Chris,
You're almost there!
select * from temp where col2 like concat('%',col1, '%');
Andy
-Original Message-
From: Chris A. Mattingly [mailto:[EMAIL PROTECTED]
Sent: 07 November 2003 17:01
To: [EMAIL PROTECTED]
Subject: MySQL query question
I've searched around on the lists
Dale Hans [EMAIL PROTECTED] wrote:
I have a field in the table, call it 'stuff', and it contains a list
of values that are comma separated. i.e. 'Books,DVDs,Video
Tapes,CDs'
I want to SELECT out all records that have an item. I know IN works
the other way, so is there something that
I have a field in the table, call it 'stuff', and it contains a list
of values that are comma separated. i.e. 'Books,DVDs,Video
Tapes,CDs'
I want to SELECT out all records that have an item. I know IN works
the other way, so is there something that will get what I want like
this:
SELECT *
I have a test results table that looks like this
student_id test_id score
1 1 90
1 1 100
1 1 80
2 1 95
2 1 85
2 1
Luis Lebron wrote:
I have a test results table that looks like this
student_id test_id score
1 1 90
1 1 100
1 1 80
2 1 95
2 1 85
2
I have two tables, contact_account and contact.
contact_account has two fields: contact_id (pk) and account_id
contact has a PK of contact_id
I to select all the columns in contact where account_id=13
I tried:
SELECT * FROM (contacts INNER JOIN account on contact.contact_id =
On 19 Aug 2003 at 13:17, Jack Lauman wrote:
I have two tables, contact_account and contact.
contact_account has two fields: contact_id (pk) and account_id
contact has a PK of contact_id
I to select all the columns in contact where account_id=13
I tried:
SELECT * FROM (contacts
* Jack Lauman
I have two tables, contact_account and contact.
contact_account has two fields: contact_id (pk) and account_id
contact has a PK of contact_id
I to select all the columns in contact where account_id=13
I tried:
SELECT * FROM (contacts INNER JOIN account on
Try
SELECT * FROM contact INNER JOIN contact_account ON
contact.contact_id=contact_account.contact_id WHERE
contact_account.account_id = 13
At 04:17 PM 8/19/2003, Jack Lauman wrote:
I have two tables, contact_account and contact.
contact_account has two fields: contact_id (pk) and
Feist [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 7:42 PM
To: Richard Bolen
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Select with join query question
Richard Bolen wrote:
This works! I was then wondering how to get the total number of all
jobs that this condition is true
]; [EMAIL PROTECTED]
Subject: Re: Select with join query question
Richard Bolen wrote:
This works! I was then wondering how to get the total number of all
jobs that this condition is true for?
Just include count(distinct j.jobid) in the SELECT list.
--
MySQL General Mailing List
I'm trying to write a select query that involves 2 tables. One table
(Submissions) has a one to many relationship with the other table
(Jobs). I'm trying to find all the records in Jobs that do NOT have a
corresponding record in Submissions with a status of 1.
The problem I'm having is that
Something like this should work. You want to do a left join on Jobs so
you don't filter out those without submission matches. The resulting
left join will have a value of NULL for any fields joined from
Submissions that don't have a match in Jobs. Just include at least on
field from
I think this gets me all the Jobs that have no submissions but I'm
really looking for any job that doesn't have a submission with a status
of 1. That means I need Jobs that don't have submissions plus jobs with
submissions with exclusively non-1 statuses.
The problem is when a job has more
From: Richard Bolen [EMAIL PROTECTED]
Date: 2003/07/28 Mon PM 01:37:27 CDT
To: [EMAIL PROTECTED]
Subject: Select with join query question
I'm trying to write a select query that involves 2 tables. One table
(Submissions) has a one to many relationship with the other table
(Jobs). I'm
[EMAIL PROTECTED] wrote:
From: Richard Bolen [EMAIL PROTECTED]
Date: 2003/07/28 Mon PM 01:37:27 CDT
I'm trying to write a select query that involves 2 tables. One table
(Submissions) has a one to many relationship with the other table
(Jobs). I'm trying to find all the records in Jobs that do
I was wondering if you were going to come back with that. Your going to
need to using grouping then. Something like this should do it:
SELECT *,SUM(s.status) AS ActiveJob FROM Jobs AS j LEFT JOIN
Submissions AS
s ON j.job_id=s.job_id
WHERE ActiveJob1 OR ActiveJob IS NULL
GROUP BY j.job_id
I'm
[snip]
Rich's solution, which I edited out, was a good one. But, if you really
want to do it with a single JOIN, try this:
select j.*
FROM Jobs j LEFT JOIN Submissions s ON j.jobid = s.jobid
GROUP BY /* all selected columns */
HAVING min(abs(s.status - 1)) 0
I leave it as an exercise
: Select with join query question
[snip]
Rich's solution, which I edited out, was a good one. But, if you
really
want to do it with a single JOIN, try this:
select j.*
FROM Jobs j LEFT JOIN Submissions s ON j.jobid = s.jobid GROUP BY /*
all selected columns */ HAVING min(abs(s.status - 1)) 0
Richard Bolen wrote:
This works! I was then wondering how to get the total number of all
jobs that this condition is true for?
Just include count(distinct j.jobid) in the SELECT list.
Bruce
select j.*
FROM Jobs j LEFT JOIN Submissions s ON j.jobid = s.jobid GROUP BY /*
all selected columns
Hi all,
I'm working on a simple site to help me and others determine which handheld/game/phone
to buy.
Before it had a table like this:
Phone,color y/n,wireless y/n, etc...
Now it is many tables so that new fields can be added while the site is up without
having to
change the db structure.
%
Etc
Etc
That would be proper programming form...
Did that make sense?
-Original Message-
From: Rolf C [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 4:57 PM
To: [EMAIL PROTECTED]
Subject: SQL query question
Hello all,
I am a totally newby to MYSQL but here i go.
I want
Hello all,
I am a totally newby to MYSQL but here i go.
I want to create an ASP page that shows an image (screendump of game) a game
name a game description and an url.
I created a database with the following table:
filename, urldesc, desc
Now i have to create an SQL query that will put this
Well, from what limited info I have, it looks like your image tag is not
closed properly.
Regards,
Mike Hillyer
www.vbmysql.com
-Original Message-
From: Rolf C [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 2:57 PM
To: [EMAIL PROTECTED]
Subject: SQL query question
Is there a way to check if a field has x number of characters in it?
I have a table with a column (phone) which, for the moment is varchar(25).
I need to find those entries which have less than 10 characters.
Can this be done?
Thanks
susan
--
MySQL General Mailing List
For list archives:
SELECT * FROM mytable WHERE LENGTH(phone) 10;
http://www.mysql.com/doc/en/String_functions.html
Regards,
Mike Hillyer
www.vbmysql.com
-Original Message-
From: Susan Ator [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: query question
[snip]
Is there a way to check if a field has x number of characters in it?
I have a table with a column (phone) which, for the moment is
varchar(25). I need to find those entries which have less than 10
characters.
[/tuck]
http://www.mysql.com/doc/en/String_functions.html
mysql SELECT
Thank y'all very very much. Each day I learn something new ;)
susan
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:35 PM
To: Susan Ator; [EMAIL PROTECTED]
Subject: RE: query question
[snip]
Is there a way to check if a field has x
: Newbie Query Question
Hi all,
My first post to this list.
I have a query which I can't quite get to work. I was hoping that
someone here could educate me a bit. I have two tables.
tbl_people
| id| fname|lname|
---
| 1 |frank
Hi all,
My first post to this list.
I have a query which I can't quite get to work. I was hoping that
someone here could educate me a bit. I have two tables.
tbl_people
| id| fname|lname|
---
| 1 |frank |smith |
Charles-
So, you have a table unique with respect to people (a person appears at
most once), and a table with interests (some number of interests are
associated a person in the first table. This is a one-to-many
relationship. You need to join on the person in the first table.
Something like
Jeff,
Thanks. This is ALMOST doing what I need.
Suppose that the person could have from 0 - 5 records in
tbl_peoples_interests and I need to have each one of those interests as
a different name so I can use it in my PHP form?
Thanks,
Charles
On Saturday, March 15, 2003, at 11:30 AM, Jeff
Charles-
OK, let's say a person has `n' interest id entries in
tbl_people_interests. It seems like you're wanting a result set with
one row per person and (n + 2) (assuming you're selecting first and
last name with the interests). I'm no UEbergeek with respect to SQL,
but I don't think there's
At 14:41 +0100 1/10/03, Damir Dezeljin wrote:
Hi.
I want to calculate how many rows my query which uses 'GROUP BY' returns.
The query:
SELECT something
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;
Is it posible to get number of rows with such a query
SELECT something
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;
Is it posible to get number of rows with such a query from MySQL v3.23.49?
You want both a list of rows, and a count of the number of rows -- with
a single query. That doesn't make
Damir Dezeljin wrote:
SELECT something
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;
Is it posible to get number of rows with such a query from MySQL v3.23.49?
You want both a list of rows, and a count of the number of rows -- with
a single query. That
Hi again ;)
SELECT COUNT(*)
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;
This query returns:
+--+
| COUNT(*) |
+--+
|1 |
|1 |
|2 |
|1 |
|1 |
|1 |
+--+
6 rows in set (0.03 sec)
Inest of this I
Damir Dezeljin wrote:
Hi again ;)
SELECT COUNT(*)
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;
This query returns:
+--+
| COUNT(*) |
+--+
|1 |
|1 |
|2 |
|1 |
|1 |
|1 |
+--+
6 rows in
Hi.
I want to calculate how many rows my query which uses 'GROUP BY' returns.
The query:
SELECT something
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;
Is it posible to get number of rows with such a query from MySQL v3.23.49?
If it isn't posible ... is
Sorry if this mail already arived to the list (I'm not sure if my posting
was sucesfull, because I had problems with my mail server). The past
posting:
Hi.
I want to calculate how many rows my query which uses 'GROUP BY' returns.
The query:
SELECT something
FROM test
WHERE (kid=1)
Hi,
You can try the following.
Store the result of your query into a temporary table, say tp, with two
columns tc (ticketID) and pname (pipelineName).
Run the following query :
select concat(select @c:='';,select tc,
(@c:=concat_ws(,,@c,pname)) as x, length(@c) from tp where tc=,
tc, order by
Hi all.
3 tables. Ticket Pipeline_Dept, and Ticket_Matrix. Ticket_Matrix
matches tickets to pipeline depts. A ticket can be posted to multiple pipeline
depts. I want to select all tickets and the pipeline departments they are
posted to but only one row per ticket. So:
SELECT
Hello,
I have a table with a list of names. I need to get a distinct list of the
names by first letter, as follows:
John
Mary
Mark
Tom
the query should return the following:
J
M
T
Is there any way to this with a single query?
TIA
-Kevin
[EMAIL PROTECTED]
Hi,
Try
SELECT distinct substring(name, 1, 1) from names;
That should work :)
-Dan
On Wed, 16 Oct 2002, Kevin wrote:
Hello,
I have a table with a list of names. I need to get a distinct list of the
names by first letter, as follows:
John
Mary
Mark
Tom
the query should return
SELECT DISTINCT FILEDNAME FROM TABLENAME ORDER BY FIELDNAME ASC ;
- Original Message -
From: Kevin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 17, 2002 2:40 PM
Subject: query question
Hello,
I have a table with a list of names. I need to get a distinct list
Hope this will work for u
select distinct substring(name, 1,1) from test1 order by name asc ;
- Original Message -
From: Kevin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 17, 2002 2:40 PM
Subject: query question
Hello,
I have a table with a list of names. I need
Hello list,
I am using mysql 3.23.52. I have to query one of my tables which has two
columns with the type of date and time. For example i have to get
the records whose date are 2002-10-12 and time is bigger than 11:30:00
and also the records whose date are 2002-10-13 and time is smaller
Veysel,
Monday, October 14, 2002, 12:48:58 PM, you wrote:
VHS I am using mysql 3.23.52. I have to query one of my tables which has two
VHS columns with the type of date and time. For example i have to get
VHS the records whose date are 2002-10-12 and time is bigger than 11:30:00
VHS and also
Thank you Egor. These queries meet my needs.
Egor Egorov wrote:
Veysel,
Monday, October 14, 2002, 12:48:58 PM, you wrote:
VHS I am using mysql 3.23.52. I have to query one of my tables which has two
VHS columns with the type of date and time. For example i have to get
VHS the records whose
Hello,
I have a problem concerning a SQL-Statement.
In the table S_Objekt I have a field S_Kapitel
(varchar (15) binary) that contains chapternumbers
like 2.2., 2.2.1., 1.1., 1.2.3. ...
The Query is to give me all chapternumbers of a
certain hierarchy. My Idea was to ask for the number
of Points
Hi all,
I need to be able to tell what the maximum length of a char column is. Can
I query the database for this information?
Shaun
list filter: mysql
-
Before posting, please check:
http://www.mysql.com/manual.php (the
PROTECTED]]
Sent: Sunday, 22 September 2002 19:14
To: [EMAIL PROTECTED]
Subject: Database Query Question
Hi all,
I need to be able to tell what the maximum length of a char column is. Can
I query the database for this information?
Shaun
list filter: mysql
speters,
Thursday, September 19, 2002, 10:55:41 PM, you wrote:
samdc If i use a replace query, and there isn't an error, then either
samdc a new row was inserted, or an existing row was updated.
samdc The primary key in the table i'm replacing to is defined as
samdc mprid int not null
If i use a replace query, and there isn't an error, then either
a new row was inserted, or an existing row was updated.
The primary key in the table i'm replacing to is defined as
mprid int not null auto_increment primary key
whether an insert or update actually occurs, i want to get the value
I've seen a lot about 'InnoDB'. What is it?
-Original Message-
From: Weaver, Walt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:09 PM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: simple query question
I'd use the InnoDB table type and establish a primary
PROTECTED]]
Sent: Thursday, September 12, 2002 4:09 PM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: simple query question
I'd use the InnoDB table type and establish a primary key/foreign key
relationship (parent-child) between the two. That way referential integrity
will be done
I need to query a mysql db in the following fashion ...
find me all records whose column 'n' have the letters 'XY' as the first two
characters. where column 'n' is just a short string
to clarify ...
if column 'n' has the value YR12345 don't get that record.
if column 'n' has the value
On Thu, Sep 12, 2002 at 11:46:40AM -0700, Kip Krueger wrote:
I need to query a mysql db in the following fashion ...
find me all records whose column 'n' have the letters 'XY' as the first two
characters. where column 'n' is just a short string
to clarify ...
if column 'n' has the
I have I hope a simple query question.
I have two tables
1 One has customer id and a store id and transaction information
2 Second has a store id and store information
There is multiple transactions in the first table, however there is
only one record for each store id in the second
: Thursday, September 12, 2002 1:57 PM
To: [EMAIL PROTECTED]
Subject: simple query question
I have I hope a simple query question.
I have two tables
1 One has customer id and a store id and transaction information
2 Second has a store id and store information
There is multiple
Some ficticious data
ID Data1 Data2 Data3
1 1 141 1
2 5 140 1
3 4 142 1
4 3 141 1
5 2 142 1
6 5 142 1
7 7 140 1
8 2 143 1
9 3 142 1
10 3
I suppose I should have specified that I would not be able to filter by Data1
-Original Message-
From: Mary Stickney [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:52 AM
To: Luc Foisy
Subject: RE: Query Question
select * from xxx
where data2 141 and data3 = 1
What have you tried?
What did you get?
Why is it not what you expected?
Luc Foisy wrote:
Some ficticious data
ID Data1 Data2 Data3
1 1 141 1
2 5 140 1
3 4 142 1
4 3 141 1
5 2 142 1
6 5 142 1
7
)
Subject: RE: Query Question
I suppose I should have specified that I would not be able to filter by
Data1
-Original Message-
From: Mary Stickney [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:52 AM
To: Luc Foisy
Subject: RE: Query Question
select * from xxx
where
On 19 Aug 2002, at 11:32, Luc Foisy wrote:
IDData1 Data2 Data3
1 1 141 1
2 5 140 1
3 4 142 1
[snip]
For my return I only want a single instance of Data1, so it will
most likely need be GROUP BY Data1
I would like those records to include
301 - 400 of 494 matches
Mail list logo