Baanboard.com

Go Back   Baanboard.com > Forum > CMS - Forum Integration > Blogs and Web links

User login

Frontpage Sponsor

Main

Poll
As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
45%
Handover everything to System Integrator from drawing BP till implementation of ERP
18%
Hire more inhouse skilled & capable IT Resource to work directly with SI
36%
Rely on SI Architects/Consultants
0%
Total votes: 11

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 23rd May 2009, 13:18
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,853
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
Tips for Multi-company / Calculated items in MS SQL query

A new blog entry has been added:

Tips for Multi-company / Calculated items in MS SQL query

Quote:
Tips for Multi-company / Calculated items in MS SQL query

If one is using SQL 2000/2005 and one wants to access the same from outside (say MS Excel or .net application or any other application) , one can use the SQL client in conjunction with  following SQL tips.



Multi-company query

Though baan driver let’s user access data from same table from multiple companies using compnr specification, in the MS SQL backend the tables are separate with company suffix . If one is to combine the data from multiple companies for same table, Union operator is SQL query is the key. Using this operator also one may need to know from which company the data has originated . In Baan 4GL one can get this with ._compnr field selected . In MS SQL one needs to  hard code the company constant expression in each SQL  query  combined with UNION operator . An example will illustrate this clearly.

Select t_leac as Ledger ,t_dbcr ‘Debit/Credit’,t_year as Year ,t_fprd as Period, t_amth as Amount , ‘300’ as company – Constant for company
From ttfgld106300
UNION
Select t_leac as Ledger ,t_dbcr ‘Debit/Credit’,t_year as Year ,t_fprd as Period, t_amth as Amount, ‘301’ as company – Constant for company
From ttfgld106301

This example will select data from tfgld106 of 300 and 301 company.
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An Oracle SQL Query ..... metropoj Tools Development 1 20th February 2008 22:04
Is it possible for Multiple Company SQl Query ? metropoj Tools Development 5 4th February 2008 22:29
How can I prevent the users from using a company? i96nds Tools Administration & Installation 7 16th April 2002 19:33


All times are GMT +2. The time now is 02:50.


©2001-2020 - Baanboard.com - Baanforums.com