Yea, but that's not necessarily a good thing - it's wasted processing to query 5,000 results and then only loop through and output 100 of them, no? There's no better way to do this at the query level?
Well, was going to have the output as the standard:
<CFOUTPUT QUERY="qMyQuery">
<p>#someField#</p>
</CFOUTPUT>
What do you mean --- using cfloop?
<CFLOOP QUERY="qMyQuery">
<p>#someField#</p>
</CFLOOP>
I suppose i could cfbreak the loop at 100, but how would I 'start' the loop 101...
Hi. Let's say I have a CFQUERY:
<CFQUERY NAME="qMyQuery">
SELECT * FROM myTable
</CFQUERY>
and the results of that query are in the thousands and I don't want to output them all at the same time for performance issues (page load, etc).
My thought was to do:
<CFQUERY NAME="qMyQuery"...
Hi folks,
As a basic and limited user of Oracle and databases, I'm wondering what you would suggest as the best workaround for the varchar2 4000 char limit.
Knowing that I will have textual data that needs to be saved that will be more than 4,000 characters, how would you suggest handling...
You're the man George. Thank you for this. I never really grasped Inner Joins and the like... need to do some more studying on those.
Much appreciated!
Hi folks. I do basic and some intermediate SQL querying a lot, but the solution to this query escapes me... i'm not sure how to accomplish this. Could someone lend a hand?
Let's say I have two tables, with the following columns:
grades_tbl: id, grade_lvl, grade_txt
programs_tbl: id...
left(title_level,1) didn't work (threw error message on "left", so I used substr(title_level,1,1) which I think accomplishes the same thing. However, when I use this code:
<code>
ORDER BY
CASE WHEN substr(title_level,1,1) BETWEEN 0 AND 9
THEN 1 ELSE 0 END,
CASE WHEN...
Hi folks,
I'm a little lost on this one. I tried reading the forums for an answer but couldn't find one that worked. If I have a field called title_level, and it can contains values such as A, B, C, 1, 2, 3... I want to sort results so that they'd be listed as:
A
C
1
3
11
14
.
.
.
I've got...
<cfset tist = "ThisIsAString">
#ReReplace(tist,"[A-Z]"," \1","ALL")#
That gives me:
his s tring
It removes cap letters and replaces them with spaces. I don't want to lose the cap letters, I just want to insert a space before each cap letter.
But how do you determine what case a character is? LCase and UCase are functions to convert a character to a case, but they don't tell you what case a character is before hand...
that's where I'm stuck.
Hi folks,
I have a bunch of strings that are missing spaces, and I want to insert spaces every time I encounter a capital letter. I'm having a bit of a pickle trying to figure this out. Could someone lend some advice?
Many thanks.
An example is: "AWarmDay"
I want to convert to "A Warm Day"...
That's probably not going to be an option, which i won't explain for sake of time other than to say the incoming data is out of my control... I just have to deal with it... Any other suggestions?
I'd at least have a head start if someone could advise how to get ASP to look for "grade_" + i as a...
Hi all,
Somewhat new to ASP. I have a script that needs to be prepared for any number of grade_# variables... for example:
grade_1
grade_2
...
grade_n
Simple psuedo-code is:
Dim i
i=1
While grade_i exists
' do something
i=i+1
Wend
I'm not sure how to
a) make asp treat grade_i as a...
Hi,
If i have a variable i, set to "1", which would be output as <CFOUTPUT>#i#</CFOUTPUT>
And I have a variable 1, set to "yes", which would be output as <CFOUTPUT>#1#</CFOUTPUT>
How could I use the value of i to check the valoue of 1.. meaning, <CFOUTPUT>##i##</CFOUTPUT> (which doesn't work...
Thanks very much. But then how do I access the result?
ie:
SELECT job1
FROM MyTable
UNION
SELECT job2
FROM MyTable
in php i'd normally do $result['job1'] to get the result, but here i'd have a union of distincts across two columns... what would go in the $result['XXXX']?
Jeff
Good afternoon,
If I have a table in which are two colums job1 and job2. Both have the same possible values (ie job1 can be either cook, tv host, or sales and job2 can be ither cook, tv host, or sales).
I want to create a querie that says select DISTINCT jobs from job1 and job2... meaning...
Hi,
If I have a table in which are two colums job1 and job2. Both have the same possible values (ie job1 can be either cook, tv host, or sales and job2 can be ither cook, tv host, or sales).
I want to create a querie that says select DISTINCT jobs from job1 and job2... meaning, give me a list...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.