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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Answer to 56stingray Newbie Question

Status
Not open for further replies.

SkipVought

Programmer
Dec 4, 2001
47,492
US



For ease of readablity and maintenance, use multiple lines to code your query, for instance...
Code:
    sSQL = "SELECT"
    sSQL = sSQL & "  SFC.PARTNO"
    sSQL = sSQL & ", SFC.OPER"
    sSQL = sSQL & ", SFC.COSTCTR"
    sSQL = sSQL & ", SUM(SFC.ACTQTY) as SF_QTY"
    sSQL = sSQL & ", SFC.SPANLEFT"
    sSQL = sSQL & vbCrLf
    sSQL = sSQL & "FROM SFCS.T_SFCTRAVELER SFC"
    sSQL = sSQL & vbCrLf
    sSQL = sSQL & "WHERE SFC.PARTNO IN (" & MakeList([Part_Number], [SelectedList]) & ")"
    sSQL = sSQL & vbCrLf
    sSQL = sSQL & "GROUP BY "
    sSQL = sSQL & "  SFC.PARTNO"
    sSQL = sSQL & ", SFC.OPER"
    sSQL = sSQL & ", SFC.COSTCTR"
    sSQL = sSQL & ", SFC.SPANLEFT"

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top