Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Datareader Source

Author  Topic 

Cry
Starting Member

24 Posts

Posted - 2009-01-29 : 02:25:21
Hi,

i have a problem with a datareader object. Its an ADO.Net connection to a sybase sql anywhere engine.

I put in a select statement that sometimes selects values and sometimes not (only in one filed). Does anybody know if there is
any chaching in the Source???

Thanks

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-29 : 03:11:10
can u give me the SELECT Statement?

Avantha Siriwardana
Go to Top of Page

Cry
Starting Member

24 Posts

Posted - 2009-01-29 : 03:20:17
SELECT vtb_name as name, ag_vtbid as id
FROM nsc_ag LEFT JOIN nsc_vtb ON nsc_ag.ag_vtbid = nsc_vtb.vtb_id
WHERE ag_agnr BETWEEN '1000000' AND '1999999'

Sometimes the select statement retrieves values for "name" and sometimes not.
The joined table contains all possible values of vtb_id because ag_vtbid is a foreign key.
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-29 : 03:42:29
In your where clause specify the table name and then give the field name.
WHERE tablename.ag_agnr BETWEEN '1000000' AND '1999999'


Avantha Siriwardana
Go to Top of Page

Cry
Starting Member

24 Posts

Posted - 2009-01-29 : 04:29:45
thanks,

i checked it, but the result is the same. Sometimes there are values sometimes not. Seems to be a caching problem?
Go to Top of Page

AvanthaSiriwardana
Yak Posting Veteran

78 Posts

Posted - 2009-01-29 : 04:49:32
why are you having a LEFT JOIN instead of INNER JOIN???

Avantha Siriwardana
Go to Top of Page
   

- Advertisement -