I assume session.total is a numeric value; try getting rid of the quotes.
-Original Message-
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 3:01 PM
To: CF-Talk
Subject: Query Help!!
Does anyone see any problems with the following query:
cfquery
No; it would be a bit of a security issue if you could. (Your page could
select any file from a user's machine and intiate an upload.)
What I did in a previous project was simply display the file name and path
near the upload control, with instructions to drag/drop or copy/paste the
value in
The problem is you are still grouping on the specific dateJoined.
Try something like
SELECT Month(DateJoined) + ' ' + Year(DateJoined) as monthJoined,
Count(*) as MonthJoinedCount
FROM Admin
GROUP BY Month(DateJoined) + ' ' + Year(DateJoined)
ORDER BY Count(*) DESC
-Original Message-
Looks like you have some single quote issues.
-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 6:11 AM
To: CF-Talk
Subject: RE: I'm sure this worked earlier
Here you go:
I have now removed the excluded text so that it is just getting the
You could do a replace with quot;
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 4:22 PM
To: CF-Talk
Subject: Quotes within a quoted value
I'm trying to put a value into an input tag and am coming up with a minor
problem. The value
What's the problem?
-Original Message-
From: Mark Adams [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 4:54 PM
To: CF-Talk
Subject: SQL troubles
I'm pulling out my hair can anyone see whats up here?
SELECT Assets.Course_ID, Assets.Module_ID, Assets.Lesson_ID,
Mark,
You need to add SELECTED to the element in the drop-down which matches the
value in the record you are updating.
Here's some pseudo-code:
CFOUTPUT query=myQueryOfSelectValuesAndContents
option value=#myQueryOfSelectValuesAndContents.value#
cfif
for (I = 1 ; I LTE Info.RecordCount ; I = I + 1)
{
I = I + 1 ;
Student[I]= StructNew() ;
Student[I].ID = Info.Student_ID ;
Student[I].LN = Info.Last_Name ;
Student[I].FN = Info.First_Name ;
}
You are incrementing I
Look at DateAdd.
-Original Message-
From: Peter Benoit [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 1:19 PM
To: CF-Talk
Subject: a week before...
Hi,
I make a date using: cfset now = #CreateDate(url.year, url.month,
url.day)#
How can I find out what the day is 7 days
Take a look at ILayer.
-Original Message-
From: Rosa, Issac [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 12:31 PM
To: CF-Talk
Subject: Netscape equivalent of iframe
Does anyone know of an equivalent in Netscape to the IE tag iframe. NS6
supports the tag, but we are
If you're trying to sort by the 4th item in the columns list, omit the
single quotes around 4.
Given that you are using the * to select all the columns, I suggest
specifying the column name in your order by clause. The next programmer
(maybe you) who looks at the code will be glad you did;
Take a look at the convert function.
convert(char(8), signup_datetime, 1) as signup_date should give you what you
want.
-Original Message-
From: Eric Dawson [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 2:09 PM
To: CF-Talk
Subject: (Easy SQL)
I have a member table which
As the error message suggests, it's a SQL Server error. Look up "deadlock"
in SQL help.
-Original Message-
From: Edward Chanter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 8:26 AM
To: CF-Talk
Subject: Weird CF Error
Has anyone seen these before:
~
Error
Is your join correct? Should it, perhaps, be WHERE products.ItemID =
prodPics.itemID?
Is there a 1 to 1 relationship between products and pics?
-Original Message-
From: Alan Koenig [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 11:58 AM
To: CF-Talk
Subject: SQL Returns
I
Try something like this:
SELECT LEFT(lastName,1) as Initial, lastname, firstname from myTable order
by Initial, lastname
Then you can use the grouping attribute on the Initial field.
CFOUTPUT query="myquery" group="Initial"
#initial#
CFOUTPUT
#lastname#, #firstName#
/CFOUTPUT
/CFOUTPUT
This is analogous to the periodic "can I use javascript to set my cf
variables?" post - your CF object and your database are in different
"places". The CF Query Object isn't going to be recognized by your database
application.
The tables don't have to be the same to use an INSERT...SELECT
I think you want to handle it more like this:
CFSET includeItP = false
CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10"
CFIF session.value EQ 0
CFSET includeItP = true
/CFIF
/CFLOCK
CFIF includeItP
CFINCLUDE TEMPLATE="somecfml.cfm"
/CFIF
Well, you should be able to do this using REFind.
For example, REFind("[0-9]*", myString , 1, true)
Look at the Help for REFind for handling the returned position and length of
the found item(s). You'll have to figure out how to handle multiple numbers
in your string.
-Original
grin OK, or you could do this:
#REReplaceNoCase("The width of the box is 54 ","[^0-9]","","ALL")#
-Original Message-
From: Ethan Rosch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 1:26 PM
To: CF-Talk
Subject: pull numbers from a string...
Hi all..
is there a funcion that
Double check your data types; for example, are Price, Size and Date really
text fields? (Its value is surrounded by single quotes in the statement.)
FYI - Try to name your date fields something other than "date".
-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent:
Your ORDER BY field(s) should determine which records are returned; it your
example, you should be getting the 2 records with the highest end_date
value.
If you order by ID, you'll get 2 records with the lowest (sorted ascending)
or highest (sorted descending) ID.
Is end_date in fact a date
You're using string operations on numeric values; I assume MS-SQL is able to
resolve the discrepancy, but ODBC can't.
This statement works through CF: SELECT LEFT(123456,3) + '1' + right(123456
, len(123456) -4) as test.
You could put the whole thing in a "CAST" statement, or you could use math
You'll need to have a computed column in your query which contains only the
day value.
In MS-SQL, you could use CONVERT(varchar(8),date,2) AS theDay
Then you can use "theDay" as your group column.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April
look at Evaluate.
#evaluate("#collist#")#
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 3:04 PM
To: CF-Talk
Subject: Getting the value of a variable, once removed
I have this:
CFLOOP QUERY="GetFromUAT"
CFLOOP
Well, do create what you have in CF you would use Evaluate, e.g.,
myFormValue = evaluate("FORM.Field_name#counter#").
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 3:02 PM
To: CF-Talk
Subject: Form Question
Maybe Im being dense today but
Do you have an update trigger on the table?
-Original Message-
From: Lee Fuller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 2:33 PM
To: CF-Talk
Subject: Strange SQL Error...
Has anyone seen this?
There are no "subqueries" going on in this SQL statement.. But yet we
get
For a checkbox handling a yes/no column (or a bit column), you want the
value attribute of the checkbox to always be "yes" (or 1 or on or true or
whatever works for your db).
If the current value in the db is yes, you include include the Checked
attribute in your checkbox tag, e.g.
input
Try the Library of Congress (http://catalog.loc.gov/help/command.htm); you
can do the search on ISBN. You'll still need to parse out the data, but the
results layout should be more friendly than Amazon.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday,
Don't use the quotes around your datepart in MS-SQL. I just verified that
in the SQL Help; if you haven't installed it, you should.
-Original Message-
From: Diana Nichols [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 4:15 PM
To: CF-Talk
Subject: query dates
Can someone
Look at the CF isDate and isNumeric functions for server side validation;
For client side, here's some javascript for date format validation:
var dateObj = new Date(formInput);
if (isNaN(dateObj.valueOf()))
return false;
For numeric, use isNaN.
-Original Message-
From: Steven
You need to take a look at GetBaseTagData and GetBaseTagList.
GetBaseTagData(tagname [, instancenumber ] )
Returns an object that contains data (variables, scopes, etc.) from a
specified ancestor tag. By default the closest ancestor is returned. If
there is no ancestor by the specified name, or
Look at listFind and listDeleteAt
-Original Message-
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 31, 2001 10:36 AM
To: CF-Talk
Subject: Variables for shopping cart?
Hi,
I'm using a basic client variable, client.adshop, to set a list of Advert
Numbers (eg
What kind of behavior or error messages are you seeing?
-Original Message-
From: Mike Kear [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 9:12 AM
To: CF-Talk
Subject: CFMAIL drives me NUTS!
I have endless trouble with CFMail in a hosted environment - because I can't
get
You can put them in subdirectories, but I believe if you move an existing
custom tag from it's current path, CF won't find it until you restart.
Try creating a new custom tag in a subdirectory and calling it.
-Original Message-
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent:
You'll have to use a separate insert statement for each table, but they can
be done within the same CFQUERY block.
-Original Message-
From: Jones, Becky [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 11:56 AM
To: CF-Talk
Subject: insert
is it possible to insert data into a
You want REReplaceNoCase.
-Original Message-
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 1:50 PM
To: CF-Talk
Subject: Back-referencing after a REFind to set a variable?
Hi,
Is there a way to do this sort of thing?
cfscript
It creates a count, by contestantID, of the number of records that have an
eventID in them, irrespective of the eventID value (or the distinctiveness
of it).
I would think the COUNT (DISTINCT EventID) would work; it did on my test.
Take a step back and just look at the results of
SELECT
If you're asking about whether you need to put single quotes around the
value, the answer is no. It's numeric, but is not limited to integers; they
can hold up to 4 decimal places.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 11:00
My first suggestion is that you debug your script by putting in alert
statements at various points.
For example,
if(byVal == true)
{
cnt_chk++;
alert(cnt_chk);
The form field values are text, so it's concatenating them. Try the
javascript parseInt() function.
-Original Message-
From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 10:13 AM
To: CF-Talk
Subject: OT: javascript add problem
Sorry about the OT question,
++ is the increment operator.
-Original Message-
From: Craig Dudley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 10:27 AM
To: CF-Talk
Subject: RE: javascript add problem
+ is for concatenating strings (spelling?)
++ will add them up i think.
-Original Message-
It's your FROM statement; you're not joining counties, districts, schools
and histories in any way, so you're getting a cartesian product set.
You need some join qualifiers along the likes of
vv1_Counties INNER JOIN vv1_districts on vv1_districts.countyID =
vv1_Counties.countyID (or whatever
Here are my standard steps for dealing with tough query problems:
1) View the CF-generated SQL statement by turning on debugging (or by just
cfoutput -ing the code instead of cfquery -ing it.
2) Look at the generated statement for obvious errors.
3) Try to run the generated SQL directly in
What results are you getting?
Take a look at the DISTINCT COUNT function, instead of the COUNT function.
This should take care of the same eventID in different rodeos.
-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 2:09 PM
To: CF-Talk
You could do a subquery on the answers table:
SELECT
HNTQuestion.QuestionID,
HNTQuestion.Category,
HNTQuestion.QuestionShort,
HNTCategories.HNTCategoryID,
HNTCategories.HNTCategoryName
FROM HNTQuestion, HNTCategories
What results are you getting?
-Original Message-
From: Jeff Gombala [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:43 PM
To: CF-Talk
Subject: T-SQL and single quote lists
Is it possible to pass a single quoted list into a SQL server stored
procedure for use in an "IN"
I'm not clear what you're trying to accomplish, but you can use what are
called subqueries in your WHERE clause, e.g.
SELECT ID,SEQUENCE,TEXT
FROMMyOtherSource
WHERE ID IN
(SELECT ID
FROMMySource
WHERE NAME LIKE '#FORM.junk1#%')
e the list into the "IN" statement I get the results I am
looking for it I use the parameter in the "IN" statement as such "IN
(@CustList)" the query returns nothing not even any errors. It is almost
like @CustList is not being evaluated inside the ().
----- Original Message ---
No you can't, Ethan. Here's the standard answer:
Javascript is client side, Cold Fusion is server side.
To get information from the client browser to the Cold Fusion server, you'll
need to pass the information as form or url parameters.
-Original Message-
From: Ethan Rosch
grin Well, I figured that one could wait a while; besides I've had some
problems with it on certain platforms.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 6:34 PM
To: CF-Talk
Subject: RE: javascript to set cfvariable?
No you
Well, another (easier?) way to handle it would be to think of your input
string as a space delimited list; you can then process each word easily.
CFSET skipAllCapsWordsP = true
CFSET myString = "fourscore and seven years ago at IBM"
CFSET mySkipList = "and,the,a,in,at"
CFSET myFormattedString =
In MS-SQL you could use:
WHERE DATEDIFF(d,cast(cast(tmonth as varchar) + '/' + cast(tday as varchar)
+ '/' + cast(tyear as varchar) as datetime),getDate()) = 7
-Original Message-
From: Peter Benoit [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 12:20 PM
To: CF-Talk
Subject:
Look at the DATEPART function.
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 1:31 PM
To: CF-Talk
Subject: SQL Business Dates
I have a query ...
SELECT AVG(DATEDIFF(minute, dateasgn, datecomp)) AS diff
FROM tblprob
WHERE
Use a HAVING clause before your ORDER BY clause, e.g. "having
count(contestantID) = 2"
-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 11:11 AM
To: CF-Talk
Subject: Statement Question/Help
Good day all,
I was wondering if anyone could help me
Here's some info on doing it in MS-SQL. From Help on "FROM":
table_source
Specifies a table or view, both with or without an alias, to use in the
Transact-SQL statement. A maximum of 256 tables can be used in the
statement. A table variable may be specified as a table source.
If the table or
I believe you'll have to check for the existence of the file name using
CFDIRECTORY first.
-Original Message-
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 9:08 AM
To: CF-Talk
Subject: RE: CFFILE ACTION="copy" and NAMECONFLICT
Can't you use the
This works.
CFSET theString = "meta name=""pubdate"" content=""Fri, 23 Mar 2001
07:00:00 GMT"""
CFSET st = reFindNoCase("(content="")(.*)(GMT"")",theString,1,"TRUE")
CFOUTPUT#mid(theString,st.pos[3],st.len[3])#/CFOUTPUT
The two pieces are:
1) Creating the regularExpression
2) understanding
Take the quotes off of tempdefendant; it's checking the string (which
doesn't have any spaces) rather than a variable.
-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 10:27 AM
To: CF-Talk
Subject: Finding a space in a string..
Hi dee ho
href="cfoutput-default2.cfm..." looks odd; is cfoutput really part of your
file name?
-Original Message-
From: Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 11:43 AM
To: CF-Talk
Subject: Why wont this advance to the next record
Appreciate it someone could tell me why
Try #evaluate(DE(theLinkString))#
-Original Message-
From: Toby Tremayne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:38 PM
To: CF-Talk
Subject: embedding variable name
I'm sure someone must have tried this before me - I can't figure out a way
to do it.
I have a
A few thoughts:
1) Cache the query so you're not calling the db every time the page loads,
2) Turn on debugging and look at the SQL statement that's actually being
generated,
3) remove CFPARAM Name="ID" Default=1; I believe you're grabbing the same
one record from the db every time. There is
Why store the "cfinclude template=" in the db? Just store the actual
template name in the db.
-Original Message-
From: Robert Long [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 4:08 PM
To: CF-Talk
Subject: pulling CF code from a db an having that code parse in page
Here's
In SQL datepart function, you don't need quotes around the "datepart"
argument, and since it's a numeric value, you don't need quotes around
#month#.
-Original Message-
From: Francis, Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 3:12 PM
To: CF-Talk
Subject: Newbie
Try setting a variable to judgement.defendant before entering the second
loop, then use that variable in the innner loop.
-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs
Hi
There is no one-line SQL statement that will do that.
You would use some looping structure if you were passing in a list of IDs,
but if this is all occurring in the same batch, you can select your values
into a temp table, then use an INSERTSELECT statement to insert based on
your tempTable
OK, here's something I missed the first time.
You use "counter" as your index in the cfloop, but this isn't an index loop;
since it's a list loop, counter evaluates to an item in the list.
Look at line 6 - you're using listGetAt with counter as the position
attribute; counter may be evaluating
grin Well, this first idea may not be easier than what you've done so far;
you'll need to be able to use javascript to manipulate the options within a
select control, and you can't do that on Netscape 4.* (I'm not sure about
6.)
If you can develop this just IE only, I would suggest
Look at the list functions (your values can be thought of as lists,
delimited by "/") as well as the GetToken function.
-Original Message-
From: Michael Gribbin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 1:13 AM
To: CF-Talk
Subject: Read part of a string
Hi, I need to
There is an issue with @@identity in MS-SQL. From MS-SQL help:
@@IDENTITY returns the last identity value generated in "any table" in the
current session. (Quotations mine).
If you have any INSERT triggers on your table that perform INSERTS on other
tables, @@identity will return the identity
I would break it into smaller tables.
One issue is size - you don't want to store a lot of empty fields. Create
each table, and use a primary key ID field to link them.
Just remember that when you want a record set with all the data, you will
need to use LEFT JOIN in order for the result set
selectCandidate is your query name; a query can't be converted to a string.
You may want one of your query column names instead.
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 2:01 PM
To: CF-Talk
Subject: Re: Code review, PLEASE
This is what I
Check the evaluate function. #evaluate(myQueryName.article)#
You'll need to replace the single # with double ## before evaluating it.
-Original Message-
From: Christian N. Abad [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 1:57 PM
To: CF-Talk
Subject: Parsing a text field
1) If PromoID is numeric, omit the single quotes.
2) Your select statement returns the value, so you can just add 1 to it; you
don't need to attempt to refer to it again with #Info.ClickThroughs#
UPDATE NetReferrers
SET ClickThroughs = (SELECT Info.ClickThroughs
cf_sheepishGrin
And as Dave Watts noted, you don't even need the subquery.
/cf_sheepishGrin
-Original Message-
From: Hayes, David [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 2:31 PM
To: CF-Talk
Subject: RE: cf query?
1) If PromoID is numeric, omit the single quotes.
2
E_ID='#RESOURCE_ID#'
If this is an integer field, it shouldn't have the single quotes around the
value.
Prepare to hear feedback on using "select *".
-Original Message-
From: Michael S. Kimmett [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 2:34 PM
To: CF-Talk
Subject:
Hi, Megan
You will get the prereq list for each distinct schedule date for the class;
I'm assuming your query is returning 3 dates for the class.
Dave
-Original Message-
From: megan sherman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 9:02 AM
To: CF-Talk
Subject: faulty
You can use the "typeof" operator.
if (typeof myVarName == "undefined"){
}
-Original Message-
From: Jeanne Sarfaty Glazer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 9:27 AM
To: CF-Talk
Subject: Javascript IsDefined
Hi Folks,
What is the Javascript equivalent to the
I don't know that you can.
I would store that info in the database; it could be a flag which simply
indicates the existence of the file or not.
You could write a CF page to update the db as often as necessary (once,
hourly, daily, etc.); that page would check to see if the file exists, then
knowledge is somewhat
lacking.
Thanks
Date: Fri, 09 Mar 2001 09:17:30 -0600
From: "Hayes, David" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: cfhttpparam results in a popup window
Message-ID:
[EMAIL PROTECTED]
How is the user activating the search of the
I haven't looked at your code in detail, but as a first step, I would turn
on debugging, see exactly what query is being generated by your code and
what form values are being returned, and then try running that query
directly in your db tool.
Actually one issue on my quick scan is:
cfoutput
How is the user activating the search of the other site? If it's a link (or
a form post), you can set the target to a new window.
In the page that loads in the new window, you could include some javascript
like
opener.location.href = "successpage.cfm".
-Original Message-
From: Mark
How many options are you putting in your select box?
-Original Message-
From: George Dong [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 12:30 PM
To: CF-Talk
Subject: How to fast big query result on browser
Hi there,
I have one problem, I made a select box, the option items
-
From: Hayes, David [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 5:42 PM
To: CF-Talk
Subject: RE: stored procedure and resultset
Yes. Look at CFSTOREDPROC and CFPROCRESULT; basically, you include one
CFPROCRESULT tag for each result set in the stored procedure. Then you've
got
Show your code.
-Original Message-
From: Matt Rodosky [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 1:31 PM
To: CF-Talk
Subject: Sorting an Array
Been trying to sort a 2 dimensional array and am having trouble. The fisrt
element is numeric, the 2nd is text. I'm trying to sort
I believe the first invocation of document.write clears the current
document, so that those objects are no longer in existence.
What you could try is concatenating all the strings you want to write in a
varible (e.g., myString), then calling document.write once.
function
I believe you can only insert into 1 table per insert statement; you'll have
to break it into multiple statements.
-Original Message-
From: C Frederic Valone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 12:47 PM
To: CF-Talk
Subject: query troubles
hello,
Can anyone show me
You can check query_name.CurrentRow as you are outputting the query. The
page number is CurrentRow/10.
-Original Message-
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 12:43 PM
To: CF-Talk
Subject: Determining no. of pages in results
Hi,
I have a query which
Yes. Look at CFSTOREDPROC and CFPROCRESULT; basically, you include one
CFPROCRESULT tag for each result set in the stored procedure. Then you've
got named CFQUERY objects you can work with.
-Original Message-
From: Zhou, Mei Y (Mei) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08,
I don't know of a custom tag, but if you use Query functions, you can fake
it.
Use QueryNew(myCFQUERY.columnlist) to create a new query object.
Then iterate through your CFQUERY and check for whichever values you want.
You can get clever by using valueList on your CFQUERY object to create
Here's some SQL-2000 code to get you started; it works, but will need some
tweaking to meet your specific requirements.
declare @mystart smalldatetime
declare @myend smalldatetime
declare @businessHoursPerDay tinyint
declare @myHolidayCount tinyint
select @mystart = '01-12-01', @myend =
How about
Select groupID, groupName
from grouptable
where groupID NOT IN
(select groupID from groupUserTable where userID = #userID#)
?
-Original Message-
From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 1:30 PM
To: CF-Talk
Subject: Outer Join Question...
1) Pull the cfset out of the cfquery block
2) You are searching on LIKE 'CBI', but testing on EQ 'CBI'; are you sure
about the values?
3) Select count(cbi) as cbicount
from wweb
where cbi = 'CBI'
-Original Message-
From: Robert Orlini [mailto:[EMAIL
You would have to copy the query to a scope that persists across pages.
Another option: you could cache the query so that the requery on the next
page will pull the cached version. This could certainly cause some
problems; it will not be appropriate in many situations.
-Original
Are StartDate and EndDate ODBC date objects?
If not, it may be that you're telling SQL server to expect ODBC dates, but
you're not them. (Whereas in your CFQUERY, SQL server is figuring out how
to handle that date data.)
What happens if you use value="#createODBCDate(createDate( month,day and
I haven't seen that before; are you able to duplicate the conditions?
Browsers, data input, etc?
Is the value really coming through with the "/" or is it "value1,value2"?
Things to try:
1) Put commas around your INPUT attibute values, e.g. value="value1"
2) Verify that you don't have another
You'll have to loop through the form values at both the category and
subcategory levels.
Without more info on the inserts you are trying to do, I can only guess:
(psuedo-code)
loop through categories
insert into categories table values (loop.category)
loop through subcategories
If you visit www.w3c.org, you can get more info than you ever wanted on the
HTTP protocol.
Here's a relevant excerpt:
14.32 Pragma
The Pragma general-header field is used to include implementation-
specific directives that might apply to any recipient along the
request/response
Here's a couple of things to try:
1) Run your queries in a db tool (SQL Query Analyzer) to compare performance
of different statements AND to see how many records are being returned.
This will make your life easier.
2) Make sure all the fields you are joining on are indexed.
3) Try the TOP X
Turn on debugging and output the query; you'll see what values are actually
being passed to the db by cold fusion.
You may have some luck if you make convert your form.date value to an
ODBCDate object (see createODBCDate function).
You could also try using the SQL CONVERT function to convert
Look at the list functions and the string functions (help for all should be
in studio or one of the books; get one!)
For lists, you can use any character as a delimiter, so you can do
listLen("your number",".").
If it's 1, you have a number of the form ; it it's 2, you have a number
of
1 - 100 of 199 matches
Mail list logo