Microsoft
Software
Hardware
Network
Question : VBA SQL sysntax
This is my query:
sql = "SELECT STOCK.stCode, STOCK.stDescLine1, STOCK.stBarCode, Trim([stCode]) AS BC FROM Exchequer.BGCI02.STOCK STOCK "
sql = sql & "WHERE STOCK.BC = '" & ActiveCell & "'"
The StBarcode fiels has trailing spaces so I need to trim it but Excel returns "Trim is not a built in funtion"
Does anyone know how to acheive this?
Answer : VBA SQL sysntax
try
sql = "SELECT STOCK.stCode, STOCK.stDescLine1, STOCK.stBarCode, RTrim(LTrim([stCode])) AS BC FROM Exchequer.BGCI02.STOCK STOCK "
sql = sql & "WHERE STOCK.BC = '" & ActiveCell & "'"
Random Solutions
Does OpenOffice allow Windows 7 preview pane to preview .doc and .xls files?
Include page headers when printing HTML pages with different headers on some of each page
How to block USB Disks using Windows 2008 R2 Domain Controller Group Policy
VMware Workstation 7.1 Won't Install
How to create own SMTP Server on VPS?
Why won't Exchange Transport service start in Exchange 2007 on our SBS 2008 server ?
VMware ESXi4 Backup
Can't obtain cell values from Selected Row of GridView programmatically
How to use Outlook VBA to select messages in an Outlook folder and run VBA macro
net share system error 5 acces denied