954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Urgent help with SQL Functions

Hey everyone,

I'm trying to count all Purchases and find ReceiptNo the ones that start with '434'..

Select count(p.purchaseNo) from purchase p (select  INSTR(TO_CHAR(p.recceiptNo), "434") >= 10;

But this line doesn't only select all receipt number starting with 434.. it selects all receipt no that has 434 in it....


I need help with this please

rotten69
Posting Whiz
346 posts since May 2011
Reputation Points: 3
Solved Threads: 16
 

Simple...

Select Count (*)
From Purchase
Where To_Char (ReceiptNo) Like '434%'
;
hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 248
Solved Threads: 105
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You