Getting error creating view

Brenda Stewart 96 Reputation points
2020-08-21T13:22:45.243+00:00

I am creating a view over multiple tables. I am getting an error on a field that says it's invalid but it does exist in the table.

field name is udHCSSE360WO and I have verified the spelling against the table. The same field exists in a different table which is another select in the script and I have no issues with that one.

Any idea what I could look at that would cause this issue? Any help is appreciated.

{count} votes

2 answers

Sort by: Most helpful
  1. tibor_karaszi@hotmail.com 4,291 Reputation points Microsoft MVP
    2020-08-21T15:59:29.907+00:00
    1. Skip the GUI. It isn't unlikely that it is the GUI that does it wrong.
    2. Try to run the SELECT statement in itself, without creating the view. Do you get the same error?
    3. Post here the exact error message and the CREATE VIEW command you try to execute.
    No comments

  2. EchoLiu-MSFT 14,416 Reputation points
    2020-08-24T02:43:48.993+00:00

    Hi BrendaStewart,

    Firstly, you need to check your table creation statement completely to make sure that each table in the view already exists.

    Secondly,please check whether the field has the same field in other tables. If there is the same field, you need to indicate the table to which the field belongs in the select statement (for example, select Table.column).

    If this does not solve your problem, please share us your table structure (CREATE TABLE …) and some sample data(INSERT INTO …) along with your expected result. So that we’ll get a right direction and make some test.

    If you have any question, please feel free to let me know.
    If the response is helpful, please click "Accept Answer" and upvote it.

    Best Regards
    Echo

    No comments