Views are created in SQL Server.

In SQL Server, I'm constructing the view shown below.
1
2
3
4
5
6
7
8
9
10
11
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.
I think you have to put some kind of limitation on the subquery, like a group by or similar. It currently looks like it wants to get ALL the values for each record, that can't be what you wanted. I was never a guru at sql, so I am educated guessing a bit here.

that said, this is a forum for the c++ language, and not a likely place to get a lot of great help on sql.
Topic archived. No new replies allowed.