Re: Select Problems with FreeTDS

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
2010/7/6 Gebhardt, Erik G <[email protected]>:
> Hi,
>
>            I have a query,
>
> SELECT a.cddd_date ,a.center ,a.location, a.location as test,a.workid
> ,b.tracking_key,a.due_date,a.psn,b.prefix, b.work_type ,
> b.entry_date ,b.status ,b.person_asgn,last_name,c.email_address
> FROM [a_mysql_machine]...cddd_orders as a
> JOIN [pending_work_requests] as b on (a.location=b.loc and
> a.workid=b.work_id)
> JOIN view_di_ldap_loc as c on (a.location=c.location)
> where status not in ('c','x')
> and (entry_date=CONVERT(varchar(10),getdate(),20)
> and cddd_date=CONVERT(varchar(10),getdate(),01)) and c.center not
> in('NE2MAPWR')
>
>
>
>
>
> This query works fine under TDS version 4.2 but won't work using other
> versions (ie:8.0).  When I use this query:
>
>
>
> SELECT a.center,a.craft_alias,a.emp_name,a.tour,trick_Tue as trick,
> Tue_type as type
>
> FROM wfa_di.dbo.dipers as a
>
> WHERE week_ending = '07/10/10' and loc='xxxxxxxx' and trick_Tue != ''
>
>
>
> It works fine using version 8.0 but when I use 4.2, the it doesn't seem
> that the AS is being seen by SQL.  What's being returned is an array
> that has the following fields.
>
> [center]
>
> [craft_alias]
>
> [emp_name]
>
> [tour]
>
> [Trick_tue] ****
>
> [tue_type] ****
>
>
>
> NOT the field I specified in the AS.  I'd like both of these queries to
> work under the same version but I'm not sure what I'm doing wrong.  I'm
> accessing SQL 2008 on MS Server 2003 64bit.  My TDS is running from a
> SUSE 11.2 machine
>
> Thanks very much,
>
> Erik
>

Hi!

Which client library are you using? TDS protocol returns both label
and column name.

Regards
  Frediano Ziglio
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.