Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros SQL Code

Status
Not open for further replies.

Wildbar

Technical User
Oct 15, 2004
1,013
CA
Can someone see the error in this script code? It is for 3700 version 5.2. It works when called through dbisql. When calling direct it gives the error "Syntax error - Select was not expected here. It also worked in version 4.x with the old connection. Micros has spent a few hours looking at it but cant figure it out either. Thanks in advance.

Code:
CONNECT USING 'DSN=micros;UID=custom;PWD=custom'

select cast(inven_itm_id as numeric(6)), cast(ordr_qty  as int) from micros.veo_po_inven_itm_dtl
where po_seq=(select Max(po_seq) from micros.veo_ordr_itm_po_dtl
and vndr_name='Connect Logistics')
order by name;

output to D:\ConnectExport\Connect.csv
 
Swear we had that colon there but had 4 Micros help desk techs looking at this today (Level 2 even) and they were making lots of changes before they gave up.
One little colon and away we go.
Thanks again Moregelen......you rock. I'll put another beer on ice for you.
 
I usually have my connect statement as part of the batch file, but I've noticed dbisql prefers all your statements to be followed by a semi colon when run from a batch file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top