![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In DTS, i would like to identify whether the Alliance table has data, if has data, then i want to extract the relevant data from another table called Boolean. After i run the following code, it will return an error message : Invalid pointer. if not exists (select * from Alliance) SELECT catalog_code, category_code, status, supplier_id, description, start_date, end_date, points_value, supplier_ref, cash_value FROM Boolean where len(catalog_code) = 15 |
#3
| |||
| |||
|
|
Try this in your SQL Task: if not exists(select * from Alliance) begin SELECT catalog_code, category_code, status, supplier_id, description, start_date, end_date, points_value, supplier_ref, cash_value FROM Boolean where len(catalog_code) = 15; end; Regards, Ilona Shulman Senior Development Consultant, DBA SSE Inc http://www.sseinc.com "tchangmian" <tchangmian (AT) yahoo (DOT) com.sg> wrote in message news:6447ee25.0410061910.12207ae4 (AT) posting (DOT) google.com... In DTS, i would like to identify whether the Alliance table has data, if has data, then i want to extract the relevant data from another table called Boolean. After i run the following code, it will return an error message : Invalid pointer. if not exists (select * from Alliance) SELECT catalog_code, category_code, status, supplier_id, description, start_date, end_date, points_value, supplier_ref, cash_value FROM Boolean where len(catalog_code) = 15 |
![]() |
| Thread Tools | |
| Display Modes | |
| |