Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
qaiserkhan
Starting Member
1 Post |
Posted - 2008-10-12 : 01:03:52
|
i am new to sql, need a link for server 2005 query analyzer tutorial, how to use it? i went to bookshops but could not find anything suitable at my level. i am just starting SQL as you can see my effort below: any help would be much appriciated. thanks1. Create a view called BORNBEFORE of all targets born before 1969. It should contain the TARGET_ID, FIRST_NAME, LAST_NAME and BIRTH_DATE.CREATE VIEW BORNBEFORE AS( SELECT first_name, last_name, BIRTH_DATE FROM targets WHERE TO_CHAR(birth_date,'yyyy')= '1969'); --2. Referring to the view above, change the date of birth of the targets whose BIRTH_DATE falls before the year 1940 to 29-APR-70.SELECT TO_CHAR(birth_date,'dd-mm-yyyy')FROM TARGETSWHERETO_CHAR(birth_date,'dd-mm-yyyy')<= '29-APR-70'ANDTO_CHAR(birth_date,'dd-mm-yyyy')= '31-DEC-1939'this is the best i could i comeup with. help!!! |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-12 : 02:01:49
|
This is a Microsoft SQL Server forum.If you are using ORACLE, please visit www.dbforums.com or www.orafaq.com E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|