Home » SQL & PL/SQL » SQL & PL/SQL » View Help
View Help [message #295208] Mon, 21 January 2008 13:50 Go to next message
scumboss
Messages: 3
Registered: January 2008
Junior Member
Hi All

I want to create a view, here is what the query would look like in Access: -

SELECT YM_BKSB_SLOTS.SLOT_ID, YM_BKSB_SLOTS.SLOT_ACTIVE, YM_BKSB_SLOTS.START_TIME, YM_BKSB_SLOTS.STUDENT_QUOTA
FROM YM_BKSB_SLOTS
WHERE (((YM_BKSB_SLOTS.SLOT_ACTIVE)="Y") AND (DateAdd("d",-10,[START_TIME])>=Now()));

Does the following look right for creating a view in Oracle: -

CREATE OR REPLACE VIEW YM_BKSB_SLOTS_VIEW AS
SELECT YM_BKSB_SLOTS.SLOT_ID, YM_BKSB_SLOTS.SLOT_ACTIVE, YM_BKSB_SLOTS.START_TIME, YM_BKSB_SLOTS.STUDENT_QUOTA
FROM YM_BKSB_SLOTS
WHERE YM_BKSB_SLOTS.SLOT_ACTIVE='Y' AND YM_BKSB_SLOTS.START_TIME-10 >= SYSDATE

Help much appreciated.

Andrew
Re: View Help [message #295211 is a reply to message #295208] Mon, 21 January 2008 14:04 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Quote:

Does the following look right for creating a view in Oracle:

Short answer for this one. Yes.
Are you having problems with it?
Re: View Help [message #295212 is a reply to message #295208] Mon, 21 January 2008 14:06 Go to previous message
scumboss
Messages: 3
Registered: January 2008
Junior Member
No, just wanted to make sure because I don't have access to the Oracle server directly, so any commands I pass on to the guy in charge of the server need to be correct.

Cheers for confirming. Smile

[Updated on: Mon, 21 January 2008 14:07]

Report message to a moderator

Previous Topic: Row as input to a procedure.
Next Topic: Abort primary key violation
Goto Forum:
  


Current Time: Thu Dec 08 06:16:27 CST 2016

Total time taken to generate the page: 0.07446 seconds