Re: Query Modification

2009-06-01 Thread Craigsell

That's a good way to re-use the variable.  Since there doesn't appear to be 
a simple function, that's the way I'll go.

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/messageid:323046
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Query Modification

2009-06-01 Thread Jason Fisher

On #2, I assume then that you know which column you would be removing, so 
how about:

get the list of current columns, whatever they are:

remove a known column, in this example "phone":


now, requery QofQ based on the reduced column list:

SELECT #colList#
FROM employees


That allows the actual list of columns to be entirely dynamic, while still 
removing whichever known columns you want to remove, AND still re-uses the 
same variable, so there's no additional server overhead, or at least not 
anything noticeable.
 


~|
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/messageid:323045
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Query Modification

2009-06-01 Thread Craigsell

Well,

For two reasons

1)  I really didn't want to incur the overhead of creating a new variable 
and running the query.  I know it has to be much slower than simply dleting 
for the object.  Not the best reason but...

2) Maintenenace issues.  The columns I wish to delete are fairly static but 
the other columns may change depending on what the flex app needs.  To use a 
QoQ I would need to use the columnlist to build the query parsing out the 
unneeded columns.

Granted, neither reason is really a show stopper.  I figured if there was a 
way to add a column, there should be a way to remove one so I thought I'd 
ask.  Sometimes you just never know what you'll find out.



~|
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/messageid:323042
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Query Modification

2009-06-01 Thread Jake Churchill

I 2nd this.  I looked through the java stuff and I don't see a way to remove
a column.  Just add and manipulate them.

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
http://www.cfwebtools.com
402-408-3733 x103

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Monday, June 01, 2009 2:13 PM
To: cf-talk
Subject: re: Query Modification


Query of Queries would work really well, and would be very efficient ... 
why not do that?

Query 'employees' has: firstName, lastName, title, email, phone, ext


SELECT firstName,
lastName,
email
FROM employees


That would get you there with very little overhead ...
 




~|
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/messageid:323040
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


re: Query Modification

2009-06-01 Thread Jason Fisher

Query of Queries would work really well, and would be very efficient ... 
why not do that?

Query 'employees' has: firstName, lastName, title, email, phone, ext


SELECT firstName,
lastName,
email
FROM employees


That would get you there with very little overhead ...
 


~|
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/messageid:323038
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Query Modification

2009-06-01 Thread Craigsell

Hi!

I have an ORACLE stored proc returning a query back to my CFC using 
CFProcResult.  I pass this query up to Flex and some other places.  Works fine 
but  

What I'd like to do is remove a column or two before I pass it on.  Selected 
columns are only needed by the CFC so I'd like to remove them and clean up the 
query before I send it on.  I can't find any way to delete a column in the docs 
and I really don't want to loop over the query or do a query of queries.  Is 
the some other way to delete a column?  Maybe via Java?

Thanks!

Warren Koch

~|
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/messageid:323034
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


MAX Query modification

2004-12-13 Thread Asim Manzur
I have a following query

SELECT MAX(S_Number) as currentNo
FROM Table

Which is doing what I want.

But the S_Number has a logic behind.
Let say today is December 13.
The First S_Number should be "200412130001"
where 2004 is the year and 12 is the month and 13 is the date and then
0001 is the first number (it need to be increament to "200412130002"
for the next number).

The query I have above how do I modify in order to get the same
sequence (which jumps to the 14 on tomorrow rather than 13

Can some one advise please.

--
Regards,

~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187430
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54