The datastage server version is 5.2.2 ang on AIX
I have a column like idno , I want to limit idno between 4764501 and
4764589, and also include 4773401.
and how to?
use hashed file stage or constraints? and how to?[:)]
how to limit a column in transfer?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 9
- Joined: Tue Apr 15, 2003 3:27 am
- Location: China
- Contact:
Toly
That is what constraints are for. They are designed to limit what gets sent to the target.
Thanks Kim.
Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com
That is what constraints are for. They are designed to limit what gets sent to the target.
Thanks Kim.
Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Two places to apply a filter. As Kim mentions the transformer constraint will let you add a filter to stop rows going through. The other option is putting a filter on a database source stage (if your source is a database table and not a flat file).
When you define your database table name and column list you should see an option in there for a where clause. Use this where clause to add "idno between 4764501 and 4764589 or idno = 4773401" or "(idno >= 4764501 and idno
When you define your database table name and column list you should see an option in there for a where clause. Use this where clause to add "idno between 4764501 and 4764589 or idno = 4773401" or "(idno >= 4764501 and idno
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
To clarify what Vincent said, because I realise that English is not your first language, there are two possibilities.
If the data are being extracted from a database table, then you can use the Selection tab (which builds a WHERE clause in the SQL), for example:
IDNO BETWEEN (4764501 and 4764589) OR IDNO = 4773401
If the data are being read from a text file or other streaming source (such as FTP), then you put a constraint expression on the output link of a Transformer stage. For example:
(link.IDNO >= 4764501 And link.IDNO
If the data are being extracted from a database table, then you can use the Selection tab (which builds a WHERE clause in the SQL), for example:
IDNO BETWEEN (4764501 and 4764589) OR IDNO = 4773401
If the data are being read from a text file or other streaming source (such as FTP), then you put a constraint expression on the output link of a Transformer stage. For example:
(link.IDNO >= 4764501 And link.IDNO