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.
| Author |
Topic |
|
arthemyth
Starting Member
2 Posts |
Posted - 2011-09-07 : 09:17:03
|
| [sql]select distinct client_cd &client_cd1a.client_name || a.client_name_ext &clt_name1a.cds_acct_num &cds_acct_num1rtrim(ltrim(a.def_addr_1)) &clt_addr11rtrim(ltrim(a.def_addr_2)) &clt_addr21rtrim(ltrim(a.def_addr_3)) &clt_addr31a.post_cd &post_cd1a.staff_cd &staff_cd1substr(d.staff_name_abbr,1,19) &cl_staff_name1 do 1_print_letter_head position (+2) let #rec = 1 do l_get_data1 do 1_print_letter_tail from comh_client a, comh_staff dwhere a.staff_cd = d.staff_cd and d.staff_cd <> 'ZZZ' and rtrim(a.client_cd) = 'ABU'order by client_cd[/sql][sql]select distinct a.div_amt_alloc &amt_paid1b.payment_dt &pay_dt1substr(c.stk_desc,1,38) &stk_name1 if #rec > 10 do 1_print_letter_tail do 1_print_letter_head let #rec = 1 position (+2) else do l_print_data1 let #rec = #rec + 1 end-iffrom noth_stock_alloc a , nomh_announcement b , comh_counter cwhere a.ann_num = b.ann_num and substr(a.ann_num,5,1) = 'C' and b.stk_cd = c.stk_cd and rtrim(a.client_cd) = 'ABU' and b.payment_dt between to_date(''{i_pay_dt_fr}'',''dd/mm/yyyy'') and to_date(''{i_pay_dt_to}'',''dd/mm/yyyy'')'order by b.payment_dtend-select[/sql]this is the syntax to show client code that the staff has so probably 1 client to 1 staff.. how bout to show the 1 staff to all(many) his client?..really2 need any sifu help plss. :stars: |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-09-07 : 09:21:48
|
| What kind of database sever are you using? This does not look like valid sql server syntax... (this is a sql server forum only)- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
 |
|
|
arthemyth
Starting Member
2 Posts |
Posted - 2011-09-07 : 09:24:21
|
| im using oracle..and that is SQR language..can u help me pls..should be complete ASAP..;( |
 |
|
|
|
|
|