umns, so I could actually have 20 rows with this
>> situation. They all merge into one though.
>>
>> Sorry for the confusion, I just redact true data whenever possible.
>>
>> -Original Message-
>> From: Greg Morphis [mailto:gmorp...@gmail.com]
>> Sent:
t: Monday, January 24, 2011 2:00 PM
> To: cf-talk
> Subject: Re: Need a little sql help...
>
>
> How do you know the 2 Steve's are the same Steve?
> What if there was another Steve who was also 40 but lived elsewhere?
> Can you provide some more
o: cf-talk
Subject: Re: Need a little sql help...
How do you know the 2 Steve's are the same Steve?
What if there was another Steve who was also 40 but lived elsewhere?
Can you provide some more realistic data? And how you'd know they were
the sam
How do you know the 2 Steve's are the same Steve?
What if there was another Steve who was also 40 but lived elsewhere?
Can you provide some more realistic data? And how you'd know they were
the same Steve? or whomever?
On Mon, Jan 24, 2011 at 12:57 PM, DURETTE, STEVEN J (ATTASIAIT)
wrote:
>
> Hi
Hi all,
My SQL mojo seems to have left me. Here is the situation, I have 1
table. In this table there are some times two rows that should have
actually been one. Here is an example to explain.
Table: Name, Age, address one, address two
Row 1: Steve,40,123 Anystreet,NULL
Row 2: Steve
Figured it out. I was missing a join. Should have been:
SELECT DISTINCT phases.phase AS phaseLabel,
narratives.title,
narratives.id,
narratives.content,
phases.id AS phaseId
FROM( ( nsftool.phases2company phases2company
I am having a SQL problem that I'm guessing amounts to me just being brain
dead today but I'd really appreciate any help with this. Here is the query:
SELECT phases.phase AS phaseLabel,
narratives.title,
narratives.id,
narratives.content,
phases.id AS phaseId
FROM
Brad, I'll have to look at your response in much greater detail, but I
can tell you this.
Currently, I'm running a CF script that populates a prospect_export
table once a day. The initial query returns 25,785 rows, which gets
flattened into 20,265 rows for reporting purposes.
Ultimately I'd rat
> As long as you are only dealing with a dozen or so records
> from the database it should perform fine and and I think it will be
> a heck of a lot simpler than trying to make your SQL server take a
> row-based list of people and pivot them out into columns.
Assuming the example is actually r
> Original Message
> Subject: (ot) Transact-SQL Help
> From: Rick Root
> Date: Thu, September 10, 2009 12:25 pm
> To: cf-talk
>
>
> I'm hoping someone here can point me in the right direction. I'm
> doing something in CF that I real
You might also take a look at ms sql 2005's row_number() function. You may be
able to partition the data and use row_number() to limit the returned records.
http://msdn.microsoft.com/en-us/library/ms186734.aspx
~
> This is where the limiting nature of SQL comes in--SQL is a set language
> and has no (or very limited) looping/reshaping capability. Unless MS
> has extended their SQL in ways I'm not aware of, this would be nearly
> impossible. That's where the power of CF comes in.
That's not true. You can
Hi Rick,
This is where the limiting nature of SQL comes in--SQL is a set language
and has no (or very limited) looping/reshaping capability. Unless MS
has extended their SQL in ways I'm not aware of, this would be nearly
impossible. That's where the power of CF comes in.
--Ben
Rick Root wrote
I'm hoping someone here can point me in the right direction. I'm
doing something in CF that I really need to be doing in SQL:
I need to flatten this data:
select
A.entityid,
A.MEMBERID,
A.RELTYPE,
A.leaderFlag
from
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.
> >
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
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
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
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;
: Tuesday, August 25, 2009 4:27 AM
To: cf-talk
Subject: SQL Help
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 more efficient. Basically, I want to exclud
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
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,
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
~
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 more efficient. Basically, I want to exclude the
current special from the result set. Any ideas?
SE
> 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
>>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,
> 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
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,
>>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
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
>>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
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.
> 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
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
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
>>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
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. 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
>>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
"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
#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
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#
>
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
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().
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
CF 8.01 OS X.
I have:
#sqlToRun#
#sqlToRun#
the is:
INSERT INTO personalevent(eventid, userid, username, eventdate) VALUES(1, 1,
'jason', '2009-06-27')
Which runs fine in a SQL Editor, but running that in the above I get:
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
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
Hello there,
I do appreciate this isn't the right forum for posting this question but I have
posted my question in the SQL forum but I haven't heard anything back. It's a
very straightforward query... at least I hope it is for someone with good sql
skills.
I was hoping someone could help here.
> 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 ;-)
~
> 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
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.
~
> 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.
> 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
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
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
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.
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,
= '#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
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
; Sent: Tuesday, September 16, 2008 8:58 AM
> To: CF-Talk
> Subject: SQL Help
>
> 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
&
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
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 does not work:
SELECT mytable.lastname, mytable.firstname, mytable.city, my
ok i go it i think
but it just looks so weird to me..
it looks back wards but works...
SELECT DISTINCT TOP 100 PERCENT dbo.V_riprod_ZMATMAST.sap_partnum AS NEQnumb
FROM dbo.V_riprod_ZMATMAST LEFT OUTER JOIN
dbo.V_riprod_Specs_ZMATMAST_EQ ON
dbo.V_riprod_ZMATMAST.sap_
ok i have 2 views
V_riprod_ZMATMAST returns 60 records
V_riprod_Specs_ZMATMAST_EQ returns 39 records or so that are matched
in another table.
these i will do an update on
problem i am having is the NEQ <>
i am trying to use the view below to return all the results of the
records that don't match.
upsell_sort
> FROM products, brands, upsell
> WHERE products.brand_id = brands.brand_id
> AND products.product_id = upsell.product_id
> AND products.product_id in (20,21)
> ORDER BY upsell.upsell_sort ASC,
> brands.brand_name ASC,
> products.product_item ASC
>
> And what&
d_id
AND products.product_id = upsell.product_id
AND products.product_id in (20,21)
ORDER BY upsell.upsell_sort ASC,
brands.brand_name ASC,
products.product_item ASC
And what's with the... sql help!!
Sounds like you're goin' down o
ok i need to put Upsell items underneath the "add upsell items" form, so that
they can see what upsell products they currently have for that product.
(mysql 5 btw)
So it is all good but then they asked for me to make it "sort-able" and that is
causing me a headache and can't quite get that last
I'm having a weird query issue with SQL server...
The following query inserts two rows into the query_results
table:
insert into ENQUIRE.dbo.QUERY_RESULTS ( QUERYID, ENTITY_ID )
SELECT DISTINCT 1933 AS QUERYID, A.ENTITY_ID
FROM BIOTAB1
[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
only. (syntax depends on your DB).
~Brad
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 10:16 PM
To: CF-Talk
Subject: SQL Help, please ...
Hello,
It's been a wile since I have had to do much in the way of SQL queries
and
I need
Hello,
It's been a wile since I have had to do much in the way of SQL queries and
I need some help.
I have a table called "installs" that looks like this
HostName, iDate, Package
client1, 2007-06-01, Update1
client1, 2007-06-01, Update2
client1, 2007-06-01, Update3
client1, 2007-06-02, Update5
cl
Heck, I did up a special page just to explain my needs better. :)
http://wtomlinson.com/eval.html
been flailing away at this for quite a while now...
Thanks,
Will
~|
ColdFusion MX7 and Flex 2
Build sales & marketing dashboard
Ok, I have one last query to get right in my eval app.
Here's my schema: http://wtomlinson.com/evalschema.gif
Jim has been kind enough to help work out my queries. Now, I just need to
rollup my rankings questions and I'm done (mostly).
The data looks like this:
tblquestions:
Rank these tools
IL PROTECTED]>
> To: "CF-Talk"
> Sent: Tuesday, April 03, 2007 2:09 PM
> Subject: Re: SQL Help - Answered
>
>
>
>> I'm going to have to look at something. I'm still not getting what I
>> anticipated.
>>
>> There are over 3700
Dump that and see if you're any closer to what you want.
-- Josh
- Original Message -
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: "CF-Talk"
Sent: Tuesday, April 03, 2007 2:09 PM
Subject: Re: SQL Help - Answered
> I'm going to have to look
can you provide a sample of your data and the way your table is
designed (column name, type)?
Thanks
On 4/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm going to have to look at something. I'm still not getting what I
> anticipated.
>
> There are over 3700 records of which 1775 of them
I'm going to have to look at something. I'm still not getting what I
anticipated.
There are over 3700 records of which 1775 of them are distinct values
for "RATE". However, I am only getting values of 1 for COUNT(DISTINCT
rate) as rateCount. I was trying to find out how many records are the
No problem, if you want to know "why" take a look at aggregate
functions, which is what "count" is, as well as others..
On 4/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thank you
>
> Greg Morphis wrote:
> > You need a group by in your query..
> >
> >> SELECT count(DISTINCT rate) as rate
Thank you
Greg Morphis wrote:
> 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]> w
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
Why do the first two queries work and the last one fail? The only difference is
adding the comma and additional field to the SELECT statement.
SELECT count(DISTINCT rate) as rateCount
FROMmyrates
WHERE my_code = 385 and year = 2005
ORDER BY rate
SELECT rate
FROMmyrates
WHERE my_
Ok Jim, this is getting the results I'm after.
The counts are correct, everything looks right so far. I just needta test it
some more.
Would you please email me offlist?
WT at WTOMLINSON.com
Thanks a ton dude!
Will
~|
Co
Thanks a ton Jim! I'll give it a shot later today and let you know the results.
Thanks!
Will
~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2
Free Trial
http://www.adobe.com/products/coldf
Three things I noted...
1. There are a lot of duplicated columns in the result list...I removed
those to make it easier to read and debug
2. It looks to me like tblevalanswerresults needs to be joined to both
tblquestions and tblanswers...see below
3. When you join on tblEvaluations like you did
>No been following this thread, but can you do the first two parts?
Yes, I've got this part working with Jochem's fine SQL.
>
>What about the third part?
>
>"With each possible answer, show me a count of the ones that were selected"
Nope
>
>Do those then try to combine them.
>
>Adrian
This is
try to combine them.
Adrian
-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED]
Sent: 21 March 2007 10:45
To: CF-Talk
Subject: Re: Need More SQL help - DRIVING ME NUTS!
Put every field from the select that is not an aggregate in your
>group by and you get something un
Put every field from the select that is not an aggregate in your
>group by and you get something understandable.
>
>Jochem
Jochem,
I did this and it still gives me incorrect results. It gives me a count of 1
for each answer, no matter what the answer is. I'm just testing with one
evaluation r
Will Tomlinson wrote:
> And what I can't figure out is why this:
>
> COUNT(EAR.answerID) AS numAnswers
>
> would produce values of 1 for rows in which it should be 0.
Because you are using MySQL and MySQL has broken grouping. Your
statement is invalid SQL and the database should throw an er
And what I can't figure out is why this:
COUNT(EAR.answerID) AS numAnswers
would produce values of 1 for rows in which it should be 0.
Thanks,
Will
~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX
MySQL 5
Here's some table date as it looks in tblEvalAnswerResults. This is a many
table.
http://wtomlinson.com/evalQRYs/tableData.gif
Then here's what my query produces. I had to add E.evalID to get both
evaluations to show up in the results. I went ahead and did another evaluation,
so ther
Will,
Which DB are you using and if it's not difficult can you also post db
scripts to create tables and populate some sample data.?
Thanks
Qasim
On 3/20/07, Will Tomlinson <[EMAIL PROTECTED]> wrote:
>
> Ok, I'm really close on this. I've been workin on it for hours, changing
> queries, not ge
Ok, I'm really close on this. I've been workin on it for hours, changing
queries, not gettin the results I need.
I filled out one survey of 3 questions, each question has 5 possible answers.
Here's the query:
SELECT
Q.questionID,
Q.questionsetID,
Q.question,
Q.answersetid,
ARS.answersetid,
Ok, I ALMOST got it! The results that are incorrect is just the number of
answers per question.
Here's what the query returns:
http://wtomlinson.com/evalQRYs/qryData.jpg
Look at numAnswers. I completed two evaluations. But numAnswers should be the
total count of each answer that was given. I
I may have figured it out...
I used this for my group by.
GROUP BY Q.questionID, A.answerID
Still needta test it more tho but my results are lookin better.
Thanks Jochem!
Will
~|
ColdFusion MX7 and Flex 2
Build sales & mar
Jochem, this is close but not quite giving me the results I'm after.
Here's the data as it looks in the table. I answered three questions, each had
a choice of 5 answers. I chose 1 answer for each question.
Here's the data as it appears in the tblEvalAnswerResults many table.
http://wtomlinso
>Will Tomlinson wrote:
>>
>> Do all these individual queries go into one query, separated with a ; ?
>
>Just run the last one, the others are to show how you build it step by step.
>
duhh.. :)
Thanks Jochem!
Will
~|
ColdFu
Will Tomlinson wrote:
>
> Do all these individual queries go into one query, separated with a ; ?
Just run the last one, the others are to show how you build it step by step.
Jochem
~|
Upgrade to Adobe ColdFusion MX7
Experience
1 - 100 of 481 matches
Mail list logo