Smokers trying to quit the habit were mistakenly prescribed anti-impotence drug Viagra by doctors.
The health board said no-one received Viagra
NHS Greater Glasgow and Clyde said the error was due to a computer glitch at two city GP practices.
When GPs selected anti-smoking pill Zyban, computers selected sildenafil, the generic name for Viagra.
A health board spokeswoman said: "At no time was patient care affected by this as all prescriptions are subject to stringent double checking."
The e-Formulary computer system used by GPs automatically selects a list of the most popular drugs when doctors fill out prescriptions.
Some patients went to the pharmacy with a prescription for the anti-impotence drug instead of tablets to help them stop smoking.
The health board was made aware of the problem on Tuesday and alerted all its GPs to the problem.
It is not thought anyone left a chemist with the wrong medication.
A health board spokeswoman said: "A computer glitch was discovered by two Glasgow GP practices that use the Glasgow e-Formulary, following a recent update of the online GPass system used throughout Scotland.
"As a precaution an advisory e-mail and memo was issued to all practices which use GPass and have installed the e-Formulary to alert staff."