Hi all,
I have a view which is used to list and amalgamate all my products. This makes a string search on a website more efficient than searching each table seperately (I think!)
However, there are no links between the 4 tables (all are seperate products) so to join the tables, I use something like: join where books.ID <> dvd.ID <> games.ID <> cd.ID
This gives me a view which lists all of my products which is what I want. The problem is the alias's. I now have 4 columns: booksID, dvdID, gamesID and cdID. So, I concatate them: (b.ID + d.ID + g.ID + c.ID) AS ConcatID. This works.
Some of the ID's can be left blank (null). Don't ask why, they just can! A perfect example of why we don't use the term ID!! Any way, this means all my ContactID fields return null.
I know I can use SET CONCAT_NULL_YIE LDS_NULL ON but this doesn't appear to work in a view. I get told off SQL can't create it in the diagram.
Any ideas?
I have a view which is used to list and amalgamate all my products. This makes a string search on a website more efficient than searching each table seperately (I think!)
However, there are no links between the 4 tables (all are seperate products) so to join the tables, I use something like: join where books.ID <> dvd.ID <> games.ID <> cd.ID
This gives me a view which lists all of my products which is what I want. The problem is the alias's. I now have 4 columns: booksID, dvdID, gamesID and cdID. So, I concatate them: (b.ID + d.ID + g.ID + c.ID) AS ConcatID. This works.
Some of the ID's can be left blank (null). Don't ask why, they just can! A perfect example of why we don't use the term ID!! Any way, this means all my ContactID fields return null.
I know I can use SET CONCAT_NULL_YIE LDS_NULL ON but this doesn't appear to work in a view. I get told off SQL can't create it in the diagram.
Any ideas?
Comment