he stored procedure thing and only a little better at SQL statements as a whole:)
Steven J Orton
Software Engineer
Northrop Grumman Mission Systems
Middletown, RI 02842
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]]
Sent: Wed 6/28/2006 4:57 PM
To: Orton, Steve; mysql
on Systems
Middletown, RI 02842
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: Wed 6/28/2006 4:57 PM
To: Orton, Steve; mysql@lists.mysql.com
Subject: Re: Tough query to crack
/>I don't think that will work because Context_ID is not found in
'target
02842
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]]
Sent: Wed 6/28/2006 4:01 PM
To: Orton, Steve
Cc: mysql@lists.mysql.com
Subject: Re: Tough query to crack
Steve,
> INSERT INTO master_context_list (Context_ID, Target_ID)
>SELECT Context_ID = @ContextID,
the IDs are put into the APPLICABLE_TARGET_IDS temporary table.
steve---
Steven J Orton
Software Engineer
Northrop Grumman Mission Systems
Middletown, RI 02842
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: Wed 6/28/2006 4:01 PM
To: Orton, Steve
Cc: mysql@lists.mysql.com
Subject:
Steve,
> INSERT INTO master_context_list (Context_ID, Target_ID)
>SELECT Context_ID = @ContextID, targets_list.Target_ID FROM
targets_list
> WHERE Target_ID IN ( SELECT Target_ID FROM #APPLICABLE_TARGET_IDS )
[EMAIL PROTECTED] tells the server to return 1 when the column value
of co
Hello fellow listers,
I'm currently trying to reduce our TCO by incorporating this fine DBMS and
replacing the MS SQLServer we're using. I'm trying to re-implement the stored
procedures written for SQLServer to MySQL and have one that's tough to figure
out.
This stored procedure basica
- Original Message -
From: "Dan Nelson" <[EMAIL PROTECTED]>
To: "Aaron Clausen" <[EMAIL PROTECTED]>
Cc: "MySQL Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 16, 2004 10:20
Subject: Re: Tough Query Problem
> In the last episo
In the last episode (Jun 16), Aaron Clausen said:
> I am trying to write a script that can take logs from our mail
> server, boil down the rejections to determine the sources of
> distributed SMTP dictionary attacks against our mail server.
>
> Basically I have a table "send_failures like this tha
I am trying to write a script that can take logs from our mail server, boil down the
rejections to determine the sources of distributed SMTP dictionary attacks against our
mail server.
Basically I have a table "send_failures like this that gets fed with the raw data from
the logs:
host_ip
=#;
?
PB
- Original Message -
From: Duke, Brian
To: [EMAIL PROTECTED]
Sent: Sunday, March 21, 2004 3:16 AM
Subject: Tough Query for this New DBA
There has got to be a better way for me to query/subquery this data.
I have 4 tables.
Table1
Hi Brian,
Not answering your question, but are your table names
really "table1", "table2" etc?
If so, you will be running into more problems :-)
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscen
There has got to be a better way for me to query/subquery this data.
I have 4 tables.
Table1
-
Company_Name | Company_ID
-
Blue Shoe| 101
Fast Cow | 102
Table2
---
Egads you're right! I've been overthinking this. There must something
else wrong in my query.
Thanks for the hit over the head. I needed it.
On Mar 16, 2004, at 10:37 AM, Harald Fuchs wrote:
When you specify a left join, you will always get the same number of
records as are in your primary joi
The DISTINCT key word works on the whole record, not the field that
follows it. So the query actually does return multiple records with the
same EventID when there are multiple related contacts/regardings.
DISTINCT filters out duplicate records created from the joining of the
three tables.
Whe
Original Message -
From: Brent Baisley
To: MYSQL list
Sent: Monday, March 15, 2004 3:32 PM
Subject: Help with a tough query
I didn't think this was too hard when I first created it, but now that
I'm loading test data it's not working as expected.
The core
, 2004, at 4:47 PM, Rhino wrote:
Remarks interspersed below.
Rhino
- Original Message -
From: "Brent Baisley" <[EMAIL PROTECTED]>
To: "MYSQL list" <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 4:32 PM
Subject: Help with a tough query
I didn't thi
Remarks interspersed below.
Rhino
- Original Message -
From: "Brent Baisley" <[EMAIL PROTECTED]>
To: "MYSQL list" <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 4:32 PM
Subject: Help with a tough query
> I didn't think this was too hard whe
I didn't think this was too hard when I first created it, but now that
I'm loading test data it's not working as expected.
The core of the query is three tables: Event, Contact, and Regarding.
There can be zero or more Contacts for each event and zero or more
"Regardings" for each event. There
hi
I need to select the ten latest entries from a diary-database, but i don't want
to get any duplicate users, so if i want to select the ten latest entries and
someone has written five entries of these latest ones, i only want to get the
latest entries from each user. So far no problem, my query
lt;[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 12:37 PM
Subject: RE: very tough query
Here's what happens:
ERROR 1064: You have an error in your SQL syntax near ' poll_answers,
poll_votes where (poll_questions.poll_id = poll_answers.poll_id) ' at line 1
-Original Mes
From: Daren Cotter <[EMAIL PROTECTED]>
> ...what happens when I want to delete a poll?
Do it machanically. That is, do a query in advance to find the data that needs to be
deleted, then go through and delete it. The logic for joining a delete can be written,
but MySQL doesn't support it. (Hey
ED]]
Sent: Tuesday, March 05, 2002 8:27 AM
To: [EMAIL PROTECTED]
Cc: Daren Cotter
Subject: Re: very tough query
Hi Darren,
On Tue, 5 Mar 2002 09:42:50 -0800
"Daren Cotter" <[EMAIL PROTECTED]> wrote:
> mysql> desc poll_questions;
> ++---
Hi Darren,
On Tue, 5 Mar 2002 09:42:50 -0800
"Daren Cotter" <[EMAIL PROTECTED]> wrote:
> mysql> desc poll_questions;
> ++-+--+-++-
> ---+
> | Field | Type| Null | Key | Default| Extra
> |
> +
ok, here are the 3 tables i have that are related:
mysql> desc poll_questions;
++-+--+-++--
--+
| Field | Type| Null | Key | Default| Extra
|
++-+--+-++
At 6:10 PM -0700 8/30/01, Daren Cotter wrote:
>i have a query that needs to do the following:
>
>in my members table, i store the member id, and the referer id of the member
>that referred them (the referer_id links to the member_id).
>
>for example, a member signs up and gets the id of 0200289, a
i have a query that needs to do the following:
in my members table, i store the member id, and the referer id of the member
that referred them (the referer_id links to the member_id).
for example, a member signs up and gets the id of 0200289, and was referred
by 0001008. anyway, over time, when
> i have 3 tables: offers, rewards, and sources. sources has just a source
> name and source id. both the offers and rewards tables have a "source_id"
> field which relates to the sources table. i need to write a query that
> selects the source name and the count in each table with that source id.
i have 3 tables: offers, rewards, and sources. sources has just a source
name and source id. both the offers and rewards tables have a "source_id"
field which relates to the sources table. i need to write a query that
selects the source name and the count in each table with that source id. is
this
28 matches
Mail list logo