Ask a Question related to Coldfusion Database Access, Design and Development.
-
capik79 #1
to check range of data
Hi Guys,
Need your help on this problem.
Let say table name call tbl_range
I have this set of record :-
No1 No2
1000 2000
3000 4000
5000 6000
My problem, i want to check if user insert another set no No1 : 1500 No2 :
2500. So, this means that range already clash with another range. If this
happened that insert cannot be done.
Regards,
Shaffiq
capik79 Guest
-
Writing Query for data range does not output
The cfoutput tag for this query does not display any data. SELECT Title, SVNo, RevNo, FileName, Type, ReleaseDate, Platform, PCNs,... -
how to use check box in data grid
hi all, please help me I want to use check box in data grid for boolean value, let said about an invoice record paid status. I've used... -
#24909 [Fbk->Opn]: rand function with range always returns low value of range
ID: 24909 User updated by: a0 at hush dot com Reported By: a0 at hush dot com -Status: Feedback +Status: ... -
#24909 [Opn->Fbk]: rand function with range always returns low value of range
ID: 24909 Updated by: iliaa@php.net Reported By: a0 at hush dot com -Status: Open +Status: Feedback... -
#24909 [NEW]: rand function with range always returns low value of range
From: a0 at hush dot com Operating system: solaris 8 PHP version: 4.3.2 PHP Bug Type: Math related Bug description: rand... -
Dan Bracuk #2
Re: to check range of data
If your db supports the between keyword, you can do this:
select count(No1) alreadythere
from yourtable
where #var1# between No1 and No2
or #var2# between No1 and No2
<cfif yourquery.alreadythere is 0>
insert your record
<cfelse>
do something else
If not use <= and <= in your query.
Dan Bracuk Guest
-
capik79 #3
Re: to check range of data
Thx Dan,
Anyway, I already solve the problem using between. Here my code
Select No1, No2
From table
Where (#varNo1# between NO1 and NO2)
Then in RecordCount eq 0, I proceed to insert the new record.
Really thx for your reply. Thx Dan
Regards,
Shaffiq
capik79 Guest



Reply With Quote

