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

Member Avatar for hfx642

Simple...

Select Count (*)
From Purchase
Where To_Char (ReceiptNo) Like '434%'
;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.