SQL Server conditional join with differing results columns -
I have a new app for which I am trying to find out the data. And for my recreational vehicle ads, I think:
- Ads - Includes
AdID
more general items likevalue
- R.V.
- Travel trailer - Includes travel trailer information
If an ad is in my "secondary" "If the tables are found in one of the ( traveltrailer
or then one or the other condition is tied to
) I have seen online questions like the following: AdID
).
e Choose the name of the employee, organize (S.Store, O.Office) Leave the exit of the employee's place on the outer store S ... Left Outdoor Offices at o ...
The problem is a travel trailer and RV The tables will contain some special items that are not present in the other
Using the code> approach, I can retrieve the motor column (if it is RV) and sometimes I can not (if it is a Trail Trailer) I can not understand how to do this.
I can pass in a type ( RV
or TravelTrailer
) and can run one of two separate questions depending on the type , But I just want to pass a AdID
and I will get my information with that. I can also do two questions, using an ad information like AdID
And then on the basis of that kind of a second that comes back from the ad table. I have to find out how to do this in a bridge if possible.
Thank you!
the way I am storing data
products (Product_id, product_type_id, product_attribute, att_value) product_type_id reference id on product_type: (FK barrier) > product_types (id, name)
Ie you can have RV ID # and Motor Home ID ID # 2.
And where the product_attribute_id table on product ID is authorized: (FK barrier)
product_attributes (id, name))
Pass weight can be # 1, length id # 2, sleep capacity ID # 3, etc.
In this way, you can write some products in table X, some products in table Y, others will not be Z, etc. And you can write questions more normally. If your questions are constantly more complex, then it is usually related.
Comments
Post a Comment