> From: Jeff Waris
>
> I guess I am having an off day with SQL. I think technically
> this should work but I get a syntax error
>
> UPDATE Account a
>
> SET a.last_update = (SELECT TOP 1 h.tranDate
>
> FROM History h
>
> WHERE a.Account_Number = h
SELECT stuff.*, person1.*, person2.*, person3.*
FROM (
(
stuff LEFT JOIN persons AS person1 ON stuff.first_person_id =
persons.person_id
) LEFT JOIN persons AS person2 ON stuff.second_person_id = persons.person_id
) LEFT JOIN persons AS person3 ON stuff.third_person_id = persons.person_id)
What if I wanted to add a WHERE clause?
- Original Message -
From: Matthew Walker
To: CF-Talk
Sent: Thursday, May 20, 2004 1:28 AM
Subject: RE: SQL HELP!
SELECT stuff.*, person1.*, person2.*, person3.*
FROM (
(
stuff LEFT JOIN persons AS person1 ON
JOIN persons AS person3 ON stuff.third_person_id =
persons.person_id
WHERE ... (your where clause here)
> -Original Message-
> From: brobborb [mailto:[EMAIL PROTECTED]
> Sent: donderdag 20 mei 2004 9:07
> To: CF-Talk
> Subject: Re: SQL HELP!
>
> What if I wanted to add
hey peter may i contact you off the list quick?
- Original Message -
From: Pascal Peters
To: CF-Talk
Sent: Thursday, May 20, 2004 4:22 AM
Subject: RE: SQL HELP!
Just add it after the FROM clause. Also keep in mind that if you use
all * in the SELECT clause, you won'
> From: brobborb
>
> Now I want to return all the rows in the STUFF table, but to
> replace the last 3 fields with names in the PERSONS table.
> THe fields first_person_id, second_person_id, and
> third_person_id links to the person_id field in the table
> PERSONS.
A good book to have on your
Maybe too late, but you can. It's a holiday in Belgium, so I don't read
my mail as often as on a work day.
Pascal
> -Original Message-
> From: brobborb [mailto:[EMAIL PROTECTED]
> Sent: donderdag 20 mei 2004 11:24
> To: CF-Talk
> Subject: Re: SQL HELP!
>
&
what holiday?
tony
Tony Weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
410.548.2337
www.navtrak.net
-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 11:19 AM
To: CF-Talk
Subject: RE: SQL HELP!
Maybe too late, but
> From: Tony Weeg
>
> what holiday?
Holiday? What's that? :P
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
maybe Cuba Libre!
Dick
On May 20, 2004, at 6:29 PM, Philip Arnold wrote:
> > From: Tony Weeg
> >
> > what holiday?
>
> Holiday? What's that? :P
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Ascension day.
> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 21 mei 2004 3:07
> To: CF-Talk
> Subject: RE: SQL HELP!
>
> what holiday?
>
> tony
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
You are filtering on the enrollment table. This makes the left outer
join useless.
Try doing :
WHERE e.EnrollmentDate BETWEEN '#fromDate#' AND '#toDate#'
OR e.EnrollmentDate IS NULL
And of course (Guess what or look at some other threads right now)
> -Original Message-
> From: Vena
yeah yeah, the cfqueryparam, i pulled this from SQL Analyzer, it chokes for some reason on that... :-)
thanks, i'll check this out.
JOhn
-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 16, 2004 2:12 PM
To: CF-Talk
Subject: RE: SQL Help
Yo
What are the columns that are somewhat linked between these tables?
- Original Message -
From: "Todd Ashworth" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 03, 2001 3:32 PM
Subject: OT: SQL Help
> Sorry about posting this to the wrong list, but I'm havin
A question - are you sure you mean to use WEEK_DAY as the variable there.
Judging from where you use #DayOfWeekAsString(week_day)#, it would appear
that WEEK_DAY is a number from 1-7, not a DAY_OF_MONTH from 1-[28..31] as
you appear to use it.
If this is the problem, it appears in the query in tw
Rick Root wrote:
> I'm trying to figure out how to do something in SQL and I'm stumped.
I solved this problem with a view, and it works great.
Rick
~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236815
Archives: htt
You need a group by in your query..
> SELECT count(DISTINCT rate) as rateCount, rate
> FROMmyrates
> WHERE my_code = 385 and year = 2005
GROUP BY rate
> ORDER BY rate
On 4/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Why do the first two queries work and the last one fail? The on
Yes, you need quotes around the values. You can use CF's ListQualify()
function to do this for you.
However, this code appears to be part of a stored proc.
If you are not using a stored proc, use the cfqueryparam with the
list="yes" attribute. That will make it easier to code.
Example:
WHERE c
no dice
cause it was 2am and didnt want to think about it no more
>
> Dunno if this is right, just woke up, but I'll take a stab at it.
> Looks like you need another join to the upsell table, then order by
> its sort by column first.
>
> SELECT brands.brand_id, brands.brand_name, brands.b
> any good suggestions?
Dunno if this is right, just woke up, but I'll take a stab at it. Looks like
you need another join to the upsell table, then order by its sort by column
first.
SELECT brands.brand_id, brands.brand_name, brands.brand_logo,
products.product_id, products.brand_id, product
Assuming your PK is named customerID you can do the following:
SELECT mytable.lastname, mytable.firstname, mytable.city, mytable.state
FROM mytable
WHERE mytable.customerID in (select min(customerID) from mytable group by email)
There is at least one problem in your query. The in () statement is
To view all your records with duplicate email addresses,
you might try something like this:
select distinct email
from mytable
select lastname, firstname, city, state
from mytable
where email = '#select_
On Tue, Sep 16, 2008 at 8:58 AM, Jeff F <[EMAIL PROTECTED]> wrote:
> I've got a table (MySQL) with about 20k records. I'd like to be able to get
> all fields from the table with distinct email addresses. Essentially, I'm
> weeding out records with duplicate email addresses.
>
> What I'm trying do
= '#select_distinct_email.email#'
#lastname# #firstname# #city# #state#
> -Original Message-
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 16, 2008 9:42 AM
> To: CF-Talk
> Subj
Jim,
At first glance that seems to work, however the recordcounts appear to be off.
What I did was a simple query to find the total number of distinct email
addresses:
SELECT distinct mytable.email
FROM mytable
I get 19588 as a recordcount.
When I run
SELECT mytable.lastname,
On Tue, Sep 16, 2008 at 10:13 AM, Jeff F <[EMAIL PROTECTED]> wrote:
> SELECT distinct mytable.email
> FROM mytable
> I get 19588 as a recordcount.
This number would include email addresses that are duplicated in the
table (but only a count of 1 for each distinct address).
>SELECT mytable.
Thanks Jim. Now I see.
I guess what I'm looking for would be something like this then:
SELECT mytable.lastname,mytable.email
FROM mytable GROUP BY mytable.email HAVING distinct(mytable.email)
Which of course does not work. When there are records with duplicate emails
addresses, I need t
Are the other fields in your table the same when the email is the same?
Meaning, are the records really duplicate? Or is it just the email that is
duplicate and the other fields may have varying values for two rows that
have the same email? If they do vary, do you care which of the "duplicate"
rows
> When there are records with duplicate
> emails addresses, I need to include one of them.
So you are trying to display one record for each email address?
You could try something like this. Not tested, but the idea is to select a
single PK for each email. Then use a JOIN to display the detail
> You could try something like this. Not tested, but the idea is to
> select a single PK for each email. Then use a JOIN to display the
> details for those PK's.
Note, the previous query assumes it does not matter which record is returned.
The records are from contest entries. People can only enter with one email
address. Some people entered multiple times, using the same email address.
I need to get a record set used to pick a winner, including just one of the
records from the duplicate email entries.
~
> I need to get a record set used to pick a winner, including just one
> of the records from the duplicate email entries.
If it does not matter which one, try the query I posted in my first response.
The syntax is not tested, but it has the right concept.
~
The records are from contest entries. People can only enter with one email
address. Some people entered multiple times, using the same email address.
I need to get a record set used to pick a winner, including just one of the
records from the duplicate email entries.
~
> The records are from contest entries. People can only enter with one email
> address. Some people entered multiple times, using the same email address.
So, why all the complexity with joins and subqueries? Just...
SELECT DISTINCT email FROM sometable
then pick a winner from the list of
> It also begs the question, if they were only supposed to have one
> entry
> per e-mail address, why wasn't there error checking or a constraint on
>
> the table to force this in the first place?
True enough. I was thinking the same thing myself ;-)
~
Just answered this on the SQL list:
http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:855
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick
I'm really greatful to you for the post.
>Just answered this on the SQL list:
>http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:855
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Mark,
What DBMS are you using?
If its SQL Server, I don't think what you want to do is possible other than
how you have already done it. If you find another way to do it (with a join)
I would also be interested to see that.
Kevin Roche
~
Kevin Roche wrote:
>
> Mark,
>
> What DBMS are you using?
>
> If its SQL Server, I don't think what you want to do is possible other than
> how you have already done it. If you find another way to do it (with a join)
> I would also be interested to see that.
>
> Kevin Roche
>
Hi Kevin,
Yes it's
Mark,
You might be right but I never got that to work myself, in MSSQL.
An experiment you might try is to do that subquery separately in a different
CFQUERY then plug in the retrieved value. Occasionally I have found that
knid of trick is quicker.
Kevin
On Tue, Aug 25, 2009 at 11:49 AM, Mark H
Try using an OUTER JOIN and specify the criteria in the JOIN statement
...
FROM table1
LEFT OUTER JOIN table2
ON table1.col1 = table2.col1
AND {criteria goes here}
...
Thanks,
Mike
-Original Message-
From: Mark Henderson [mailto:shadefro...@gmail.com]
Sent: Tuesday
Try this:
...
FROM
tbl_ForSaleCategories C
INNER JOIN (
tbl_RecentlyViewed RV
INNER JOIN
tbl_ForSale FS
ON RV.ID = FS.ID
)
ON C.ID = FS.Category_ID
LEFT JOIN
tbl_CoverSpecial CS
ON RV.ID = CS.ID
WHERE CS.ID IS NULL
AND FS.Active = 1
ORDER BY Date_Viewed ASC;
Thanks Billy and Michael (and Kevin). After some trial and error I
managed to stumble upon solution (the outer join gave me results but
not the expected set).
SELECT TOP 1
RV.ID AS Rec_ID
,RV.Date_Viewed
,FS.ID
,FS.Category_ID
,FS.Title
,FS.Comment
,FS.Thumbnail
,FS.Phot
WHERE NOT EXISTS should also work.
On Tue, Aug 25, 2009 at 5:27 AM, Mark Henderson wrote:
>
> Greetings from the chilly south,
>
> I have this query and it returns the expected result set, but I can't
> work out how to use a join instead of the NOT IN clause and I *know*
> that is going to be mo
Brian Kotek wrote:
>
> WHERE NOT EXISTS should also work.
>
Yes it does, and I knew about that method when using NOT IN, as it was
a simple change to my original working query. What I didn't know, but
now do after some googling, is that NOT EXISTS means it uses an index
in the subquery as opposed
Yep, EXISTS will virtually always be faster, usually MUCH faster, than a
correlated subquery, because a subquery is evaluated for EVERY ROW processed
by the outer query.
On Wed, Aug 26, 2009 at 12:43 AM, Mark Henderson wrote:
>
> Brian Kotek wrote:
> >
> > WHERE NOT EXISTS should also work.
> >
if you're going to be generating your SQL like that, you'll need to wrap
your final variable in preserveSingleQuotes().
so...
#preserveSingleQuotes(sqlToRun)#
it will be pointed out to you (possibly before I even finish composing this
response), that you are leaving yourself open to SQL
Right I am switching everything to as I read about SQL injection.
Do you see my Invalid CFML construct found on line 22 at column 120.
above though? I still dont.
-Jason
>if you're going to be generating your SQL like that, you'll need to wrap
>your final variable in preserveSingleQuotes().
A) Always use . (Note the period.)
B) When in doubt, use anyways. (Note the period.)
C) While preserveSingleQuotes() can be a useful tool at times, I would have
a very difficult time thinking of a time where I would use it.
D) Always use . (Note again, the period.)
E) You cannot use in the mi
Basically, the is kind of redundant and
negates the benefit of the cfquery tag. Put all you SQL inside the
cfquery tag. cfqueryparam is only valid within cfquery tags.
Dominic
2009/6/28 Jason Slack :
>
> CF 8.01 OS X.
>
> I have:
>
>
>
> #sqlToRun#
>
>
> #sqlToRun#
>
#replace(sqlToRun,"''","'","ALL")#
Paul Alkema
-Original Message-
From: Dominic Watson [mailto:watson.domi...@googlemail.com]
Sent: Tuesday, June 30, 2009 5:22 AM
To: cf-talk
Subject: Re: SQL Help
Basically, the is kind of redundant a
"it's not good practice in ColdFusion to do this. "
I don't agree with that : sometimes you have to do multiple updates, inserts or
else at the same time, depending on your process and some conditions; instead
of doing multiple (and thus multiple db connections), it is sometimes
cool to be a
>>As Dominic said, putting the entire sql statement in as a variable in
ColdFusion isn't necessary.
Please, there IS a very good reason one would put an SQL statement in a
variable:
when using some tool to generate build queries for instance.
I have many examples in my own CMS, like a report bu
And with preserveSingleQuotes() you have to hope you're better at
cleaning input than hackers are at writing SQL injection. And yes, we
all know you're totally awesome at it; this response is for others
who'd rather not make that bet.
mxAjax / CFAjax docs and other useful articles:
http://www.bif
phane Vantroyen [mailto:s...@emakina.com]
Sent: Tuesday, June 30, 2009 8:55 AM
To: cf-talk
Subject: Re: SQL Help
"it's not good practice in ColdFusion to do this. "
I don't agree with that : sometimes you have to do multiple updates, inserts
or else at the same time, depending
>>And with preserveSingleQuotes() you have to hope you're better at
cleaning input than hackers are at writing SQL injection.
When I'm talking about a CMS, I'm talking about some tool some customers
have paid for
and that is only accessible by approved users with authentication.
Now if they wan
There's no reason you need a variable to do multiple updates in a
single query statement. You can still put the SQL inside the query
tags and, as you say, separate the statements with a semi-colon.
Scott
On Tue, Jun 30, 2009 at 6:55 AM, Stephane Vantroyen wrote:
>
> I don't agree with that : som
would just use a stored proc and feed in the name.
-Original Message-
From: Scott Brady [mailto:dsbr...@gmail.com]
Sent: Tuesday, June 30, 2009 9:52 AM
To: cf-talk
Subject: Re: SQL Help
There's no reason you need a variable to do multiple updates in a
single query statement. You can
> When I'm talking about a CMS, I'm talking about some tool some customers
> have paid for and that is only accessible by approved users with
> authentication.
> Now if they want to hack and sabotage their own application they have
> paid for, it's their problem, and if it ever happens, they will
Sure, as long as the CMS has no XSS attack points...
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/
2009/6/30 Claude Schneegans :
>
> >>And with preserveSingleQuotes() you have to hope you're better at
> cleaning input than hackers are at writing SQL injection.
>>Internal security problems are far more common than external ones.
Within a large organization, not all users may be trustworthy.
C'mon, if they are users and they have access to the system, if they go
crazy,
do they really need SQL injection to harm the system ?
They can simply delete all wh
With SQL injection they can delete what they don't have access to.
With XSS they can do that while making it look like someone else did
it.
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/
2009/6/30 Claude Schneegans :
>
> >>Internal security problems are far more
>>With XSS they can do that while making it look like someone else did it.
Probably, but my clients barely know the difference between a computer
and a toaster,
and I spend more of my time explaining them that in order to "press
Ctrl", they must find a key
on their keyboard with the letters "C
27;s just a
matter of time before something bad happens.
-Original Message-
From: Claude Schneegans [mailto:schneeg...@internetique.com]
Sent: Tuesday, June 30, 2009 11:19 AM
To: cf-talk
Subject: Re: SQL Help
>>With XSS they can do that while making it look like someone else did it.
Probably,
> If you don't take security in mind when writing
> applications it's just a matter of time before
> something bad happens.
I can't tell you how many times I've been contacted by people who have had
their site broken and need an emergency fix. I've made quite a bit of money
fixing other people's
>>Also, you talk about this like your speaking of only internal
applications
or applications that could never go on a production environment.
Indeed, we were talking about building SQL queries in a variable inside
a Content management system.
Of course, for parts of the site exposed to public,
> C'mon, if they are users and they have access to the system, if they go
> crazy,
> do they really need SQL injection to harm the system ?
> They can simply delete all what they have access to, they can replace
> content by porn, whatever.
> Will CFQURYPARAM protect your application against that
> I've built an application for a Fire/Rescue service to log their calls,
> meeting attendance, etc. (geared to small, volunteer agencies). One of the
> things that's very important for them is a sum of the hours spent
> on calls.
> Each call record has a uniquely generated call number that is the
Philip,
Thanks for the help. Unfortunately, that didn't do the trick. The query
returns a -2. I've put in test records to this point, so I know that the
return should be 22.
Any other ideas?
Thanks,
Scott
Scott Brader
Prairie Software Development LLC
101 East Sadd Street
PO Box 235
North Prairi
Philip,
Upon further testing, your suggestion does work fine, however, I'm getting
the error whenever the times are on two different days; dispatch time was
23:25 and return to quarters time was 02:15. Will I have to change it from
short time format to a different date/time format?
Thanks,
Scott
, 2001 1:42 PM
To: CF-Talk
Subject: RE: SQL Help, Please
Philip,
Thanks for the help. Unfortunately, that didn't do the trick. The query
returns a -2. I've put in test records to this point, so I know that the
return should be 22.
Any other ideas?
Tha
Mobile: 262.490.1376
<http://www.prairiesoftdev.com>
Amateurs practice until they get it right,
Experts practice until they can't get it wrong.
-Original Message-
From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 7:51 AM
To: CF-Talk
Subject: RE: SQL H
where emp_nr not like
'00%'))
-Original Message-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:53 AM
To: CF-Talk
Subject: Re: SQL HELP
Joshua Tipton wrote:
> For some unknown reason this query does not work correctly even though
g zero's in the other table
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2002 14:11
To: CF-Talk
Subject: RE: SQL HELP FIXED
I put this where statment in and it fixed the problem. The emp_id_nr in
tblemployee was null for empnr starting with six zeros
Had some incorrect info in there Carry on :-)
Given the following journals with related documents.
Journal A
document1a - Jan 1, 2004
document2a - Jan 2, 2003
document3a - Dec 3, 2002
Journal B
document1b - Jan 3, 2001
document2b - Jan 4, 2000
document3b - Dec 2, 1999
Journal C
docu
> Had some incorrect info in there Carry on :-)
>
> Given the following journals with related documents.
>
> Journal A
>
> document1a - Jan 1, 2004
> document2a - Jan 2, 2003
> document3a - Dec 3, 2002
>
> Journal B
>
> document1b - Jan 3, 2001
> document2b - Jan 4, 2000
> document3b
Maybe I'm misunderstanding what you are trying to do, but try this
Select count(Referer) as refcount
From myTable
Where Referer = #myUserID#
Cutter
Dave Phillips wrote:
> Hi guys,
>
> I hope this isn't too far off topic, but I'm stuck on an SQL issue and
> really need some help.
>
> I have
the work when we'll do 94% of it for you?" -
http://honor.94percent.com
_
From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:31 PM
To: CF-Talk
Subject: Re: SQL Help Please?
Maybe I'm misunderstanding what you are trying to do, but try this
Sele
This is what you need ...
SELECT DISTINCT(referer), COUNT(referer)
FROM users
GROUP BY referer
-- Jeff
_
From: Dave Phillips [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:37 PM
To: CF-Talk
Subject: RE: SQL Help Please?
Unfortunately, that will only give me the number of
ll do 94% of it for you?" -
http://honor.94percent.com
_
From: Jeff Chastain [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 8:39 PM
To: CF-Talk
Subject: RE: SQL Help Please?
This is what you need ...
SELECT DISTINCT(referer), COUNT(referer)
FROM users
GROUP BY referer
-- J
Anyone?
Bueller? Bueller?
- Original Message -
From: [EMAIL PROTECTED]
Date: Wednesday, March 13, 2002 2:51 pm
Subject: SQL help please
> Brain not working Must help...
>
> Here's my data set:
>
> employeeid startdate enddate paycatid
> --- --- --- --
select ... count(paycatid) as samepaycatid group by paycatid
laszlo
[EMAIL PROTECTED] wrote:
> Anyone?
>
> Bueller? Bueller?
>
> - Original Message -
> From: [EMAIL PROTECTED]
> Date: Wednesday, March 13, 2002 2:51 pm
> Subject: SQL help please
>
> > Brain not working Must hel
Nope, that doesn't work.
- Original Message -
From: laszlo <[EMAIL PROTECTED]>
Date: Wednesday, March 13, 2002 4:06 pm
Subject: Re: SQL help please
> select ... count(paycatid) as samepaycatid group by paycatid
>
> laszlo
>
>
> [EMAIL PR
March 13, 2002 4:10 PM
Subject: Re: SQL help please
> Nope, that doesn't work.
>
> - Original Message -
> From: laszlo <[EMAIL PROTECTED]>
> Date: Wednesday, March 13, 2002 4:06 pm
> Subject: Re: SQL help please
>
> > select ... count(paycatid) as samepayc
le, MD 20850-1299WWW:http://www.euservices.com
__
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 13, 2002 6:10 PM
> To: CF-Talk
> Subject: Re: SQL help p
Yeah, I ended up using a cursor to do it. Thanks Bill.
-Original Message-
From: Bill Grover [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 6:01 AM
To: CF-Talk
Subject: RE: SQL help please
I'm not sure you can do it with a simple select statement. If I understand
wha
cc:
03/13/02 Subject: Re: SQL help please
04:51 PM
] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 11:06 AM
> To: CF-Talk
> Subject: Re: SQL help please
>
>
> try
>
> select employeeid, startdate, enddate, count(*), paycatid
> from X
> gro
That means there is a foreign key constraint you are violating.
Example:
say you have a USERS table and an ORDERS table. The primary key in USERS is
user_ID and ORDERS has a user_ID field (but it's not the primary key). IF
there is a foreign key constraint defined that says you can't have an o
If athID is your primary key, have you set Identity to 'yes'? (This will
"autonumber" your records.)
HTH
D
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374
-Original Message-
From: CF_JONNY [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18,
This will work in sql server. Don't think access supports compound outer
joins... I could be mistaken though...
Select * from
Docmaster left outer join versions on
docmaster.docnum = versions.docnumber and
docmaster.version = versions.version
Where verersions.docnumber is null
UH OH! THERE IS A PROBLEM WITH WHAT I'M ASSUMING CAME FROM THE CFHUB SITE. I
JUST TRIED TO SIGN UP AND NOW I AM GETTING ALL THESE EMAILS!
-Original Message-
From: Costas Piliotis [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 3:51 PM
To: CF-Talk
Subject: RE: SQL Help N
Worked perfectly! Thank you! Now if I can only get them imported.
Athelene
-Original Message-
From: Costas Piliotis [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 2:51 PM
To: CF-Talk
Subject: RE: SQL Help Needed!
This will work in sql server. Don't think access sup
CF-Talk emails from the 'Hub?
Perhaps you subscribed to CF-Talk? I know CFHub posted another link to
CF-Talk (co houseoffusion.com) today but...
> UH OH! THERE IS A PROBLEM WITH WHAT I'M ASSUMING CAME FROM THE CFHUB SITE.
I
> JUST TRIED TO SIGN UP AND NOW I AM GETTING ALL THESE EMAILS!
>
Let me get this straight, you want a report to summarize the number of
installs by date and client. So client 1 ran 3 installs on 6/1 and 2
installs on 6/2.
I believe you simply need to group by hostname, and then date and then
use an aggregate function (count()) to add up the records in between
[EMAIL PROTECTED] wrote:
> HostName, iDate, Package
> client1, 2007-06-01, Update1
> client1, 2007-06-01, Update2
> client1, 2007-06-01, Update3
> client1, 2007-06-02, Update5
> client1, 2007-06-02, NewApp
> client2, 2007-06-01, Update1
> client2, 2007-06-01, Update2
> client2, 2007-06-01, Update3
chris,
turn off the html mail, post in plain text and we'll try.
thanks,
.jeff
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_t
You'll have to check on the exact syntax, but something like this should work:
INSERT INTO myTable
(col1, col2, col3)
SELECT col4, col5, col6
FROM otherTable
The SELECT can be as complex as you want, as long as the columns it
returns are the same number and type as what is needed by the INSERT
Okay, here's what I've come up with we'll see how it goes...
SELECT lanesID, subcategoryID, name, availability, price, srp, cost, description
FROM dolls_backup
INSERT INTO tblProducts(ProdName, ProdDesc, ProdSRP, ProdPrice,
ProdCost, SubcatID)
VALUES (dolls_backup.name, dolls_backup.description, d
23:13
> To: CF-Talk
> Subject: Re: SQL Help Needed
>
> Okay, here's what I've come up with we'll see how it goes...
>
> SELECT lanesID, subcategoryID, name, availability, price, srp, cost,
> description
> FROM dolls_backup
> INSERT INTO tblProducts(Prod
101 - 200 of 260 matches
Mail list logo