| Author |
Topic |
|
Swati Jain
Posting Yak Master
139 Posts |
Posted - 2009-01-19 : 12:57:22
|
| Hello All.. The stored procedure returns the two resultsets as the outcome of 2 select quries written in stored Procedure.I want to supress the first resultset(so that i will get only 1 resultset) ,though 2 select queries will be still in stored proc.how i can do so? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-19 : 13:00:06
|
| if you dont want 1st resultset why retain it at all? |
 |
|
|
Sudhindra
Starting Member
13 Posts |
Posted - 2009-01-19 : 23:50:28
|
| What exactly are you trying to achieve, if you can just highlight that it would be easy to analyze what needs to be done here. what are you doing with the first select query? are you using the result in the stored procedure? |
 |
|
|
Swati Jain
Posting Yak Master
139 Posts |
Posted - 2009-01-20 : 01:19:29
|
quote: Originally posted by Sudhindra What exactly are you trying to achieve, if you can just highlight that it would be easy to analyze what needs to be done here. what are you doing with the first select query? are you using the result in the stored procedure?
Hello All, Actually I am using sharepoint dataform view .Dataformview is binded with stored procedure output.As described in previous post.this SP has two select queriesfirst query gives the output values which are used in where clause of second select query.But when i bind this SP to dataformview I get only the output of firstquery which i dnt want as i want the output of second select querythts why i want to supress first select query output but as it gives the output values i cant remove it from SP.Pls tell me workaround? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-20 : 02:16:40
|
quote: Originally posted by Swati Jain Pls tell me workaround?
Make a better design. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-01-20 : 02:17:15
|
quote: Originally posted by Swati Jain
quote: Originally posted by Sudhindra What exactly are you trying to achieve, if you can just highlight that it would be easy to analyze what needs to be done here. what are you doing with the first select query? are you using the result in the stored procedure?
Hello All, Actually I am using sharepoint dataform view .Dataformview is binded with stored procedure output.As described in previous post.this SP has two select queriesfirst query gives the output values which are used in where clause of second select query.But when i bind this SP to dataformview I get only the output of firstquery which i dnt want as i want the output of second select querythts why i want to supress first select query output but as it gives the output values i cant remove it from SP.Pls tell me workaround?
Post the code you used in the procedure. Probably you dont need a first select which is used inside the second select statementMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-20 : 02:28:53
|
| or make both the selects into a single query using union all with an extra field (say category). give value as 1 for 1st resultset & 2 for 2nd. then filter the applicaton on category=2 to get only second select. but for this you need to make sure both resultset contain same number of columns and also corresponding columns are of same type. |
 |
|
|
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2009-01-20 : 02:29:58
|
| How are you binding the output?With a datatable or a dataset?If dataset then you can do something like this.Dataformview.Datasource=ds.Tables[1]Dataformview.Databind()With ds.Tables[1] the resultset of just the second select statement will get bound. |
 |
|
|
ashishashish
Constraint Violating Yak Guru
408 Posts |
Posted - 2009-01-20 : 03:17:36
|
quote: Originally posted by Swati Jain
quote: Originally posted by Sudhindra What exactly are you trying to achieve, if you can just highlight that it would be easy to analyze what needs to be done here. what are you doing with the first select query? are you using the result in the stored procedure?
Hello All, Actually I am using sharepoint dataform view .Dataformview is binded with stored procedure output.As described in previous post.this SP has two select queriesfirst query gives the output values which are used in where clause of second select query.But when i bind this SP to dataformview I get only the output of firstquery which i dnt want as i want the output of second select querythts why i want to supress first select query output but as it gives the output values i cant remove it from SP.Pls tell me workaround?
Just Post Your SP.....there r lots of people to help u out,,,Thanks,,,,,, |
 |
|
|
|