Looks that way.
Rey
Rick King wrote:
Hey all,
I just received this email that is generated when there is an error on a site
I built (www.woreitonce.com)
---E-MAIL
Invalid data 1 and 1=convert(int,(select top 1 char(97)+admin_password
Sorry didn't see your question at the bottom. One thing that will
definitely help is using CFQUERYPARAM to enforce datatype checks on your
conditional statements.
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-b20.htm
Also, consider writing code that will strip out certain commands
---E-MAIL
Invalid data 1 and 1=convert(int,(select top 1
char(97)+admin_password from tbl_adminusers)) for CFSQLTYPE
CF_SQL_INTEGER. brThe error occurred on line 30.
-E-MAIL
Is this a SQL
-Original Message-
From: Rick King [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 11:56 AM
Subject: SQL injection hack?
/Details.cfm
ProdID=1%20and%201=convert(int,(select%20top%201%20char(97)
%2badmin_password%20from%20tbl_adminusers))
IsNumeric and cfqueryparam are
Just an FYI to everyone else i've been at my current post for 3 years
and we've had pro-active error monitoring (versus re reactive hey my
site doesn't work) now for close to 2 years.
Just in the recent weeks we started seeing basic SQL injection hacks
on site we host. We never saw anything like
Great info guys, thanks.
~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648
Just in the recent weeks we started seeing basic SQL injection hacks
on site we host.
Yes, I see more and more of these on my sites too.
Of course, they cause an error thanks to CFQUERYPARAM, but they are
filling my error log table
with useless information.
So I'm planning to detect them
on for my DB objects and turn it off
where I feel it's not necessary.
Paul
-Original Message-
From: jonese [mailto:[EMAIL PROTECTED]
Sent: 06 August 2007 16:25
To: CF-Talk
Subject: Re: SQL injection hack?
Just an FYI to everyone else i've been at my current post for 3 years
and we've
[mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 12:01 PM
To: CF-Talk
Subject: RE: SQL injection hack?
We've been seeing the exact same thing, basic SQL injection attacks all
originating from China... It looks automated as they've spidered several
sites we host using the exact same technique
In CF 8 it's worth noting that the type checking can be turned off for
performance gains. I guess this is a trade off...
IMO, it is not only a trade off, it's kind of stupid...
Where do you need performance? On the production server, but it is also
there that
you need security.
One could
Thanks John...this is a great checklist.
-Original Message-
From: John Mason [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 12:25 PM
To: CF-Talk
Subject: RE: SQL injection hack?
You'll also see these automated scripts hitting other services like ftp,
email, etc. You need
PM
To: CF-Talk
Subject: RE: SQL injection hack?
Thanks John...this is a great checklist.
-Original Message-
From: John Mason [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 12:25 PM
To: CF-Talk
Subject: RE: SQL injection hack?
You'll also see these automated scripts hitting other
Someone might have to test this out, but my cf8 admin only let's me
disable the CFC Type Check (so it says), so cfqueryparam
wouldn't/shouldn't be affected by this.
Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
Looks like using the Val() function did the trick.
No more errors being generated :)
Thanks
Rick
~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
There are a number of ways to do this. The typical way that I get this done is
(im going to use your example of rows 31-50 for a total of 20 rows)
SELECT TOP 20 *
FROM [tableName]
WHERE [primaryKeyField] not in (
SELECT top 30 [primaryKeyField]
FROM [tableName]
WHERE [criteriaField]
I have a SQL Server database and I want to make it accessible
to CF. I can connect successfully to the datasource in CFIDE
using the sa account, but I cannot do the same using a New
Login with SQL Server Authentication. The error I receive is
Login failed for user 'theuser' which is
I have a SQL Server database and I want to make it accessible
I'll bet you actually have the incorrect password. There's nothing special
you have to to create logins that you can use from CF. Try changing the
password.
Dave
You are correct sir! Thank you. I do have a follow up question,
You are correct sir! Thank you. I do have a follow up
question, however. I'm curious - the password I was trying to
use that was being rejected was a GUID created using
CreateUUID(). Should/can such identifiers not be used as
passwords in the CF Administrator? My thought was that you
To answer my own question:
http://support.microsoft.com/default.aspx/kb/914278
Microsoft SQL Server 2005 Express Edition can only use one CPU, even if
the computer has more than one CPU.
So it can be installed on a multi-CPU machine, it'll just limit how it
works. Perfect.
Damien McKenna
Web
You could do multiple joins and check for null in your case statement.
(this is assuming you have multiple addresses in a separate table with a
primary key somehow relating to your main user database. In my example
I am joining your pSeason file with the alias A to my theoretical
pAddresses file
-Talk
Subject: RE: SQL to Retrieve One Record from Several Possible Records
You could do multiple joins and check for null in your case statement.
(this is assuming you have multiple addresses in a separate table with a
primary key somehow relating to your main user database. In my example
I am
,CASE
WHEN A.addr_type IS NOT NULL THEN A.myAddressField
WHEN A.addr_type IS NULL AND B.addr_type IS NOT NULL THEN
B.myAddressField
WHEN A.addr_type IS NULL AND B.addr_type IS NULL THEN
C.myAddressField
ELSE 'No Address Found'
END AS SeasonAddress
Just to offer an alternate.
Instead of those time consuming case statements and joins, you could
just add a new table to assign a sort order value to each of the
Types, such as you said the table would look like this
1 - RMA
2 - LOC
3 - H
Where the numeric value would be the type's ordering ID
, but sometimes that's enough.
- Mark
From: Alan Rother [mailto:[EMAIL PROTECTED]
Sent: Thu 6/28/2007 5:47 PM
To: CF-Talk
Subject: Re: SQL to Retrieve One Record from Several Possible Records
Just to offer an alternate.
Instead of those time consuming case
Let me get this straight, you want a report to summarize the number of
installs by date and client. So client 1 ran 3 installs on 6/1 and 2
installs on 6/2.
I believe you simply need to group by hostname, and then date and then
use an aggregate function (count()) to add up the records in between
[EMAIL PROTECTED] wrote:
HostName, iDate, Package
client1, 2007-06-01, Update1
client1, 2007-06-01, Update2
client1, 2007-06-01, Update3
client1, 2007-06-02, Update5
client1, 2007-06-02, NewApp
client2, 2007-06-01, Update1
client2, 2007-06-01, Update2
client2, 2007-06-01, Update3
See if sp_who and sp_who2 give you what you need.
Adrian
-Original Message-
From: Keith McGee [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 12:16
To: CF-Talk
Subject: sql statment to get connections
Do anyone know of a simple sql query to see what users are currently
connected to a
It worked. Thank You
~|
Create Web Applications With ColdFusion MX7 Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS
Archive:
Daniel Kessler wrote:
I'm doing a loop to insert values into a db (Oracle). I keep getting
an error 'Invalid data for CFSQLTYPE CF_SQL_NUMERIC.' This is just
one example, but I don't see the problem.
One other thing though, in my cftry/error output, it says it's on
field
'Invalid data for CFSQLTYPE CF_SQL_NUMERIC'
That would suggest that the value you're passing in is not numeric, or the
column name is an Integer, in which case you might need to use
CF_SQL_INTEGER, I've not used ORACLE so can't be sure about that, first
thing I would do is dump the variable
'Invalid data for CFSQLTYPE CF_SQL_NUMERIC'
That would suggest that the value you're passing in is not numeric, or the
column name is an Integer, in which case you might need to use
CF_SQL_INTEGER, I've not used ORACLE so can't be sure about that, first
None of the columns in the table structure
You would need to write like follows:
select
case when PriceSec_National = 'Y' then 'Y'
end as PriceSec_WesternCape
Since you can not replace fields from the query, only retrieve a column named
like a table field
Greetings / Grüsse
Gert Franz
Customer Care
Railo Technologies GmbH
[EMAIL
ismail cassiem wrote:
Is there anyway else to set the result field value temporary.
eg Field1 Field2 TO Field1 Field2
YX YY
select
Field1,
CASE
WHEN Field1 = 'Y' THEN 'Y'
ELSE Field2
END AS Field2
FROM
Jochem
Thank You, it works!
I really appreciate it.
Regard, Ismail
~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7
Flex 2
Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU
I really should have been able to figure that out. Hopefully I'll remember
next time :) Many thanks Jochem.
- Original Message -
From: Jochem van Dieten [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Friday, May 18, 2007 12:36 PM
Subject: Re: SQL sum question
Gareth
Gareth Hughes wrote:
select pname,sum(pagehit) as pagehit
where dates between x and y
group by pname, pagehit
order by pagehit desc, pname
select pname,sum(pagehit) as pageHitCumul
where dates between x and y
group by pname
order by sum(pagehit) desc, pname
Jochem
Thanks James!
James Holmes wrote:
This is a good summary of SQL useful in this situation:
http://www.oreilly.com/catalog/sqlpr/chapter/ch01.pdf
On 5/18/07, Rey Bango [EMAIL PROTECTED] wrote:
Guys, its been awhile since I've done tree/hierarchical SQL manipulation
so I need some help. The
I used this guy's model before without much trouble.
http://www.intelligententerprise.com/001020/celko.jhtml;jsessionid=Y34B5ELGNJP1GQSNDLRCKH0CJUNN2JVN?_requestid=374630
Joe Celko is the man!
Greg
On 5/17/07, Rey Bango [EMAIL PROTECTED] wrote:
Guys, its been awhile since I've done
This is a good summary of SQL useful in this situation:
http://www.oreilly.com/catalog/sqlpr/chapter/ch01.pdf
On 5/18/07, Rey Bango [EMAIL PROTECTED] wrote:
Guys, its been awhile since I've done tree/hierarchical SQL manipulation
so I need some help. The data looks something like this:
Alright, I figured out where the formatting is incorrect. I shouldn't have had
the published_date= in there.
Now it's giving me, ORA-01861: literal does not match format which is much
closer.
And I still have the question on whether I should use concatenation to create
the string once I
Alright, ignore me - I seem to be making progress again.
sigh often happens when I finally give up and post. Maybe giving up cleanses
the mind somehow.
~|
Create robust enterprise, web RIAs.
Upgrade integrate Adobe Coldfusion
If it helps, creating a date out of that is as easy as using the
Oracle to_date() function. You could then use whatever comparison you
like.
On 4/30/07, Daniel Kessler wrote:
I have Oracle db entries where three numbers represent a date. This
is because the user can enter in just the year, or
Daniel Kessler said:
I have a problem concatenating in sql (using Oracle). I'm doing:
SELECT a_fname || ',' || a_lname
The error displayed is:
[Table (rows 8 columns A_FNAME||','||A_LNAME): [A_FNAME||','||
A_LNAME: [EMAIL PROTECTED] ] is not indexable by
A_FNAME||'
Try aliasing the
Try aliasing the output. If that doesn't work, please provide the full
statement.
I'm don't know the term 'aliasing the output', but I have made debug='yes' on
the query. The sql is:
SELECT a_fname || ',' || a_lnameFROM publications_authors
and can be found in the blue box on this
Try aliasing the output. If that doesn't work, please provide the full
statement.
Is aliasing putting the field in a variable? As in f_name as firstname?
~|
Deploy Web Applications Quickly across the enterprise with ColdFusion
Yes, this will be the issue: you need to do something like
SELECT a_fname || ',' || a_lname as fullname
On 4/26/07, Jochem van Dieten wrote:
Daniel Kessler said:
I have a problem concatenating in sql (using Oracle). I'm doing:
SELECT a_fname || ',' || a_lname
The error displayed is:
Try aliasing the output. If that doesn't work, please provide the full
statement.
Is aliasing putting the field in a variable? As in f_name as firstname?
That worked - but why?
~|
ColdFusion MX7 by Adobe®
Dyncamically
daniel kessler said:
Try aliasing the output. If that doesn't work, please provide the
full statement.
Is aliasing putting the field in a variable? As in f_name as
firstname?
That worked - but why?
The problem was not in Oracle, but in CF. Oracle returned a query with
a column named
The problem was not in Oracle, but in CF. Oracle returned a query with
a column named a_fname || ',' || a_lname and in CF that is not a
valid variable name.
Jochem
ah, that makes total sense. And it IS a very odd column name.
thank you for your help.
thanks to everyone who replied, problem solved.
Jenny
-Original Message-
From: Rafael Marquez [mailto:[EMAIL PROTECTED]
Sent: 04 April 2007 21:06
To: CF-Talk
Subject: RE: SQL Query Help
Well, it's not a brain fart. That query is kinda kinky.
Use this as an example, replacing your
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 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
Maybe something like this (which I cannot test):
SELECT
c.id,
c.name,
i.*
FROM
customer c
LEFT OUTER JOIN
(
-- Get max (most recent) id (assuming pkey) of
-- each invoice as grouped by client.
Assuming the invoice numbers increase each time, you can use MAX() and
GROUP BY to get what you need.
SELECT customer, MAX(invoiceNum) AS lastNum
FROM table
GROUP BY customer
If invoices are not numbered sequentially, hopefully you have a date
field that you can add to the grouping.
M!ke
Need more info: What would the query be to return the last invoice for a
single customer?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 04, 2007 8:58 AM
To: CF-Talk
Subject: SQL Query Help
having brain fart here ... ughh
scenario:
(T.Deleted = 0) AND (T.Status 'Pending') AND (T.AccountType =
'Customer')
GROUP BY T.CustomerID, T.TransactionDate, T.ID
Hope this helps.
-Original Message-
From: Gaulin, Mark [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 04, 2007 3:39 PM
To: CF-Talk
Subject: RE: SQL Query Help
How about you simply use WHERE dateCreated = '4/2/2007'
Basically, lose the padding zeros.
~Che
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 9:59 AM
To: CF-Talk
Subject: SQL question
I am using MS SQL and have a field with data type
I wrote a blog post concerning this a while back:
http://www.stillnetstudios.com/2007/01/20/comparing-dates-without-times-in-sql-server/
Hope that helps.
-Ryan
Chad Gray wrote:
I am using MS SQL and have a field with data type DateTime.
I want to find all records with the day 4/2/2007?
If I
I tried that also and no records are returned.
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:01 AM
To: CF-Talk
Subject: RE: SQL question
How about you simply use WHERE dateCreated = '4/2/2007'
Basically, lose the padding zeros.
~Che
How about using...
WHERE dateCreated LIKE '%4/2/2007%'
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:05 AM
To: CF-Talk
Subject: RE: SQL question
I tried that also and no records are returned.
-Original Message-
From: Che
Chad Gray wrote:
I want to find all records with the day 4/2/2007?
WHERE DATEDIFF(day, dateCreated,'4/3/2007')=0
~|
Create Web Applications With ColdFusion MX7 Flex 2.
Build powerful, scalable RIAs. Free Trial
I tried that too and no records are returned.
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:09 AM
To: CF-Talk
Subject: RE: SQL question
How about using...
WHERE dateCreated LIKE '%4/2/2007%'
-Original Message-
From: Chad Gray
and no records are returned.
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:01 AM
To: CF-Talk
Subject: RE: SQL question
How about you simply use WHERE dateCreated = '4/2/2007'
Basically, lose the padding zeros.
~Che
-Original
Ooh.. I like that one
-Original Message-
From: Paul Hastings [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 9:10 AM
To: CF-Talk
Subject: Re: SQL question
Chad Gray wrote:
I want to find all records with the day 4/2/2007?
WHERE DATEDIFF(day, dateCreated,'4/3/2007')=0
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:10 AM
To: CF-Talk
Subject: Re: SQL question
Chad Gray wrote:
I want to find all records with the day 4/2/2007?
WHERE DATEDIFF(day, dateCreated,'4/3/2007')=0
AH! This works!
Thanks!
-Original Message-
From: Paul Hastings [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:10 AM
To: CF-Talk
Subject: Re: SQL question
Chad Gray wrote:
I want to find all records with the day 4/2/2007?
WHERE DATEDIFF(day, dateCreated,'4/3/2007')=0
#
AND
MONTH(dateCol)=#monthVar#
AND
YEAR(dateCol)=#yearVal#
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 9:12 AM
To: CF-Talk
Subject: RE: SQL question
I tried that too and no records are returned.
-Original Message-
From: Che Vilnonis
The trick with date and MSSQL is using and . The string '04/02/2007'
is seen by MSSQL as '04/02/2007 00:00:00', so your condition will return
only those records with that exact timestamp. You have to use:
WHERE dateCreated = '04/02/2007'
AND dateCreateted '04/03/2007'
Steve Brownlee
People people people :)
I have seen casting, converting, date-diffing, LIKE'ing,
MONTH()/Day()/Year()'ing Please do not run functions on your
date/time fields. Running a function on a column in general is extremely
slow. Date/time stamps can be used quite nicely with out them:
DECLARE @date
Ben,
Ok... Nicely done. What about BETWEEN ... Any benefits there?
WHERE date_created BETWEEN @date AND @date + 1
-Mark
-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 9:26 AM
To: CF-Talk
Subject: RE: SQL question
People people people
).
..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
Need ColdFusion Help?
www.bennadel.com/ask-ben/
-Original Message-
From: Mark A Kruger [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:30 AM
To: CF-Talk
Subject: RE: SQL question
Ben,
Ok... Nicely done
Ah Gotcha.
-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 9:35 AM
To: CF-Talk
Subject: RE: SQL question
BETWEEN is good, but it is doubly-inclusive meaning that it is like doing
both = and =. In this case, it might turn up records where
On the (@date + 1) how do you know it is adding one day?
Out of curiosity how do you add one year?
Thanks for the clean elegant solution. I will try it out.
-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:26 AM
To: CF-Talk
Subject: RE
I just tried this and I get no records.
dateCreated = 04/02/2007 AND dateCreated (04/02/2007 + 1)
Is this method compatible with MS SQL?
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:41 AM
To: CF-Talk
Subject: RE: SQL question
year?
Thanks for the clean elegant solution. I will try it out.
-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:26 AM
To: CF-Talk
Subject: RE: SQL question
People people people :)
I have seen casting, converting, date-diffing
Subject: RE: SQL question
On the (@date + 1) how do you know it is adding one day?
Out of curiosity how do you add one year?
Thanks for the clean elegant solution. I will try it out.
~|
Deploy Web Applications Quickly across
?
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:41 AM
To: CF-Talk
Subject: RE: SQL question
On the (@date + 1) how do you know it is adding one day?
Out of curiosity how do you add one year?
Thanks for the clean elegant solution. I
/
-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:46 AM
To: CF-Talk
Subject: RE: SQL question
I just tried this and I get no records.
dateCreated = 04/02/2007 AND dateCreated (04/02/2007 + 1)
Is this method compatible with MS SQL
int.
So I probably have to cast as a date in order to get this to work.
-Original Message-
From: Joe Rinehart [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 03, 2007 10:48 AM
To: CF-Talk
Subject: Re: SQL question
Chad,
Try
WHERE
dateCreated = @someDate AND dateCreated
:00 AM
To: CF-Talk
Subject: RE: SQL question
Thanks Ben, and Joe here is what finally worked for me.
dateCreated = '04/03/2007' AND dateCreated DATEADD(DAY, 1,
'04/03/2007')
With
dateCreated = '04/03/2007' AND dateCreated ('04/03/2007' + 1)
I get this error:
Conversion failed when converting
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 only
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] wrote:
Why do 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 rateCount, rate
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
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 are
that and see if you're any closer to what you want.
-- Josh
- Original Message -
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
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
Wold moving the M.i_recid IS NULL to the JOIN help?
SELECT
F.pid,
F.acrostic,
F.recid,
F.recordthread,
F.aed_onset,
F.d_form
FROM
vfrm_sae F
LEFT OUTER JOIN
v_sae_jna_mr M
ON
F.recordthread = M.i_recordThread AND
On what engine? If this is MSSQL, try running the query tuning advisor.
There maybe some updates to indexes or statistics that will speed it up.
-Original Message-
From: Jerry Barnes [mailto:[EMAIL PROTECTED]
Sent: Monday, April 02, 2007 12:22 PM
To: CF-Talk
Subject: OT: SQL Question
On 4/2/07, Kevin Bales [EMAIL PROTECTED] wrote:
I am trying to use the DatePart() function as part of a normal SQL query
using Access DB. The SQL statement is formatted correctly to extract a month
from a date field in the DB, and the SQL tests fine in Access. However, it
does not work in
if it's not in pound signs, CF won't think that it owns the function.
can you paste the code you're using and specify how it does not work
in cfquery?
--
Charlie Griefer
My SQL looks like this
SELECT *
FROM items
WHERE DatePart(,itemDate)='1933'
- Kevin
On 4/2/07, Kevin Bales [EMAIL PROTECTED] wrote:
if it's not in pound signs, CF won't think that it owns the function.
can you paste the code you're using and specify how it does not work
in cfquery?
--
Charlie Griefer
My SQL looks like this
SELECT *
FROM items
WHERE
You should only conditionally use that clause if the arg has a length IMHO ;-)
I suspect it will either return ALL records or chokeneither I suspect is
what you want ;-)
.and run or not...it's sloppy SQL
Cheers
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric
T-SQL will return every record in this case. % is a placeholder for any
characters, so your query would essentially tell the database where x = any
pattern of characters and would return everything.
You could just run a query with that syntax in Query Analyzer or Management
Studio and see for
Steve Milburn wrote:
T-SQL will return every record in this case. % is a placeholder for any
characters, so your query would essentially tell the database where x = any
pattern of characters and would return everything.
if there are no NULLs in x.
Correct - I should have stated that in my original email. Thanks for the
clarification.
-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED]
Sent: Friday, March 30, 2007 3:48 PM
To: CF-Talk
Subject: Re: SQL Like
Steve Milburn wrote:
T-SQL will return every record in this case
I've always read that you use nvarchar for multilingual data. Keep in mind,
nvarchar takes up twice as much space in the db since it makes an alotment
for languages that have extended characters.
~C
-Original Message-
From: Doug Brown [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 29,
Ok, so if my data will only be supporting the English language I should just
use varhcar or char since n uses 2 bytes for one character. Correct?
Doug
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 29, 2007 1:58 PM
To: CF-Talk
Subject: RE
I believe so...
-Original Message-
From: Doug Brown [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 29, 2007 4:03 PM
To: CF-Talk
Subject: RE: SQL Question?
Ok, so if my data will only be supporting the English language I should just
use varhcar or char since n uses 2 bytes for one
, March 29, 2007 4:22 PM
To: CF-Talk
Subject: RE: SQL Question?
I believe so...
-Original Message-
From: Doug Brown [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 29, 2007 4:03 PM
To: CF-Talk
Subject: RE: SQL Question?
Ok, so if my data will only be supporting the English language I should
Doug Brown wrote:
I understand several things about SQL when it comes to getting information
out of it, but never really have understood which data types to use for what
specific data. I know what ones suppose to hold what kind of data as far as
integer data, character data, monetary data,
Doug Brown wrote:
Ok, so if my data will only be supporting the English language I should just
use varhcar or char since n uses 2 bytes for one character. Correct?
never say never. unless you're going to be dealing in TB of data, better safe
than sorry.
701 - 800 of 4661 matches
Mail list logo