SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


display data for every Customer


display data for every Customer

Author
Message
$t@r
$t@r
SSC-Addicted
SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)SSC-Addicted (431 reputation)

Group: General Forum Members
Points: 431 Visits: 628
Hello

I have two data sets dataset1 contains Center Id, Customer Id and dataset2 Contains Customer Id and few information of customers.i have two parameters Center Id, Customer Id .
when I enter center Id it should display all the customer information in list format
if i enter both it should display only that customer information how can i achieve this ????
Any help would be appreciated

Thanks
-----------
swat
sqlnaive
sqlnaive
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6495 Visits: 2774
Swat, a simple if...else condition may help you. Did you tried something of your own ?
geoff5
geoff5
Say Hey Kid
Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)Say Hey Kid (696 reputation)

Group: General Forum Members
Points: 696 Visits: 543
Unless you can create a dataset that joins the tables together from the two datasets you have now, you will have to use a LookupSet function to return each value from dataset2 that matches the CustomerID associated with the selected CenterID. Because LookupSet can only return one type of value at at time, you will need a separate LookupSet function for each customer value you want to return.

Assuming your tablix is built upon dataset1, the syntax would be something like =LookupSet(Fields!CustomerID.Value, Fields!CustomerID.Value, Fields!CustomerName.Value, "dataset2")

In a query, this would be a simple join between the two tables represented in each currently defined dataset, but if you cannot write your own query against the data, LookupSet may be your only option.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search