Click here to Skip to main content
15,844,387 members
Home / Discussions / Database
   

Database

 
Questionspace in-between search parameters Pin
acodman28-Jun-07 23:18
acodman28-Jun-07 23:18 
AnswerRe: space in-between search parameters Pin
Sgg24529-Jun-07 1:36
Sgg24529-Jun-07 1:36 
AnswerRe: space in-between search parameters Pin
Sgg24529-Jun-07 1:39
Sgg24529-Jun-07 1:39 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:10
NAKRAINC28-Jun-07 23:10 
GeneralRe: NAKRA Pin
Pete O'Hanlon28-Jun-07 23:20
subeditorPete O'Hanlon28-Jun-07 23:20 
GeneralRe: NAKRA Pin
kubben29-Jun-07 2:53
kubben29-Jun-07 2:53 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:09
NAKRAINC28-Jun-07 23:09 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:08
NAKRAINC28-Jun-07 23:08 
AS:2
QNO : 1
SELECT MEMBER_NAME
FROM MEMBER
WHERE ACC_OPEN_DATE>'31-DEC-2005' AND ACC_OPEN_DATE <'1-JAN-2007';

OR

SELECT MEMBER_NAME
FROM MEMBER
WHERE ACC_OPEN_DATE BETWEEN '31-DEC-2005' AND '1-JAN-2007';

QNO : 2
SELECT BOOK_NAME,AUTHOR
FROM BOOK
WHERE AUTHOR='LONI' AND COST>600;

QNO : 3
SELECT LIB_ISSUE_ID,BOOK_NO,MEMBER_ID,ISSUE_DATE,RETURN_DATE
FROM ISSUE
WHERE COMMENTS='PENDING';


QNO : 4
UPDATE ISSUE SET RETURN_DATE='31-DEC-06'
WHERE RETURN_DATE=NULL AND (LIB_ISSUE_ID!=7005 OR LIB_ISSUE_ID!=7006);

QNO : 5
SELECT LIB_ISSUE_ID,BOOK_NO,MEMBER_ID,ISSUE_DATE,RETURN_DATE
FROM ISSUE
WHERE (SYSDATE-ISSUE_DATE)>30 AND (ISSUE_DATE-RETURN_DATE)>30;

OR

SELECT LIB_ISSUE_ID,BOOK_NO,MEMBER_ID,ISSUE_DATE,RETURN_DATE
FROM ISSUE
WHERE ((SYSDATE-ISSUE_DATE)>30 AND RETURN_DATE=NULL) OR (ISSUE_DATE-RETURN_DATE)>30;

QNO : 6
SELECT BOOK_NAME
FROM BOOK
WHERE (COST BETWEEN 500 AND 750) AND CATEGORY='DATABASE';

QNO : 7
SELECT BOOK_NAME
FROM BOOK
WHERE CATEGORY IN('SCIENCE','DATABASE','FICTION','MANAGEMENT');

QNO : 8
SELECT MEMBER_ID,MEMBER_NAME,PENALTY_AMOUNT
FROM MEMBER
ORDER BY PENALTY_AMOUNT DESC;

OR

SELECT MEMBER_ID,MEMBER_NAME,PENALTY_AMOUNT
FROM MEMBER
ORDER BY 3 DESC;

QNO : 9
SELECT BOOK_NAME,COST
FROM BOOK
ORDER BY BOOK_NAME,COST DESC;

OR

SELECT BOOK_NAME,COST
FROM BOOK
ORDER BY 1,2 DESC;

QN0 : 10
SELECT BOOK_NAME
FROM BOOK
WHERE BOOK_NAME LIKE '%SQL%';

QNO : 11
SELECT MEMBER_NAME
FROM MEMBER
WHERE MEMBER_NAME LIKE ('G%I%' ||'R%I%');

QNO : 12
SELECT INITCAP(BOOK_NAME),UPPER(AUTHOR)
FROM BOOK
ORDER BY 1 DESC;

QNO : 13
SELECT BOOK_NO, CONCAT('IS WRRITTEN ', 'BY') " ---------------- ", AUTHOR AS NAME
FROM BOOK;

OR

SELECT CONCAT( BOOK_NO,' IS WRITTEN BY') "BOOKNO ------------------",AUTHOR AS NAME
FROM BOOK;

QNO : 14
SELECT LIB_ISSUE_ID,BOOK_NO,TO_CHAR(TO_DATE(ISSUE_DATE,'DD-MM-YY'),'Day,Month,DD,YYYY') ,
TO_CHAR(TO_DATE(RETURN_DATE,'DD-MM-YY'),'Day,Month,DD,YYYY')
FROM ISSUE
WHERE MEMBER_ID=101;

QNO : 15 & 16
SELECT CATEGORY,
DECODE(CATEGORY,'DATABASE','D','SCIENCE','S','RDBMS','R','OTHERS','O')
FROM BOOK;

QNO : 17
SELECT CONCAT( RPAD(BOOK_NAME,20,'*'),LPAD(AUTHOR,20,'*') )
FROM BOOK;

QNO : 18
SELECT LIB_ISSUE_ID,ISSUE_DATE,RETURN_DATE,COUNT(ISSUE_DATE-RETURN_DATE) "NO OF DAYS"
FROM ISSUE;

QNO : 19
SELECT MEMBER_ID,MEMBER_NAME,ACC_OPEN_DATE,MAX_BOOKS_ALLOWED,PENALTY_AMOUNT
FROM MEMBER
ORDER BY 3 DESC;

QNO : 20
SELECT COUNT(BOOK_NO)
FROM ISSUE
WHERE MEMBER_ID=101;

QNO : 21
SELECT SUM(PENALTY_AMOUNT)
FROM MEMBER;

QNO : 22
SELECT SUM(COST)
FROM BOOK
WHERE CATEGORY='DATABASE';

QNO : 23
SELECT BOOK_NAME,COST
FROM BOOK ;

QNO : 24
SELECT BOOK_NO,MIN(ISSUE_DATE)
FROM ISSUE;

QNO : 25
SELECT BOOK_NO,MAX(ISSUE_DATE)
FROM ISSUE;

QNO : 26
SELECT AVG(COST)
FROM BOOK
WHERE CATEGORY='DATABASE';

*****************************************************************************
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:06
NAKRAINC28-Jun-07 23:06 
Questionhow to encrypt whole Database ? Pin
hdv21228-Jun-07 22:51
hdv21228-Jun-07 22:51 
AnswerRe: how to encrypt whole Database ? Pin
originSH29-Jun-07 1:06
originSH29-Jun-07 1:06 
QuestionMerge Replication rights Pin
Sgg24528-Jun-07 21:15
Sgg24528-Jun-07 21:15 
QuestionCritical probs to display records..., Pin
Member 387988128-Jun-07 19:02
Member 387988128-Jun-07 19:02 
AnswerRe: Critical probs to display records..., Pin
Devkranth Kishore Vanja28-Jun-07 21:24
Devkranth Kishore Vanja28-Jun-07 21:24 
GeneralRe: Critical probs to display records..., Pin
Member 387988128-Jun-07 21:57
Member 387988128-Jun-07 21:57 
AnswerRe: Critical probs to display records..., Pin
Navneet Hegde29-Jun-07 4:34
Navneet Hegde29-Jun-07 4:34 
QuestionParamaterized Queries vs. Stored Procedures Pin
martin_hughes28-Jun-07 9:17
martin_hughes28-Jun-07 9:17 
AnswerRe: Paramaterized Queries vs. Stored Procedures Pin
kubben28-Jun-07 10:09
kubben28-Jun-07 10:09 
AnswerRe: Paramaterized Queries vs. Stored Procedures [modified] Pin
Mike Dimmick28-Jun-07 10:22
Mike Dimmick28-Jun-07 10:22 
GeneralRe: Paramaterized Queries vs. Stored Procedures Pin
martin_hughes29-Jun-07 2:34
martin_hughes29-Jun-07 2:34 
AnswerRe: Paramaterized Queries vs. Stored Procedures Pin
originSH29-Jun-07 1:11
originSH29-Jun-07 1:11 
GeneralRe: Paramaterized Queries vs. Stored Procedures Pin
martin_hughes29-Jun-07 2:32
martin_hughes29-Jun-07 2:32 
QuestionView more than one page with CrystalReportViewer vb.net Pin
kindman_nb28-Jun-07 6:09
kindman_nb28-Jun-07 6:09 
QuestionAlternative of CONVERT function in MS Access Pin
FishiFishi28-Jun-07 4:12
FishiFishi28-Jun-07 4:12 
AnswerRe: Alternative of CONVERT function in MS Access Pin
leckey28-Jun-07 5:20
leckey28-Jun-07 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.