Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select Query Help!!
Alex King wrote:
> I am new to RDBMS world.
> I am currently working on a .Net & oracle 9i application in which I
> have to display certificate numbers based on the last 6 digits. If the
> last 6 digits are less than 070000 then display the data otherwise
> don't.
>
> For example the CertID is the primary key and consists of Year + Cert
> Number( 4 digits of year 2003 & 6 digits of Cert Num 001234 will make
> a 10 digit key of 2004001234).
>
> So if in the database I have following records;
> 2004000200
> 2004054000
> 2004088444
> 2003067122
> 2003090300
>
> Then display only following records;
>
> 2004000200
> 2004054000
> 2003067122
>
> My problem is how to write this SQL Query. Are there any built in
> oracle functions that I could use?
>
> Any suggestions?
> Thanks in advance.
>
> Alex
Many. But this looks like homework so I will give you a hint rather than the answer.
Go to http://tahiti.oracle.com and look up "String Functions."
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Dec 09 2003 - 00:58:52 CST