Re: SQL Server Data Archival - my solution

2010-07-30 Thread Pete Ruckelshaus
Steve, to keep things simple(r), I would store that info at the source table level. Since it's a web site, there's a single generic user account at the database level, but I do track user and IP at the CF application level in the table that specific data is stored...it's just not shown in the tbl

RE: SQL Server Data Archival - my solution

2010-07-30 Thread DURETTE, STEVEN J (ATTASIAIT)
Pete, This is awesome! I'm going to consider using it for certain tables that we have problems with. I might suggest that you add in the user name and/or ip that made the change. That can help if you need to find out who made specific changes! Thanks, Steve -Original Message- From: Pe

RE: SQL Server Performance

2010-07-29 Thread UXB Internet
>> hardware improvement options and need to quantify >> (as much as possible) performance increases In my limited experience with MSSQL the best investment is improved Hard drive speed and/or throughput and increased memory. They are usually the bottlenecks. Dennis Powers UXB Internet - A Webs

Re: SQL - Selecting a row based off linking table row matches

2010-07-01 Thread Will Tomlinson
Could someone show me an example? I've tried all kinds of stuff with no luck. Thanks, Will ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseo

Re: SQL - Selecting a row based off linking table row matches

2010-06-30 Thread Will Tomlinson
>Use an inner join on the id's that you wish to link across the tables. > > I don't get what you mean Andrew. Sorry. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz

RE: SQL - Selecting a row based off linking table row matches

2010-06-29 Thread Andrew Scott
Use an inner join on the id's that you wish to link across the tables. -Original Message- From: Will Tomlinson [mailto:w...@wtomlinson.com] Sent: Wednesday, 30 June 2010 2:01 PM To: cf-talk Subject: SQL - Selecting a row based off linking table row matches MySql 5, I have this product

Re: SQL Gurus... can this query be written more efficiently?

2010-06-18 Thread Tami Burke
>Building the loop in or out of the CFQUERY tag makes no difference in >performance. My experience is that performance can be impacted slightly based on number of users, number of terms, and complexity of the query as a result of the parameters to be evaluated. We have found better overall perf

RE: SQL Gurus... can this query be written more efficiently?

2010-06-18 Thread Che Vilnonis
Thanks all. In the end, Carl's idea to use "NOT IN" and Micheal's reminder to use SQL indexes allowed me to drop a good 1 to 1.5 seconds. Cool beans! -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Friday, June 18, 2010 12:26 PM To: cf-talk Su

Re: SQL Gurus... can this query be written more efficiently?

2010-06-18 Thread Dave Watts
> Why not perform your cflooping outside the SQL. This is much faster than > forcing the query to manage the loop parsing and excution: Building the loop in or out of the CFQUERY tag makes no difference in performance. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.fi

Re: SQL Gurus... can this query be written more efficiently?

2010-06-18 Thread Tami Burke
Why not perform your cflooping outside the SQL. This is much faster than forcing the query to manage the loop parsing and excution: trim(i) "> (you'll need to cleanup the 'and' and 'or' to consider that the first time it loops through to build the search crit

Re: SQL Gurus... can this query be written more efficiently?

2010-06-18 Thread Tami Burke
>Take the following query. Is there a more efficient way to handle the where >clause? Specifically, the last two 'and' statements that loop through two >different lists, one that includes results and one that excludes results. >Thanks, Che > >select searchterm, searchtype, numresults, timestamp >f

Re: SQL Gurus... can this query be written more efficiently?

2010-06-18 Thread Tami Burke
Why not perform your cflooping outside the SQL. This is much faster than forcing the query to manage the loop parsing and excution: trim(i) "> (you'll need to cleanup the 'and' and 'or' to consider that the first time it loops through to build the search crit

Re: SQL Gurus... can this query be written more efficiently?

2010-06-17 Thread Michael Grant
With either solution I hope you have good indexes. On Thu, Jun 17, 2010 at 5:42 PM, Carl Von Stetten wrote: > > Che, > > How about this: > > select searchterm, searchtype, numresults, timestamp > fromusersearch > where searchtype = cfsqltype="cf_sql_smallint"> >and numresults <>

Re: SQL Gurus... can this query be written more efficiently?

2010-06-17 Thread Carl Von Stetten
Che, How about this: select searchterm, searchtype, numresults, timestamp fromusersearch where searchtype = and numresults <> searchterm like or ) and searchterm NOT IN () ) order by searchtermcount desc Also, I don't think you need the on the

RE: SQL deadlocks

2010-06-09 Thread Mark A. Kruger
Andrew, If by "well-architected" you mean an unlimited budget to purchase hardware and software then yes... you are correct :) But deadlocking is not just about good code and well designed schemas... it's also a scalability and cost issue. -mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 10

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-29 Thread James Holmes
That's quite an omission from the docs. I'll have to try this on Oracle. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 30 April 2010 02:20, Aaron Neff wrote: > > Just wanted to also mention CF9's result_name.generatedkey. > > Please see comment @ bottom of

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-29 Thread Aaron Neff
Just wanted to also mention CF9's result_name.generatedkey. Please see comment @ bottom of online help for cfquery: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fae.html Thanks!, -Aaron Neff >When using "set nocount on", "select @@identity as xyz" an

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-29 Thread Che Vilnonis
This might help everyone... Regardless of DBMS... http://www.forta.com/blog/index.cfm/2007/7/6/ColdFusion-8-Can-Return-Identit y-Values -Original Message- From: James Holmes [mailto:james.hol...@gmail.com] Sent: Wednesday, April 28, 2010 9:43 PM To: cf-talk Subject: Re: SQL Gurus

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-29 Thread Michael Dinowitz
The same basic issue came up on the SQL list. http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:898 While the question and result is based on a stored procedure, the same code can go in a single cfquery statement. The operation is a simple check for data existence and insert if it does

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread James Holmes
You can of course avoid the whole issue by using the result_name.IDENTITYCOL value returned from the cfquery tag (if you are on CF8 or higher). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 29 April 2010 01:51, Che Vilnonis wrote: > > When using "set nocou

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Leigh _
>YO! 2005 + > >USE OUTPUT Duh! Yes, if needed, OUTPUT is an option as well. (Though IIRC it does not work with the jTDS driver. At least not the last time I checked.) However, the primary point was there are safer alternatives to SELECT MAX(ID) ..

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Casey Dougall
On Wed, Apr 28, 2010 at 6:19 PM, wrote: > Yes, I would agree that is a much simpler and safer alternative. since > scope_identity() is already specific to your connection you don't have > to worry about locking and such altogether. > > ~Brad > > Original Mess

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread brad
> Wouldn't READ COMMITTED do the trick? ...will never read data that another > application has changed and not yet committed No. Another process could insert a record into the table and commit its change before you select out the max. The ONLY way for the max() record to be yours is to preven

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread brad
quot;SET TRANSACTION ISOLATION LEVEL SERIALIZABLE" immediately prior to the select. ~Brad -------- Original Message Subject: Re: SQL Gurus... obtaining the correct Incremental ID From: Dave Watts Date: Wed, April 28, 2010 4:54 pm To: cf-talk > That would ONLY work if you used SET TRANSA

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread brad
Yes, I would agree that is a much simpler and safer alternative. since scope_identity() is already specific to your connection you don't have to worry about locking and such altogether. ~Brad Original Message Subject: Re: SQL Gurus... obtaining the correct Incremental ID

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread nvc 1
from cfquickdocs for cf8: "If you do not specify a value for the isolation attribute, ColdFusion uses the default isolation level for the associated database." from mssqlcity.com: "READ COMMITTED This is the default isolation level in SQL Server. When it's used, SQL Server will use shared lock

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Casey Dougall
On Wed, Apr 28, 2010 at 5:34 PM, nvc 1 wrote: > > so is this reliable? > > > > >insert into mytable(acolumn) values(1) > > >select max(id) as

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Leigh _
>That would ONLY work if you used SET TRANSACTION ISOLATION LEVEL >SERIALIZABLE or WITH(TABLOCKX HOLDLOCK) > >Even with with rowlock, another spid can insert additional records into >the table and the select max() might return a bogus value. Aside from being unsafe without the right isolation lev

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread nvc 1
so is this reliable? insert into mytable(acolumn) values(1) select max(id) as maxid from mytable

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Dave Watts
> That would ONLY work if you used SET TRANSACTION ISOLATION LEVEL > SERIALIZABLE or WITH(TABLOCKX HOLDLOCK) This is one of those things I never am completely clear on, but I believe that the default isolation level for CFTRANSACTION is serializable in CF 7+. Dave Watts, CTO, Fig Leaf Software h

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread brad
ssage Subject: RE: SQL Gurus... obtaining the correct Incremental ID From: "Che Vilnonis" Date: Wed, April 28, 2010 3:59 pm To: cf-talk I am using the cftransaction tags. Honestly, I was not absolutely sure that I needed to do anything else and that is why I posted my or

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread brad
That would ONLY work if you used SET TRANSACTION ISOLATION LEVEL SERIALIZABLE or WITH(TABLOCKX HOLDLOCK) Even with with rowlock, another spid can insert additional records into the table and the select max() might return a bogus value. ~Brad Original Message Subject: Re: SQL

Re: sql method in cfcatch

2010-04-28 Thread Barney Boisvert
The error you're catching might not have those properties. For example, maybe it's a connection failure error. Or perhaps an expression error in a CFQUERYPARAM. Those keys will be present when appropriate, but they're not necessarily available all the time. As such, you have to do existence ch

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Che Vilnonis
I am using the cftransaction tags. Honestly, I was not absolutely sure that I needed to do anything else and that is why I posted my original question. -Original Message- From: nvc 1 [mailto:n...@hotmail.co.uk] Sent: Wednesday, April 28, 2010 4:14 PM To: cf-talk Subject: Re: SQL Gurus

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread nvc 1
why can't you do this where mytable has an auto incrementing primary key called id: insert into mytable(acolumn) values(1) select max(id) as maxid from mytable ~| Want to reach the ColdFusion community with

RE: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Che Vilnonis
Dave/Barney/Casey... I'm using SQL 2005. I just wanted to cover all bases and was looking for a code snippet. Thanks. -Original Message- From: Casey Dougall [mailto:ca...@uberwebsitesolutions.com] Sent: Wednesday, April 28, 2010 2:13 PM To: cf-talk Subject: Re: SQL Gurus... obta

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Dave Watts
> Transactions, transactions, transactions. Don't write another line of > SQL until you learn about transactions. I really just want to second this. There should be a law. With penalties including jail time for violation. (But perhaps time off would be granted for understanding indexes.) Dave Wa

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Casey Dougall
On Wed, Apr 28, 2010 at 1:51 PM, Che Vilnonis wrote: > > When using "set nocount on", "select @@identity as xyz" and "set nocount > off" in a cfquery, how can I be certain that two transactions that occur at > roughly the same time obtain the proper incremental id from an Identity > column? Is t

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Dave Watts
> When using "set nocount on", "select @@identity as xyz" and "set nocount > off" in a cfquery, how can I be certain that two transactions that occur at > roughly the same time obtain the proper incremental id from an Identity > column? Is their a SQl equivalent to CF's cflock tag? BEGIN TRANSACT

Re: SQL Gurus... obtaining the correct Incremental ID

2010-04-28 Thread Barney Boisvert
Transactions, transactions, transactions. Don't write another line of SQL until you learn about transactions. In this case it doesn't matter because @@identity is bound to the active connection (and connections are single threaded), but you should still be transactionally aware. In addition to

RE: SQL data integrity

2010-04-26 Thread Justin Scott
> My first recommendation would be to log all database > changes to a WORM drive: Thanks Dave and everyone else who responded to my question. It's given me some places to look for more information. -Justin Scott ~| Want to

Re: SQL data integrity

2010-04-23 Thread Won Lee
This is what I follow to ensure my data is clean. http://en.wikipedia.org/wiki/Title_21_CFR_Part_11 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive

Re: SQL data integrity

2010-04-23 Thread Dave Watts
> There must be some sort of technical standards that are used commonly in law > to prove the validity of data. One would think so. But in my own experience as an expert witness, this has come up several times as an issue in my cases, and surprisingly this hasn't been as clear-cut an issue as I'd

Re: SQL data integrity

2010-04-23 Thread Dave Watts
> Hi all, not a CF-specific question but I'm hoping someone can point me in > the right direction.  We're building an application where some information > stored in our database could potentially be subpoenaed to court as evidence. > One of the issues brought up by the attorneys is the integrity o

Re: SQL data integrity

2010-04-22 Thread Judah McAuley
First off, definitely talk to a lawyer with expertise in that area. That being said, here are some things that I know can help you out: 1. If the data should not be updated, don't let the user account that connects to the database have access to the UPDATE or DELETE verbs. Then you don't have to

Re: SQL data integrity

2010-04-22 Thread Brad Wood
Firstly I have absolutely no experience here and you should probably consult with an attorney with experience in this kind of thing. My best idea would be to institute a process to automatically ship all your nightly backups and or transaction logs to a third party to hold on to. If your data

RE: SQL data integrity

2010-04-22 Thread Justin Scott
> I'm no attorney or law professor but I would look > into being PCI compliant. I don't know if this is > exactly what you need, but it definitely couldn't > hurt and it is a very high level of security. Hi Paul, we're pretty familiar with the PCI requirements (we work with a lot of e-commerce c

Re: SQL data integrity

2010-04-22 Thread Alan Rother
Your MS SQL Transaction logs COULD be used... But again, this becomes more of a legal issue than a technical one... We all know given time, we could manipulate log files... There must be some sort of technical standards that are used commonly in law to prove the validity of data. You may need to

RE: SQL data integrity

2010-04-22 Thread Paul Alkema
I'm no attorney or law professor but I would look into being PCI compliant. I don't know if this is exactly what you need, but it definitely couldn't hurt and it is a very high level of security. Keep in mind though, that it's not easy. Good luck. Regards, Paul Alkema http://paulalkema.com ---

Re: SQL data integrity

2010-04-22 Thread Won Lee
Look up validation process. On Thu, Apr 22, 2010 at 3:30 PM, Justin Scott wrote: > > Hi all, not a CF-specific question but I'm hoping someone can point me in > the right direction. We're building an application where some information > stored in our database could potentially be subpoenaed to

Re: sql on Linux

2010-03-03 Thread Brad Wood
>From the looks of that error message, you don't need to worry about the connection, you need to worry about the username and password you are using. What database are you connecting to, and what login are you using? Can you connect to the same database using the same login from another SQL cl

Re: sql on Linux

2010-03-03 Thread Barney Boisvert
>From the error message, it appears that your login attempt is failing. Did you double check your username/password in the DSN settings? cheers, barneyb On Wed, Mar 3, 2010 at 8:30 AM, Orlini, Robert wrote: > > I'm running CF7 on Linux and it won't connect to the datasources. > > It generates

Re: SQL Windows Authentication

2010-02-11 Thread Dave Watts
> A majority of our data sources are connected via SQL authenticated accounts.  > This has been the norm established by previous > developers and IT folk at my company.  Lately, there has been discussion > about using Windows authenticated accounts instead, > due to the 'better' Windows security

Re: SQL Server question re table names - still stuck

2009-12-12 Thread Ricardo Russon
> > 3) When I do a CFQuery, it won't work unless I write the table name as > "canadianofficespacecom.city", instead of just "city". > Is the database specified in the DSN? Sounds as if one isn't specified. Ricardo. ~| Want

Re: SQL Server question re table names - still stuck

2009-12-11 Thread Ezra Parker
On Fri, Dec 11, 2009 at 2:53 PM, Larry Soo wrote: > So would I be correct in assuming that > the problem I'm having is that the default schema for "dbo" is "master" > instead of "canadianofficespacecom"? I believe so, yes. In order to resolve this from the user side of things you're going to nee

re: SQL Server question re table names - still stuck

2009-12-11 Thread Larry Soo
Recap of problem: I imported an old, backed up SQL Server file. Now, when I view the tables or try to access them in CF, it requires me to prefix all table names with "canadianofficespacecom.". Ezra Parker wrote: > I didn't see a mention of which version of SQL Server you're running, > but it

RE: SQL Server question re table names - still stuck

2009-12-11 Thread brad
.microsoft.com/en-us/library/aa275462%28SQL.80%29.aspx ~Brad Original Message -------- Subject: re: SQL Server question re table names - still stuck From: "Larry Soo" Date: Fri, December 11, 2009 3:07 am To: cf-talk > How many tables are there? If there are under 75, you migh

Re: SQL Server question re table names - still stuck

2009-12-11 Thread Leigh
> but it sounds to me like canadianofficespacecom is either > an object > owner or a schema: +1 That would make more sense than being part of the actual table name. ~| Want to reach the ColdFusion community with someth

Re: SQL Server question re table names - still stuck

2009-12-11 Thread Ezra Parker
I didn't see a mention of which version of SQL Server you're running, but it sounds to me like canadianofficespacecom is either an object owner or a schema: http://www.sqlteam.com/article/understanding-the-difference-between-owners-and-schemas-in-sql-server I'm assuming that it's most likely SQL

re: SQL Server question re table names - still stuck

2009-12-11 Thread Larry Soo
I wrote: > > A client asked me to see if I could get a copy of his old web site up and > > running. I did a restore of the backed up database onto my PC. The > > problem is that all the table names have the name of the database prepended > > to them. > > > > When I view the tables in SQL Ser

RE: SQL Server question re table names

2009-12-08 Thread Leigh
I have only seen that with exports from MS Access. Yes, +1 about using the information INFORMATION_SCHEMA views. Tapping into the system views is my favorite way to generate mass statements on-the-fly ;-) DECLARE @DBPrefix VARCHAR(50) SET @DBPrefix = 'oldabc.' SELECT 'exec sp_rename @objname

RE: SQL Server question re table names

2009-12-08 Thread brad
I can't say I've ever seen that one before, but you could just do a loop over the contents of INFORMATION_SCHEMA.TABLES and build/exec an ALTER statement for each one. http://technet.microsoft.com/en-us/library/ms190273.aspx How many tables are there? If there are under 75, you might be just as

Re: SQL / mySQL Datasource

2009-11-01 Thread James Holmes
You're going to do well here... mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/11/1 Anene Isioma Wealth : > > u annoy me. If u don't know how to spell out advisory sentences, the coil up > in your shell. >  Sincerely, > Chuka I.W. Anene > Chief Software Eng

Re: SQL / mySQL Datasource

2009-10-31 Thread Dave Watts
> nice sarcasm. do u think i havent gone through documentation? I, like Matt, would guess that you have not, because if you had, you would have more specific questions. Have you, in fact, read the CF 7 MySQL datasource information here? http://livedocs.adobe.com/coldfusion/7/htmldocs/1744.ht

Re: SQL / mySQL Datasource

2009-10-31 Thread Dominic Watson
> From: Jide Aliu > To: cf-talk > Sent: Sat, October 31, 2009 5:48:46 PM > Subject: Re: SQL / mySQL Datasource > > > Hi Chuka, > > Not sure what was wrong with my last posting, here I go again.. > > It's quite straightforward to set

Re: SQL / mySQL Datasource

2009-10-31 Thread Matt Quackenbush
Apparently my advisory sentence was not clear enough, so I shall cut it down to the simplest of words for you... Read the documentation. ~| Want to reach the ColdFusion community with something they want? Let them know on the

Re: SQL / mySQL Datasource

2009-10-31 Thread Anene Isioma Wealth
: Sat, October 31, 2009 6:09:00 PM Subject: Re: SQL / mySQL Datasource Since you asked, yes, I am convinced that you have not gone through the documentation. On Sat, Oct 31, 2009 at 1:05 PM, Anene Isioma Wealth wrote: > > nice sarcasm. do u think i havent gone through do

Re: SQL / mySQL Datasource

2009-10-31 Thread Anene Isioma Wealth
i use cf 7 and pls dont ask me to upgrade Sincerely, Chuka I.W. Anene Chief Software Eng./CEO Quorium Solutions www.quorium.org 07029609185,07032696113 From: Jide Aliu To: cf-talk Sent: Sat, October 31, 2009 5:48:46 PM Subject: Re: SQL / mySQL Datasource

Re: SQL / mySQL Datasource

2009-10-31 Thread Matt Quackenbush
Since you asked, yes, I am convinced that you have not gone through the documentation. On Sat, Oct 31, 2009 at 1:05 PM, Anene Isioma Wealth wrote: > > nice sarcasm. do u think i havent gone through documentation? > ~| Want to

Re: SQL / mySQL Datasource

2009-10-31 Thread Anene Isioma Wealth
: Re: SQL / mySQL Datasource I'm rather curious here. Have you ever heard of documentation? The questions you are asking are things that a first-day ColdFusion developer has no trouble with because they are the first basic things that one learns, and it literally takes about 3 minutes to

Re: SQL / mySQL Datasource

2009-10-31 Thread Jide Aliu
Hi Chuka, Not sure what was wrong with my last posting, here I go again.. It's quite straightforward to set up, see the link below, it is a step by step instruction on how to set up any datasource in CF 8. http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=datasources_ADV_MJS_11

Re: SQL / mySQL Datasource

2009-10-31 Thread Jide Aliu
> Well i need step by step procedure of creating datasource of any of > these two databases on my localhost. > > Its cracy how i still dont know how... Hi Chuka, It's quite straightforward to set up, see the link below, it is a step by step instruction on how to set up any datasource in CF 8

Re: SQL / mySQL Datasource

2009-10-31 Thread Matt Quackenbush
I'm rather curious here. Have you ever heard of documentation? The questions you are asking are things that a first-day ColdFusion developer has no trouble with because they are the first basic things that one learns, and it literally takes about 3 minutes to read and implement. Sent fro

Re: SQL Update questions

2009-10-30 Thread Jason Fisher
Need more information ... what type of data is in the checkbox values? how is the table set up? how does the checkbox data relate to the other data in the form and in the table(s)? ~| Want to reach the ColdFusion community with

Re: SQL Join help needed

2009-10-28 Thread daniel kessler
Sorry about the multiple posts. I waited hours for the others to go through and they didn't, then all at once. That worked GREAT! Thank you very much. However, I don't really see any differences from my attempts and yours except that you did the joins on the FROM and I did it on the WHERE.

RE: SQL Join help needed

2009-10-28 Thread DURETTE, STEVEN J (ATTASIAIT)
, 2009 10:19 AM To: cf-talk Subject: Re: SQL Join help needed And here's the page with the data: http://sph.umd.edu/test/passport_stats.cfm?passport_listing_id=321 I seem to be having trouble posting today, so sorry if this shows up a bunch of

Re: SQL Join help needed

2009-10-28 Thread daniel kessler
And here's the page with the data: http://sph.umd.edu/test/passport_stats.cfm?passport_listing_id=321 I seem to be having trouble posting today, so sorry if this shows up a bunch of times. ~| Want to reach the ColdFusion comm

RE: SQL Join help needed

2009-10-28 Thread DURETTE, STEVEN J (ATTASIAIT)
Daniel, You didn't post a link to the data. Steve -Original Message- From: daniel kessler [mailto:dani...@umd.edu] Sent: Wednesday, October 28, 2009 8:47 AM To: cf-talk Subject: Re: SQL Join help needed >OPPS... > >Change the on a.student_id = d.st

Re: SQL Join help needed

2009-10-28 Thread daniel kessler
>OPPS... > >Change the on a.student_id = d.student_id to on a.passport_listing_id = >d.passport_listing_id http://sph.umd.edu/test/passport_stats.cfm?passport_listing_id=321 That didn't work. It returned too many entries. I put up a page that has: 1 - attendance dataset in my original query (

Re: SQL Join help needed

2009-10-28 Thread daniel kessler
>OPPS... > >Change the on a.student_id = d.student_id to on a.passport_listing_id = >d.passport_listing_id http://sph.umd.edu/test/passport_stats.cfm?passport_listing_id=321 That didn't work. It returned too many entries. I put up a page that has: 1 - attendance dataset in my original query (

Re: SQL Join help needed

2009-10-28 Thread daniel kessler
>OPPS... > >Change the on a.student_id = d.student_id to on a.passport_listing_id = >d.passport_listing_id That didn't work. It returned too many entries. I put up a page that has: 1 - attendance dataset in my original query (on passport_listing_id) 2 - my original join that was working excep

RE: SQL Join help needed

2009-10-27 Thread DURETTE, STEVEN J (ATTASIAIT)
OPPS... Change the on a.student_id = d.student_id to on a.passport_listing_id = d.passport_listing_id Steve -Original Message- From: DURETTE, STEVEN J (ATTASIAIT) Sent: Tuesday, October 27, 2009 3:11 PM To: cf-talk Subject: RE: SQL Join help needed Sorry about that... Try this

RE: SQL Join help needed

2009-10-27 Thread DURETTE, STEVEN J (ATTASIAIT)
ng_id# -Original Message- From: daniel kessler [mailto:dani...@umd.edu] Sent: Tuesday, October 27, 2009 2:51 PM To: cf-talk Subject: Re: SQL Join help needed >This code isn't using inner/outer join notation, but the old style. Is >there a reason for this? It's the way th

Re: SQL Join help needed

2009-10-27 Thread daniel kessler
>This code isn't using inner/outer join notation, but the old style. Is >there a reason for this? It's the way that I learned to do it. I've read your notation; it's certainly more explicit. Further though, the assistance that I needed was adding the field 'passport_attendance_id' from the

RE: SQL Join help needed

2009-10-27 Thread DURETTE, STEVEN J (ATTASIAIT)
..@umd.edu] Sent: Tuesday, October 27, 2009 1:54 PM To: cf-talk Subject: Re: SQL Join help needed I meant to say - this is Oracle. thanks! ~| Want to reach the ColdFusion community with something they want? Let them know on th

Re: SQL Join help needed

2009-10-27 Thread daniel kessler
I meant to say - this is Oracle. thanks! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/

RE: SQL Join help needed

2009-10-27 Thread DURETTE, STEVEN J (ATTASIAIT)
This code isn't using inner/outer join notation, but the old style. Is there a reason for this? I would change the code to this: SELECT a.passport_listing_id ,a.passport_registration_id ,a.email_sent_attendance ,a.s_uid

RE: sql deadlock

2009-08-27 Thread brad
Step 1: read the wiki page John sent. Step 2: Deadlocks take two resources to tango. You need to see what the two resources in question are. Run a trace and filter for deadlocks and lock escalations. That will give you some more information about ground zero at the time of the error. Are the

Re: sql deadlock

2009-08-27 Thread John M Bliss
http://en.wikipedia.org/wiki/Deadlock On Thu, Aug 27, 2009 at 8:46 AM, Chad Gray wrote: > > I occasionally see this error in an application I wrote. > > Transaction (Process ID 54) was deadlocked on lock | communication buffer > resources with another process and has been chosen as the deadlock

Re: SQL Help

2009-08-26 Thread Brian Kotek
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. > >

Re: SQL Help

2009-08-25 Thread Mark Henderson
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

Re: SQL Help

2009-08-25 Thread Brian Kotek
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

Re: SQL Help

2009-08-25 Thread Mark Henderson
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

Re: SQL Help

2009-08-25 Thread Billy Cox
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;

RE: SQL Help

2009-08-25 Thread Dawson, Michael
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

Re: SQL Help

2009-08-25 Thread Kevin Roche
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

Re: SQL Help

2009-08-25 Thread Mark Henderson
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

Re: SQL Help

2009-08-25 Thread Kevin Roche
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 ~

RE: SQL Server Logins (should I be seeing so many in the log?)

2009-08-13 Thread brad
"I have maintain connections selected." Did you check that setting on all data sources for both CF Servers. Are you storing client vars in via a datasource? Run a trace on the SQL server to see what sort of operations are being performed-- especially by new connections. ~Brad ~~

Re: SQL get the next successful transaction after a failed transaction

2009-07-25 Thread Casey Dougall
On Fri, Jul 24, 2009 at 7:17 PM, Judah McAuley wrote: > SELECT TOP 1 id, approved, date > FROM mytable > WHERE date > ( > SELECT MAX(date) FROM mytable WHERE approved = 0 > ) > ORDER BY date DESC > Yeah... Thanks this is what I was looking for... Thanks Judah. I knew it was in there somewhere

<    1   2   3   4   5   6   7   8   9   10   >