0

Hi,

Im having a hard time figuring this maybe a simple query. This is my first time to use sql compact edition.
How can I query a select statement inside a select statement which tables are not related at all.

What i need to accomplish is to insert a logo inside a crystal report, and that logo is save as byte if im not mistaken into sql server database

I tried somthing like this but not working

Select Name, Add, (Select Logo From Company) as Logo From Client

Please somebody guide me the right query
Im using sql server 2008 r2 and visual studio 2010

Thanks

3
Contributors
5
Replies
23
Views
4 Years
Discussion Span
Last Post by ugi.nagesh
0

actually there's only one logo. I have a table where I edit company information including its logo. This logo need to show in Crystal report. Whatever Name, add the system extracts from database. only one logo is used.

how can I query it using sql ce?
thanks again

0

Your a savior, my query runs in sql server, just need some modification for sql ce. Thanks pritaeas.

0

Assuming the Client table has companyid column, then you can use the below SQL Query to get the Logo value

  SELECT NAME, ADD, 
            (SELECT TOP 1 LOGO 
             FROM COMPANY 
             WHERE COMPANYID = CLIENT.COMPANYID) AS LOGO 
  FROM CLIENT

Hope this will solve your problem

Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.