Quantcast
Viewing all articles
Browse latest Browse all 13329

A SQL question - Remove leading zeros

Hi

I'm new to this forum and I'm not sure if I've come to the right place but I'll ask anyway.

I have the following SQL statement and I want to remove the leading zeros from the PR_Sales.InvoiceNumber column.

SELECT PR_Sales.InvoiceDate, PR_Sales.InvoiceNumber, PR_Sales.TotalLines+PR_Sales.TotalTax-(PR_Sales.TotalCredits+PR_Sales.TotalDeposits+PR_S ales.TotalPaid), PR_Customers.CardIdentification, PR_Status.Description
FROM `C:\AccountingPower\PowerReports\MYOB`.PR_Customer s PR_Customers, `C:\AccountingPower\PowerReports\MYOB`.PR_Sales PR_Sales, `C:\AccountingPower\PowerReports\MYOB`.PR_Status PR_Status
WHERE PR_Status.StatusID = PR_Sales.InvoiceStatusID AND PR_Sales.CardRecordID = PR_Customers.CardRecordID AND ((PR_Status.Description='Open'))

Is anyone able to help me with this please?

Kind Regards

Viewing all articles
Browse latest Browse all 13329

Trending Articles