Skip to Content.
Sympa Menu

freetds - Re: [freetds] Select Problems with FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Select Problems with FreeTDS
  • Date: Wed, 7 Jul 2010 15:16:51 +0200

2010/7/6 Gebhardt, Erik G <erik.g.gebhardt AT verizon.com>:
> 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




Archive powered by MHonArc 2.6.24.

Top of Page