Re: Need More SQL help - DRIVING ME NUTS!

2007-03-20 Thread Qasim Rasheed
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 gettin

Re: Need More SQL help - DRIVING ME NUTS!

2007-03-20 Thread Will Tomlinson
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

Re: Need More SQL help - DRIVING ME NUTS!

2007-03-20 Thread Will Tomlinson
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

Re: Need More SQL help - DRIVING ME NUTS!

2007-03-20 Thread Jochem van Dieten
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 error,

Need some SQL help!

2007-03-19 Thread Will Tomlinson
MySQL 5. I'm building a dynamic question survey form. Here's my db schema: http://wtomlinson.com/evalDBSchema.jpg I need to pull data for a specific instructor. How do I get a count for each answer? I need to display each question like this: http://wtomlinson.com/evaldisplay.jpg I'm

Re: Need some SQL help!

2007-03-19 Thread Will Tomlinson
Ok, I wrote down in plain english what I need. Show me a list of questions, all possible evaluation answers for each question, and a total of each answer chosen. Does this make sense? Thanks, Will ~| ColdFusion MX7 by

Re: Need some SQL help!

2007-03-19 Thread Dinner
On 3/19/07, Will T wrote: MySQL 5. I'm building a dynamic question survey form. Here's my db schema: Honestly, I would probably do it in CF with loops, vs. a nifty SQL query. Also, a cheap and easy solution, is to use a graphic query builder (like *shiver* MSAccess ;)... although, you should

Re: Transact-SQL help

2007-02-07 Thread Billy Jamme
Can you post the query execution plan? It sounds like you forgot to add an index. I have anice getdistance function that calcs the distance between two zip codes. **snip** However, that is very slow. It's very fast if I pass in the lat and long.

Re: Transact-SQL help

2007-02-07 Thread Billy Jamme
Can you post the query execution plan? It sounds like you forgot to add an index. That or the you're killing the optimizer with the SELECT *; bookmark lookups can kill a DB. I've got my zip code database proximity thing all figured out. I have a nice getdistance function that calcs the

Re: Transact-SQL help

2007-02-07 Thread Rick Root
Query optimization didn't have anything to do with it. I was running getDistance(zip1,zip2) instead a WHERE IN clause. My getDistance() function, which was based on Russ' would actually do two selects based on the zip code arguments. For example select prospect, name, address, city, state, zip

OT: Transact-SQL help

2007-02-06 Thread Rick Root
I've got my zip code database proximity thing all figured out. I have a nice getdistance function that calcs the distance between two zip codes. syntax of my function: getDistance(zip1,long1,lat1,zip2,long2,lat2) taking either the zip code or the lat/long for each... I can now do: SELECT *

RE: Transact-SQL help

2007-02-06 Thread Russ
Rick, Did you take a look at the query that I sent earlier? It takes only 3 seconds to run on my machine. Russ -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 11:49 AM To: CF-Talk Subject: OT: Transact-SQL help I've got my zip

Re: OT: Transact-SQL help

2007-02-06 Thread Jochem van Dieten
Rick Root wrote: syntax of my function: getDistance(zip1,long1,lat1,zip2,long2,lat2) taking either the zip code or the lat/long for each... SELECT * FROM prospects A WHERE zipcode in ( SELECT B.zipcode FROM zipcodes B WHERE

Re: Transact-SQL help

2007-02-06 Thread Rick Root
Russ, if you're referring to this one: * http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50203#268742 *http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50203#268742 works fine if you want to pass in the lat/long directly, but I'm trying to come up with a way to do

Re: OT: Transact-SQL help

2007-02-06 Thread Rick Root
On 2/6/07, Jochem van Dieten [EMAIL PROTECTED] wrote: This query is not indexable so it needs to do the math on each and every row. Prequalify the rows by drawing an imaginary box on the map from b.lat + X to b.lat -X and b.lon + X to b.lon -X and finding only the points in that box (the

RE: Transact-SQL help

2007-02-06 Thread Russ
No, I'm referring to: http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50203#268818 Russ -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 12:42 PM To: CF-Talk Subject: Re: Transact-SQL help Russ, if you're referring

Re: Transact-SQL help

2007-02-06 Thread Jim Wright
Russ wrote: No, I'm referring to: http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50203#268818 That one is pretty quick here... SELECT b.* FROM tblzipcodes a CROSS JOIN tmpzipcodes b WHERE dbo.getDistance(a.latitude,a.longitude,b.latitude,b.longitude) 10 AND a.zip =

Re: Transact-SQL help

2007-02-06 Thread Rick Root
On 2/6/07, Russ [EMAIL PROTECTED] wrote: No, I'm referring to: http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:50203#268818 Ah, no I hadn't seen that one. I've never used CROSS JOIN before.. interesting. However, my final solution actually does the same thing in about

Re: Transact-SQL help

2007-02-06 Thread Rick Root
so many solutions, so little time! I like how you're limiting by latitude only and using the radius as well. Doing that actually lowered my execution time to 94ms ... =) On 2/6/07, Jim Wright [EMAIL PROTECTED] wrote: Russ wrote: No, I'm referring to:

Re: Transact-SQL help

2007-02-06 Thread Jim Wright
Rick Root wrote: I like how you're limiting by latitude only and using the radius as well. Thinking about limiting it by longitude made my head hurt...I thought about using some larger constant (like the 2 degrees that you used), but in Alaska, 2 degrees longitude only equates to about 44

Re: Transact-SQL help

2007-02-06 Thread Rick Root
Actually, I did a limitation by longitude as well, because at the equator, the fudge factor is the same (approximatley 69 miles per degree)... everything in the US is less than that but I figured what the heck. So I draw the box on both lat and long, knowing that the longitude will actually

RE: Transact-SQL help

2007-02-06 Thread Russ
You can also not think about the math, precompute the distance tables, and then only keep data in there where the distance is x miles. Russ -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 3:10 PM To: CF-Talk Subject: Re: Transact-SQL

Re: Transact-SQL help

2007-02-06 Thread Rick Root
I blogged all this here: http://www.opensourcecf.com/1/2007/02/Determining-Zip-Code-Proximity.cfm ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs

Re: Transact-SQL help

2007-02-06 Thread Jim Wright
Rick Root wrote: Actually, I did a limitation by longitude as well, because at the equator, the fudge factor is the same (approximatley 69 miles per degree)... everything in the US is less than that but I figured what the heck. So I draw the box on both lat and long, knowing that the

Re: Transact-SQL help

2007-02-06 Thread Robertson-Ravo, Neil (RX)
those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Rick Root To: CF-Talk Sent: Tue Feb 06 20:34:34 2007 Subject: Re: Transact-SQL help I blogged all this here: http://www.opensourcecf.com/1/2007/02/Determining-Zip-Code-Proximity.cfm

Re: Transact-SQL help

2007-02-06 Thread Rick Root
Jim, you make an excellent point that I hadn'e considered. However, in my blog entry on the topic, I'm actually doubling the size of the rectangle for the longitude, so I'm doing @lat1-(@[EMAIL PROTECTED]) so even though my range factor technically should be larger, I actually double it anyway,

Re: SQL help

2006-04-03 Thread Rick Root
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:

SQL help

2006-04-02 Thread Rick Root
I'm trying to figure out how to do something in SQL and I'm stumped. Essentially I have 5 tables t_salesreps contains sales reps t_cdusage contains session information - each time the sales rep uses the CD t_contentusage contains 1 row for each presentation show in a session. t_contentviewers

SQL help

2005-10-18 Thread Scott Mulholland
I've recently inherited an access database that I am trying to do some reporting on. One of the tables has the following structure: Att_ID Type Values 410 ColorBlue 410 ColorOrange 410 ColorBlack 410 ColorOlive Drab (green) 410 Size

RE: SQL help (updated)

2005-08-17 Thread Dave.Phillips
That probably needs to be WHERE #idnumber# IN (MyColumn) Ian, Yes, I tried that. I had typoed my e-mail, but in my code I had the parenthesis. That's what give the invalid comparison error. It doesn't seem to recognize the field. Dave

RE: SQL help (updated)

2005-08-17 Thread Dave.Phillips
: Tuesday, August 16, 2005 4:37 PM To: CF-Talk Subject: Re: SQL help (updated) You realize that this is essentially a db design issue - right? The table shouldn't be holding lists of numbers - there should be a join table that does that job. Right? On 8/16/05, [EMAIL PROTECTED] [EMAIL PROTECTED

RE: SQL help Query of Queries (SOLVED) was (SQL help)

2005-08-17 Thread Dave.Phillips
To: CF-Talk Subject: Re: SQL help (updated) [EMAIL PROTECTED] wrote: Okay, I still need help, but I've resolve part of my problem. I'm able now to have the list of ID numbers in one field by themselves. So, my new field value (MyColumn) looks like this: '5,2,3,4,45,7' I still need a way

SQL help

2005-08-16 Thread Dave.Phillips
Hi, I'm on Oracle 9i. I have a query (call it AllResults) that is returning a column (call it MyColumn) that's value looks like this: 'identifier|5,2,3,4,45,7' Each row may have a different 'identifier' and a different quantity of numbers. Basically, there are two values in this column.

RE: SQL help (updated)

2005-08-16 Thread Dave.Phillips
|in|comparison] condition TIA, Dave -Original Message- From: Phillips, Dave Sent: Tuesday, August 16, 2005 2:16 PM To: CF-Talk Subject: SQL help Hi, I'm on Oracle 9i. I have a query (call it AllResults) that is returning a column (call it MyColumn) that's value looks like this: 'identifier

RE: SQL help (updated)

2005-08-16 Thread Ian Skinner
SELECT * FROM AllResults WHERE #idnumber# in MyColumn That probably needs to be WHERE #idnumber# IN (MyColumn) The values of an IN clause are supposed to be in parenthesis I believe. You may also need to do something about the quotes if they are

Re: SQL help (updated)

2005-08-16 Thread Jochem van Dieten
[EMAIL PROTECTED] wrote: Okay, I still need help, but I've resolve part of my problem. I'm able now to have the list of ID numbers in one field by themselves. So, my new field value (MyColumn) looks like this: '5,2,3,4,45,7' I still need a way using Query of Queries to extract only

Re: SQL help (updated)

2005-08-16 Thread Deanna Schneider
You realize that this is essentially a db design issue - right? The table shouldn't be holding lists of numbers - there should be a join table that does that job. Right? On 8/16/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Okay, I still need help, but I've resolve part of my problem. I'm able

SQL Help Please

2005-06-03 Thread Jeff Fongemie
I've got a query that I just can't get right. select * From companies where companyhide = 0 and companyid = (select distinct companyid From releases where date_entered = DATE_SUB(curdate (),INTERVAL 8 day) and date_entered = DATE_SUB

RE: SQL Help Please

2005-06-03 Thread Matthew Small
and companyid in (select distinct companyid Matthew Small Web Developer American City Business Journals 704-973-1045 [EMAIL PROTECTED] -Original Message- From: Jeff Fongemie [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 10:20 AM To: CF-Talk Subject: SQL Help Please I've

RE: SQL Help Please

2005-06-03 Thread Dave Watts
I've got a query that I just can't get right. select * From companies where companyhide = 0 and companyid = (select distinct companyid From releases where date_entered = DATE_SUB(curdate (),INTERVAL 8 day) and date_entered = DATE_SUB

RE: SQL Help Please

2005-06-03 Thread Jeff Fongemie
: Friday, June 03, 2005 10:20 AM To: CF-Talk Subject: SQL Help Please I've got a query that I just can't get right. select * From companies where companyhide = 0 and companyid = (select distinct companyid From releases where date_entered = DATE_SUB(curdate

SQL help - inserting a dynamic variable

2005-04-11 Thread Pete Ruckelshaus
I'm making life harder on myself than I need to. Salient facts: CFMX7, SQL Server 2000 I'm trying to insert an address. The contact address table has the usual fields, i.e. id, contactID, address1, address2, city, state, zip, etc., but it also has an addressTypeID that is a lookup column that

Re: SQL help - inserting a dynamic variable

2005-04-11 Thread Gareth Arch
You've more or less posted the answer. The method to use would be: INSERT INTO tblContactAddress(contactID,addressTypeID,address1, etc.) SELECT #contactIDValue#, ID, '#address1Value#',etc. FROM tblAddressType WHERE typename = 'General' Just make sure typename = 'General' will only return one

Re: SQL help - inserting a dynamic variable

2005-04-11 Thread Pete Ruckelshaus
Oh, so IOW I can only do that for one join table, not more than one? I have a couple of lookup columns that I'll be inserting... Pete On Apr 11, 2005 12:54 PM, Gareth Arch [EMAIL PROTECTED] wrote: You've more or less posted the answer. The method to use would be: INSERT INTO

Re: SQL help - inserting a dynamic variable

2005-04-11 Thread Gareth Arch
You should be able to join as many tables as you like (just as in a regular query). Just select the column names you need insert into tblthis (columnone, columntwo, columnthree) select c.dataone, d.datatwo, e.datathree from mycolumns c inner join mycolumnstwo d on (c.my_id = d.my_id) inner join

OT - Sql Help

2005-02-17 Thread Mickael
Hi All, I am a little stumped with the following task in SQL which seems simple enough to me. I have a form that my users can select a range of Dates for a particular report. The range is not day month year, but month and year and ending month and year. In my database I have a date field,

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Mickael wrote: select * from table where date between Jan2005 and feb2005 ( so in essence not having to say Jan 1, 2005 and Feb 28, 2005) How about: WHERE MONTH(date) = 1 and YEAR(date) = 2005) and MONTH(date) = 2 and YEAR(date) = 2005

Re: OT - Sql Help

2005-02-17 Thread Charlie Griefer
try something like: cfset from_date = createDate(form.fromyear, form.fromMonth, 1) / cfset to_date = createDate(form.toyear, form.toMonth, daysInMonth(createDate(form.toyear, form.toMonth, 1))) / SELECT * FROM table WHERE date BETWEEN (#createODBCDate(variables.from_date))# AND

RE: OT - Sql Help

2005-02-17 Thread Eric Creese
PROTECTED] Sent: Thursday, February 17, 2005 10:19 AM To: CF-Talk Subject: OT - Sql Help Hi All, I am a little stumped with the following task in SQL which seems simple enough to me. I have a form that my users can select a range of Dates for a particular report. The range is not day month year

Re: OT - Sql Help

2005-02-17 Thread Charlie Griefer
oooh...that's cleaner than mine :) On Thu, 17 Feb 2005 11:26:52 -0500, Rick Root [EMAIL PROTECTED] wrote: Mickael wrote: select * from table where date between Jan2005 and feb2005 ( so in essence not having to say Jan 1, 2005 and Feb 28, 2005) How about: WHERE MONTH(date) =

Re: OT - Sql Help

2005-02-17 Thread Mickael
Hi Rick, That is simple. Thanks just what I was looking for - Original Message - From: Rick Root [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, February 17, 2005 11:26 AM Subject: Re: OT - Sql Help Mickael wrote: select * from table where date between

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Charlie Griefer wrote: oooh...that's cleaner than mine :) Maybe, some databases have the gall not to have Month() and Day() functions... postgres has neither... mysql didn't have Day() until 4.1.something.. although they had DayOfWeek(). Plus, if you want to use indexes, you can't do it the

RE: OT - Sql Help

2005-02-17 Thread Matthew Small
I think it's just as simple to say Select * from table where date = '1/1/2005' and date '3/1/2005' - Matt Small -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Thursday, February 17, 2005 11:50 AM To: CF-Talk Subject: Re: OT - Sql Help Charlie

Re: OT - Sql Help

2005-02-17 Thread Rick Root
Matthew Small wrote: I think it's just as simple to say Select * from table where date = '1/1/2005' and date '3/1/2005' The query is, but the way you get there dynamically is not, ecause you have to figure out what the next month is. So if your parameters are 1 2005 2

OT: SQL help

2005-01-06 Thread Tim Do
I'm trying to do a filter for a list of varchars values. I would like it to work like this but using an in instead of = fieldname = case when @variable = '0' then fieldname else @variable end basically if the list is empty do nothing else check the list. also, do I need to format the

RE: SQL Help Needed

2004-11-19 Thread Pascal Peters
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(ProdName, ProdDesc, ProdSRP, ProdPrice, ProdCost, SubcatID) VALUES

SQL Help Needed

2004-11-18 Thread Donna French
I am redesigning an SQL database and need to know if it's possible to select specific tables/columns from the original into specific tables/columns in the new database. I know I can select the columns I want but moving them into a specified column in the new db that isn't the same structure is

Re: SQL Help Needed

2004-11-18 Thread Barney Boisvert
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

Re: SQL Help Needed

2004-11-18 Thread Donna French
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,

Re: SQL help needed fast

2004-11-08 Thread Thomas Chiverton
On Friday 05 Nov 2004 21:00 pm, Eric Creese wrote: lines is an int and this is MySQL Database. No issues with it in access or sql server Are those escaped ' meant to be there, or did it just happen when you pasted into your mail client ? What happens if you try the query by hand ? also in

Re: SQL help needed fast

2004-11-08 Thread Eric Creese
I am not sure by what you mean about escaping but that was the read out from the error page. SELECT * FROM p1_matrix WHERE display=apos;yesapos; AND lines = 1 ORDER BY Charht ; I have done this successfully with Access. I did notice that the datatype for charht is decimal and for lines it

SQL help needed fast

2004-11-05 Thread Eric Creese
Can some one please tell me why this does not work? If you pass the url.inch variable it works fine. If you pass the url.line variable it fails with the following error. code is below the error I need an answer quick please Syntax error or access violation: You have an error in your SQL syntax

Re: SQL help needed fast

2004-11-05 Thread Qasim Rasheed
which db, what is the datatype of lines? On Fri, 5 Nov 2004 14:34:46 -0600, Eric Creese [EMAIL PROTECTED] wrote: Can some one please tell me why this does not work? If you pass the url.inch variable it works fine. If you pass the url.line variable it fails with the following error. code is

RE: SQL help needed fast

2004-11-05 Thread Eric Creese
Subject: Re: SQL help needed fast which db, what is the datatype of lines? On Fri, 5 Nov 2004 14:34:46 -0600, Eric Creese [EMAIL PROTECTED] wrote: Can some one please tell me why this does not work? If you pass the url.inch variable it works fine. If you pass the url.line variable it fails

SQL Help: nvarchar vs varchar

2004-10-12 Thread Ciliotta, Mario
Hi, I am trying to upsize an Access 97 database to SQL Server 7.0 and in the access database I have a few text fields with a size of 255.When I convert it to SQL Server, the text fields become nvarchar with a size of 255.Is there any difference in using nvarchar or varchar?I just started to

RE: SQL Help: nvarchar vs varchar

2004-10-12 Thread Micha Schopman
Microsoft SQL Server Help ... F1 .. Unicode Data Traditional non-Unicode data types in Microsoft(r) SQL Server(tm) 2000 allow the use of characters that are defined by a particular character set. A character set is chosen during SQL Server Setup and cannot be changed. Using Unicode data types,

RE: SQL help!

2004-08-12 Thread Bryan Love
PROTECTED] Sent: Tuesday, August 10, 2004 12:23 PM To: CF-Talk Subject: Re: SQL help! At 03:18 PM 8/10/2004, you wrote: This is probably basic, but my brain is not functioning at this point today... I need to compare two tables. They both contain customer numbers. One table mimics the other so

SQL help!

2004-08-10 Thread Jeff Waris
This is probably basic, but my brain is not functioning at this point today... I need to compare two tables. They both contain customer numbers. One table mimics the other so the same data *should* be in each. It has come to my attention that there are orphans in one of the tables. What I'd

Re: SQL help!

2004-08-10 Thread Phillip Beazley
At 03:18 PM 8/10/2004, you wrote: This is probably basic, but my brain is not functioning at this point today... I need to compare two tables. They both contain customer numbers. One table mimics the other so the same data *should* be in each. It has come to my attention that there are orphans

RE: SQL help!

2004-08-10 Thread Jeff Waris
Quick and dirty .and it worked like a charm.. Thanks IN was where I shoulda been looking... Jeff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: SQL help!

2004-08-10 Thread Claude Schneegans
SELECT * FROM table1 WHERE id NOT IN (SELECT id FROM table2) SELECT * FROM table2 WHERE id NOT IN (SELECT id FROM table1) Yes, and may be UNION the two in one: SELECT id FROM table1 WHERE id NOT IN (SELECT id FROM table2) UNION SELECT id FROM table2 WHERE id NOT IN (SELECT id FROM table1)

RE: SQL help!

2004-08-10 Thread Jeff Waris
That union worked well too... thanks! Jeff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

CF/SQL Help Needed

2004-08-03 Thread Donna French
I have compiled 2 lists of files - one is a list of all files, the second is a list of files I want to keep. What I would like to accomplish is flag the files in the first list that are NOT in the second list so they can be deleted from the server. I've setup 2 tables: Lanesid (table 1) ID

Re: CF/SQL Help Needed

2004-08-03 Thread John mccosker
this should work, UPDATE LANESID2 SET FLAG = 'yes' whereLANESID2.id not in (select Lanesid.id from Lanesid) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: CF/SQL Help Needed

2004-08-03 Thread Donna French
it doesn't seem to be working, any suggestions? i've tried several things to no avail TIA, Donna - Original Message - From: John mccosker To: CF-Talk Sent: Tuesday, August 03, 2004 9:35 AM Subject: Re: CF/SQL Help Needed this should work, UPDATE LANESID2 SET FLAG = 'yes

Re: CF/SQL Help Needed

2004-08-03 Thread I-Lin Kuo
Your database structure isn't very clear to me. How do you know one file is in a table? Same ID, or is its filename in a comma-delimited list field list in filesall? If fileskeep and filesall are comma-delimited lists, then there isn't an easy solution --- Donna French [EMAIL PROTECTED] wrote:

Re: CF/SQL Help Needed

2004-08-03 Thread Donna French
.40334) Does this make sense ? TIA, Donna - Original Message - From: I-Lin Kuo To: CF-Talk Sent: Tuesday, August 03, 2004 10:45 AM Subject: Re: CF/SQL Help Needed Your database structure isn't very clear to me. How do you know one file is in a table? Same ID, or is its filename

Re: CF/SQL Help Needed

2004-08-03 Thread Joe Rinehart
fileName FROM filesKeep ) /cfquery Have a good one, Joe - Original Message - From: Donna French [EMAIL PROTECTED] Date: Tue, 3 Aug 2004 12:43:11 -0500 Subject: Re: CF/SQL Help Needed To: CF-Talk [EMAIL PROTECTED] the FilesAll came from a CFDirectory listing I did - it's in a table now

Re: CF/SQL Help Needed

2004-08-03 Thread I-Lin Kuo
I think I understand, so your data looks like this: TABLE1 ID FilesKeep 1 passwords.txt 5 salary.txt TABLE2 ID FilesAll Flag 2 salary.txt 5 budget.txt 6 passwords.txt where the identifier is the filename, not the id. If so, then update table2 set flag=delete where filesall not in (select

SQL Help Please?

2004-07-30 Thread Dave Phillips
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 a table with these two fields: UserID(int) Referer (int) UserID is obviously my user's ID number.Referer refers to the UserID of the person who referred them. I need to run an SQL

Re: SQL Help Please?

2004-07-30 Thread Cutter (CF-Talk)
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 a

RE: SQL Help Please?

2004-07-30 Thread Dave Phillips
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 Select count(Referer) as refcount From myTable

RE: SQL Help Please?

2004-07-30 Thread Jeff Chastain
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

RE: SQL Help Please?

2004-07-30 Thread Dave Phillips
% 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 -- Jeff _ From: Dave Phillips

SQL Help

2004-06-16 Thread Venable, John
Hey Folks, I've got a query that I'm trying to pull some aggregate data from and refer to it with array syntax. i.e. #queryname.field[i]# One query I have isn't pulling all the values that I might encounter, thereby throwing the index off for any references thereafter. here's my query:

RE: SQL Help

2004-06-16 Thread Pascal Peters
, John [mailto:[EMAIL PROTECTED] Sent: woensdag 16 juni 2004 18:25 To: CF-Talk Subject: SQL Help Hey Folks, I've got a query that I'm trying to pull some aggregate data from and refer to it with array syntax. i.e. #queryname.field[i]# One query I have isn't pulling all the values that I

RE: SQL Help

2004-06-16 Thread Venable, John
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 You

RE: [OT] SQL help

2004-05-27 Thread Monique Boea
what is OT? -Original Message- From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:22 PM To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like

RE: [OT] SQL help

2004-05-27 Thread John Stanley
Off Topic -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:11 AM To: CF-Talk Subject: RE: [OT] SQL help what is OT? -Original Message- From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:22 PM To: CF

RE: [OT] SQL help

2004-05-27 Thread Philip Arnold
From: Monique Boea what is OT? Off Topic [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: [OT] SQL help

2004-05-27 Thread Monique Boea
Thanks :) -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:13 AM To: CF-Talk Subject: RE: [OT] SQL help Off Topic -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:11 AM To: CF-Talk

RE: [OT] SQL help

2004-05-27 Thread John Stanley
You are welcome. ;-) -Original Message- From: Monique Boea [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:17 AM To: CF-Talk Subject: RE: [OT] SQL help Thanks :) -Original Message- From: John Stanley [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:13 AM

Re: [OT] SQL help

2004-05-27 Thread Spectrum Web
ENDAS [group] From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 8:22 a.m. To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table

[OT] SQL help

2004-05-25 Thread Spectrum WebDesign
Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like this: Group 1: = 16 years Group 2: =17 E = 25 Group 3: =26 E = 40 Group 4: =41 years My$SQL give the ages but how to aggrupate in that groups? Thanx for your time. --

RE: [OT] SQL help

2004-05-25 Thread Matthew Walker
] From: Spectrum WebDesign [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 8:22 a.m. To: CF-Talk Subject: [OT] SQL help Hi I have an table were our client save your dob(mm/dd/) in My$QL DB. By now I need to aggrupate that table queries like this: Group 1: = 16 years Group 2: =17 E

RE: SQL HELP!

2004-05-21 Thread Pascal Peters
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]

SQL HELP!

2004-05-20 Thread brobborb
hey guys, i have a table named Stuff.this table has the fields stuff_id, stuff_title, first_person_id, second_person_id, and third_person_id. The those last 3 fields refer to a table called persons, and contains the person_id.The table PERSONS contain the fields person_id, first_name, and

RE: SQL HELP!

2004-05-20 Thread Matthew Walker
) _ From: brobborb [mailto:[EMAIL PROTECTED] Sent: Thursday, 20 May 2004 5:55 p.m. To: CF-Talk Subject: SQL HELP! hey guys, i have a table named Stuff.this table has the fields stuff_id, stuff_title, first_person_id, second_person_id, and third_person_id. The those last 3 fields refer

Re: SQL HELP!

2004-05-20 Thread brobborb
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 stuff.first_person_id

RE: SQL HELP!

2004-05-20 Thread Pascal Peters
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 a WHERE clause? [Todays Threads

<    1   2   3   4   5   >