• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Views are created in SQL Server.

Pennywise2

Junior Member
In SQL Server, I'm constructing the view shown below.
Code:
create view View_CAM
as
SELECT
'5' FUNCTION,
getdate() UPLOAD_DATE,
'U' STATUS,
NULL INITIATED_DATE,
NULL PROCESSED_DATE,
NULL FINACLE_CUST_ID,
NULL PROCESSING_USER_ID,
**select currency from table_name** CURRENCIES
For the CURRENCIES column, I must create a select query in order for the data to be shown. The above one is incorrect. how it can be accomplished
Thank you in advance.
 
You probably want to join the tables like this:
select table1.myField, table2.currency from table1 join table2 on table2.someId=table1.someId
provided your two tables have proper relationship established.
If it's one to many relationship, you probably need to use aggregate function like sum() and group by clause.

Depend on your need and the relationship, you can also do a inline aggregate select statement like this:
select table1.myField,
(select sum(currency) from table2 where table2.someField=table1.someField) as currency
from table1
 
Back
Top