select t.TimeName,m.DevIp from wh_time_policy t inner join wh_timedev_map m on t.TimeId=m.TimeId
我这个是标准的sql语句吧?
为什么在sybase中老报错呢?说的意思好像是t有问题

解决方案 »

  1.   

    select t.TimeName,m.DevIp 
    from wh_time_policy t inner join wh_timedev_map m 
    on t.TimeId=m.TimeIdSQL语句没什么问题
    不过你的 t.TimeId=m.TimeId 是否匹配?
    == 思想重于技巧 ==
      

  2.   

    先看我的sql语句没错吧?两个表中的TimeId字段类型一样的 ERROR=Parse failure on line 2 of statement 'select t.TimeName,m.DevIp ...', at or near 't'
      

  3.   

    先看我的sql语句没错吧?两个表中的TimeId字段类型一样的  ERROR=Parse failure on line 2 of statement 'select t.TimeName,m.DevIp ...', at or near 't'
      

  4.   

     表和 字段名没写错的话     你把where条件去了  还有错吗? 
      

  5.   

    是因为netcool中只嵌入了sybase数据库的存储功能,和简单sql的功能,不支持表的关联,如果比较两个表,我就把两个表中的数据全部查询出来,放到容器中,然后在比较两个容器中的数据!