Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

QUICK SQL RELATED QUESTION IN TOAD

Thread Tools
 
Search this Thread
 
Old 18 April 2008, 02:11 PM
  #1  
L33_WRX
Scooby Regular
Thread Starter
 
L33_WRX's Avatar
 
Join Date: Feb 2007
Posts: 979
Likes: 0
Received 0 Likes on 0 Posts
Question QUICK SQL RELATED QUESTION IN TOAD

Using Toad for Oracle Version 9.0.1.8 scripts I've ran in the previous version of toad don't seem to allow the '&TBC' function to work? Example of my script below

Related section:

AND MONTHS_BETWEEN(TO_DATE('&TBC','DD-MM-YYYY')

Whole SQL:

SELECT acc_account_no, acc_subacc_no, acc_act_code, acc_incep_date, intc_code, intc_term_control, term_intc_code, term_intr_subcode, term_interval
FROM accounts, interest_controls ic, term_bands tb1
WHERE acc_process_status = 2
AND acc_soc_seqno = 1
AND acc_intc_code = ic.intc_code
AND ic.intc_code = tb1.term_intc_code
--AND tb1.term_intr_subcode <> 999
AND ((ic.INTC_TERM_CONTROL = 8
AND MONTHS_BETWEEN(TO_DATE('&TBC','DD-MM-YYYY'), acc_incep_date) > tb1.term_interval
AND MONTHS_BETWEEN(TO_DATE('&TBC','DD-MM-YYYY'), acc_incep_date) < tb1.term_interval + 1 )
OR (ic.INTC_TERM_CONTROL = 5
AND MONTHS_BETWEEN(TO_DATE('&TBC','DD-MM-YYYY'), ic.INTC_FIXED_DATE) > tb1.term_interval
AND MONTHS_BETWEEN(TO_DATE('&TBC','DD-MM-YYYY'), ic.INTC_FIXED_DATE) < tb1.term_interval + 1 ))
ORDER BY acc_account_no, acc_subacc_no


ANY IDEAS? IS THERE A NEW '&TBC' FOR THIS VERSION??

Cheers
Old 18 April 2008, 03:57 PM
  #2  
DJ Dunk
Moderator
Support Scoobynet!
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
Default

I'm using Toad 9.5.0.31 although I'm no expert. What did this variable result in before?
Old 18 April 2008, 04:26 PM
  #3  
L33_WRX
Scooby Regular
Thread Starter
 
L33_WRX's Avatar
 
Join Date: Feb 2007
Posts: 979
Likes: 0
Received 0 Likes on 0 Posts
Default

pop up box displayed so that a user can input various values each time (in this case a date)
Old 18 April 2008, 05:28 PM
  #4  
DJ Dunk
Moderator
Support Scoobynet!
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
Default

Oh, okay I thought it may be a special variable that it was pulling in. Can't help except to say that my version prompts for input when using variables.
Old 18 April 2008, 06:06 PM
  #5  
J4CKO
Scooby Regular
iTrader: (1)
 
J4CKO's Avatar
 
Join Date: Jan 2003
Posts: 19,384
Likes: 0
Received 1 Like on 1 Post
Default

I think its one of the options, scan for variables or something.
Old 21 April 2008, 12:12 PM
  #6  
T4molie
Scooby Regular
 
T4molie's Avatar
 
Join Date: Dec 2002
Location: Dum dum de dum....
Posts: 2,617
Likes: 0
Received 0 Likes on 0 Posts
Default

I thought you had to have an "accept" statement at the fron of the sql?
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
IanG1983
Wheels, Tyres & Brakes
2
06 October 2015 03:08 PM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM
M4RKG
Wanted
4
25 September 2015 09:54 PM



Quick Reply: QUICK SQL RELATED QUESTION IN TOAD



All times are GMT +1. The time now is 02:54 AM.