Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 12, 2012 10:02 PM by Andy Tauber
Member
32 Points
67 Posts
Mar 12, 2012 08:42 PM|LINK
I am developing a store procedures. I have two tables an Image table and Website Button table. I need way to extract the all ImageId's and whether the imageid is used in website or not. ImageId is can only show up once in the results.
Results Tables
ImageId ImageData ImageSize Image/Mine In Use
111 0x00AF82 1239 image/png Yes
222 0x00AF83 3445345 image/png Yes
333 0x00AF84 1234 image/png No
444 0x00AF85 34535 image/png Yes
555 0x00AF86 34554 image/png Yes
666 0x00AF87 76766 image/png Yes
Image Table ImageId – UniqueIdentifier
ImageData – varbinary(MAX)
ImageSize – Int
Image/Mine – varchar(250)
Website Button
WebId – UniqueIdentifier
WebName – varchar(100)
WebAddress – varchar(Max)
WebImage – UniqueIdentifier ( ImageId )
ImageId ImageData ImageSize Image/Mine
111 0x00AF82 1239 image/png
222 0x00AF83 3445345 image/png
333 0x00AF84 1234 image/png
444 0x00AF85 34535 image/png
555 0x00AF86 34554 image/png
666 0x00AF87 76766 image/png
WebId WebName WebAddres WebImage
1 Jernie http://www.jernie.com 111
2 Facebook http://www.facebook.com 222
3 Yahoo http://www.yahoo.com 222
4 Google http://www.google.com 444
5 Weather http://www.weather.com 555
6 mySite http://www.mysite.com 666
94 Points
17 Posts
Mar 12, 2012 10:02 PM|LINK
If all you need is the id and name of the image if it is used in any web site then just link two tables and group by the imageid.
ScottDolan
Member
32 Points
67 Posts
design approach help...
Mar 12, 2012 08:42 PM|LINK
I am developing a store procedures. I have two tables an Image table and Website Button table. I need way to extract the all ImageId's and whether the imageid is used in website or not. ImageId is can only show up once in the results.
Results Tables
<div>ImageId ImageData ImageSize Image/Mine In Use
</div>111 0x00AF82 1239 image/png Yes
222 0x00AF83 3445345 image/png Yes
333 0x00AF84 1234 image/png No
444 0x00AF85 34535 image/png Yes
555 0x00AF86 34554 image/png Yes
666 0x00AF87 76766 image/png Yes
Image Table
ImageId – UniqueIdentifier
ImageData – varbinary(MAX)
ImageSize – Int
Image/Mine – varchar(250)
Website Button
WebId – UniqueIdentifier
WebName – varchar(100)
WebAddress – varchar(Max)
WebImage – UniqueIdentifier ( ImageId )
<div>ImageId ImageData ImageSize Image/Mine
</div>111 0x00AF82 1239 image/png
222 0x00AF83 3445345 image/png
333 0x00AF84 1234 image/png
444 0x00AF85 34535 image/png
555 0x00AF86 34554 image/png
666 0x00AF87 76766 image/png
<div>WebId WebName WebAddres WebImage
</div>1 Jernie http://www.jernie.com 111
2 Facebook http://www.facebook.com 222
3 Yahoo http://www.yahoo.com 222
4 Google http://www.google.com 444
5 Weather http://www.weather.com 555
6 mySite http://www.mysite.com 666
Andy Tauber
Member
94 Points
17 Posts
Re: design approach help...
Mar 12, 2012 10:02 PM|LINK
If all you need is the id and name of the image if it is used in any web site then just link two tables and group by the imageid.
MCDBA, MCSE
www.andytauber.com
andy (@) andytauber.com
Please "Mark As Answer" if my reply was helpful.