-  [WT]  [PS]  [Home] [Manage]

[Return]
Posting mode: Reply
  1.   (reply to 5160)
  2. (for post and file deletion)
/pr/ - Programming
  • Supported file types are: C, CSS, DOC, DOCX, GIF, H, JAVA, JPG, PDF, PNG, SVG, SWF, TXT, WEBM
  • Maximum file size allowed is 10000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 437 unique user posts. View catalog

  • Blotter updated: 2018-08-24 Show/Hide Show All

Movies & TV 24/7 via Channel7: Web Player, .m3u file. Music via Radio7: Web Player, .m3u file.


PL/SQL Issues Neckbearded Basement Dweller 18/11/27(Tue)08:09 No. 5160
5160

File 154330259383.jpg - (455.74KB , 2539x1459 , 1445728771441.jpg )

Why the fuck wont this run? it runs fine when i put in a number for the interval but not when i put in left or right input. they should just be numbers so whats the big deal?


SET serveroutput ON

ACCEPT leftLimitInput NUMBER PROMPT "Please enter the leftLimit in minutes: ";
ACCEPT rightLimitInput NUMBER PROMPT "Please enter the rightLimit in minutes: ";

DECLARE
leftLimit NUMBER;
rightLimit NUMBER;
BEGIN
leftLimit := &leftLimitInput;
rightLimit := &rightLimitInput;
SELECT flightno, fromAirport, toAirport, (arrives-depart) AS flightDuration FROM flights WHERE (arrives-depart) >= INTERVAL 'leftLimitInput' MINUTE AND (arrives-depart) <= INTERVAL 'rightLimitInput' MINUTE;
END;
/


>>
Neckbearded Basement Dweller 18/11/27(Tue)09:30 No. 5161

>>5160
also this select statement doesnt work and i dont know why that is either. im trying to get it to display stuff from within the last 61 days and this should do it but it isnt.

select BT, BP, AD, DATE_FORMAT(publDate, '%m/%d/%Y'), PN from auth, book, publ where (publDate BETWEEN NOW() - INTERVAL 61 DAY AND NOW())


>>
Neckbearded Basement Dweller 18/11/27(Tue)15:41 No. 5162

>>5161
Just kidding about this select statement. It does work but there are no dates within the 61 days. That took me far too long to realize





Delete post []
Password  
Report post
Reason