What is wrong with this query logic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • labbott
    New Member
    • Jun 2017
    • 1

    What is wrong with this query logic

    select top 100

    from erp.OrderHed as h (nolock)

    join erp.OrderDtl as d (nolock) on h.OrderNum = d.OrderNum

    where sourceSystem_c = 'iconnect' and ShipViaCode = 'wc'

    I get this error message:
    Incorrect syntax near the keyword 'from'.
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    You forgot the asterisk or column name(s)

    Code:
    select top 100 * from
    or
    Code:
    select top 100 sourceSystem_c,ShipViaCode from

    Comment

    Working...