Monday, March 26, 2012
How can I change the default identity_range value in Merge replication
goes offline for any length of time. The issue has to do with the setting of
the @.identity_range parameter for each article.
I am configuring the publication through the SQL Management Studio (server
is SQL 2005) and realise that I can run scripts and even alter the values
through the IDE.
What I want to do is change the default value that the IDE uses when it adds
the articles. The default seems to be 1000 which isn't really enough. We
would like to change the default to something like 10000
Does anybody know where SQL 2005 would store this value?
Thanks in advance,
Andrew Stanford
It is best that you not change meta data values in system tables. I'll
provide a way to change the indentiy range value for subscribers via the UI.
Since you already defined a merge publication, access the publication
properties by right clicking on the publication name under the
Replication:Local Publications node in SQL 2005 Management Studio. In the
left pane, select Articles. In the right pane, select the article you would
like to change the identity range values for. After highlighting the
article, use the Article Properties button. Scroll down to the identity
range management section and you should be able to change the Subscriber
Range Size value from 1000 to 10000. Hit OK, OK to confirm the changes.
Note that since you have an active merge publication already defined, the
subscriber will continue to use the old identity range values until they are
exhausted. The next time the merge agent requests a new ientitiy range from
the publisher, it will start using the new subscriber range value of 10000.
If you were to create a new publication, when you define the articles that
are in the publication you are able to drill into article properties and set
the subscriber range value to something other than 1000 up front.
Hope this helps,
Tom
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andrew Stanford" <andrew.stanford@.bakertilly.co.uk> wrote in message
news:uUeZt4j2FHA.956@.TK2MSFTNGP10.phx.gbl...
>I have set up Merge Replication and everything is fine until a subscriber
>goes offline for any length of time. The issue has to do with the setting
>of the @.identity_range parameter for each article.
> I am configuring the publication through the SQL Management Studio (server
> is SQL 2005) and realise that I can run scripts and even alter the values
> through the IDE.
> What I want to do is change the default value that the IDE uses when it
> adds the articles. The default seems to be 1000 which isn't really enough.
> We would like to change the default to something like 10000
> Does anybody know where SQL 2005 would store this value?
>
> Thanks in advance,
> Andrew Stanford
>
How can I change the CommandTimeout value?
When I try to execute a query and after 30 seconds the program sends me error :
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Exception Detail: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source error:
Line 550 Dim myDataSet as Dataset = New DataSet
Line 551 myDataSet = db.ExecuteDataSet(System.Data.CommanType.Text,NewSql) <== Error line
Line 552 i=myDataSet.Tables(0).Rows.Count
In my connection string I set the parameter "Connection Timeout" = 360 but it not works. ( In debug mode the value for db.GetConnection.ConnectionTimeout is the same(360) like the parameter timeout connection.
After many searchs I found the default value for CommandTimeout is 30 secs. Can I change this value ?
Any suggestion will be welcome.
I'm using FrameWork 1.1.
create a SqlCommand object and set the CommandTimeout on that.
Hope it helps
|||Klaus,
Do you have an example or reference in order to get the code?
Thanks in advance,
Juan Carlos
|||Ok. I found the example and the solution for my case is :
Dim myDataSet as Dataset = New DataSet
Dim cmd as DbCommandWrapper = db.GetSqlStringCommandWrapper(NewSql)
cmd.CommandTimeout = 180 (seconds) ==> 0 (zero) in order to wait for ever.
myDataSet = db.ExecuteDataSet(cmdl)
i=myDataSet.Tables(0).Rows.Count
If you want to review more of thishttp://msdn.microsoft.com/msdnmag/issues/05/08/DataPoints/
Klaus, I appreciate a lot your help.
Thanks
sql
How can I can rid of rows that have -1.#IND
want to run a query to find out which rows it is but I always get a divide
by zero error.
I tried select * from mytable where mycolumn/1 = 0Try:
DELETE
FROM YourTable
WHERE YourFloatCol < CAST(-9.9999999999999998E+37 AS FLOAT)
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Joe" <J_no_spam@._no_spam_Fishinbrain.com> wrote in message
news:%23yhdsoDRFHA.2384@.tk2msftngp13.phx.gbl...
> I have several rows that got imported into floats with the -1.#IND value.
I
> want to run a query to find out which rows it is but I always get a divide
> by zero error.
> I tried select * from mytable where mycolumn/1 = 0
>
>|||If I try:
select cast('-1.#IND' as float)
I get:
Server: Msg 8114, Level 16, State 5, Line 2
Error converting data type varchar to float.
What is the value that you want to use to filter the rows?
AMB
"Joe" wrote:
> I have several rows that got imported into floats with the -1.#IND value.
I
> want to run a query to find out which rows it is but I always get a divide
> by zero error.
> I tried select * from mytable where mycolumn/1 = 0
>
>|||"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:386B64F9-2E3C-4D90-BC38-E2DB3BA62478@.microsoft.com...
> If I try:
> select cast('-1.#IND' as float)
> I get:
> Server: Msg 8114, Level 16, State 5, Line 2
> Error converting data type varchar to float.
> What is the value that you want to use to filter the rows?
Alejandro,
I'm not sure how the OP got these values, or why SQL Server accepts
them, but I've had this issue in the past when working with the ATL OLE DB
libraries. If you forget to initialize a float before passing it in, that's
what you end up with (I think it's -infinity). It can be a real nightmare
to deal with... If you cast the values to VARCHAR, they show up as -1.#IND.
And at least in my case, SELECTing them w/o the CAST resulted in QA throwing
an error.
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--|||Adam,
Thanks for the explanation, it is very interesting.
AMB
"Adam Machanic" wrote:
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in messag
e
> news:386B64F9-2E3C-4D90-BC38-E2DB3BA62478@.microsoft.com...
> Alejandro,
> I'm not sure how the OP got these values, or why SQL Server accepts
> them, but I've had this issue in the past when working with the ATL OLE DB
> libraries. If you forget to initialize a float before passing it in, that
's
> what you end up with (I think it's -infinity). It can be a real nightmare
> to deal with... If you cast the values to VARCHAR, they show up as -1.#IND
.
> And at least in my case, SELECTing them w/o the CAST resulted in QA throwi
ng
> an error.
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.datamanipulation.net
> --
>
>|||Thanks Adam! In my case the values where NaN's but I was able to correct it
now.
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:ex4sruDRFHA.612@.TK2MSFTNGP14.phx.gbl...
> Try:
>
> DELETE
> FROM YourTable
> WHERE YourFloatCol < CAST(-9.9999999999999998E+37 AS FLOAT)
>
> --
> Adam Machanic
> SQL Server MVP
> http://www.datamanipulation.net
> --
>
> "Joe" <J_no_spam@._no_spam_Fishinbrain.com> wrote in message
> news:%23yhdsoDRFHA.2384@.tk2msftngp13.phx.gbl...
value.
> I
divide
>|||Joe,
In case you or anyone is still reading this thread, see
http://groups.google.co.uk/groups?q...ass+float_field
If you look at the IEEE floating point specification and at
CAST(YourFloatCol as binary(8)), you should be able to come up
with a way to filter these values out based on the binary value.
Steve Kass
Drew University
Joe wrote:
> Thanks Adam! In my case the values where NaN's but I was able to correct i
t
> now.
> "Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
> news:ex4sruDRFHA.612@.TK2MSFTNGP14.phx.gbl...
>
> value.
>
> divide
>
>
Wednesday, March 21, 2012
How can I assign a value to a textbox programmatically in a report?
=System.DateTime.Now
into the Textbox and set the Format (right-click->properties) to dd.MM.yyyy or your corresponding date-format
|||that's design time, what i'm trying to do is at run-time I want to assign a value to a particular textbox in the report. ΓΌ|||There is no way other than assigning a expression to the Textbox. The "MS Access way" doesn't work anymore ;(
You can do something like:
=iif( some_condition = true, System.DateTime.Now, "No Date")
or create your own function:
Add
Public Function myFunction(val as Object)
if val is Nothing then return System.DateTime.Now
return "Empty"
End Funcion
to Report-Properties->Code
and call it by
=Code.myFunction(Fields!ConditionColumn.Value)
|||ok thanks, i'll try your solution later. sql
Monday, March 19, 2012
how can I
in another trigger.Hi
Persist it to a table (not Temporary).
No global variables in SQL Server.
Regards
Mike
"seeker53" wrote:
> How can I get a value from a variable in one trigger to populate a variable
> in another trigger.|||You can't. Also, variables aren't very much use in a trigger. Don't assign
column values to variables in a trigger because that compels you to use
cursor processing to handle multiple row updates - or to disallow multi-row
updates altogether. Neither option is a good idea.
--
David Portas
SQL Server MVP
--
how can I
in another trigger.
Hi
Persist it to a table (not Temporary).
No global variables in SQL Server.
Regards
Mike
"seeker53" wrote:
> How can I get a value from a variable in one trigger to populate a variable
> in another trigger.
|||You can't. Also, variables aren't very much use in a trigger. Don't assign
column values to variables in a trigger because that compels you to use
cursor processing to handle multiple row updates - or to disallow multi-row
updates altogether. Neither option is a good idea.
David Portas
SQL Server MVP
how can I
in another trigger.Hi
Persist it to a table (not Temporary).
No global variables in SQL Server.
Regards
Mike
"seeker53" wrote:
> How can I get a value from a variable in one trigger to populate a variabl
e
> in another trigger.|||You can't. Also, variables aren't very much use in a trigger. Don't assign
column values to variables in a trigger because that compels you to use
cursor processing to handle multiple row updates - or to disallow multi-row
updates altogether. Neither option is a good idea.
David Portas
SQL Server MVP
--
How can change the visibillity of a Chart Data Field?
is it possible to toggle the visibillity of a char data item? Because if the
value is zero or null i dont want the column in the chart to be displayed.
Thanks alot
FlorianIf a datapoint value is null, it won't be displayed in the chart.
If you want to explicitly hide datapoint with other values (e.g. y-value =0), you can use an expression for the datapoint value similar to this to
replace the value with null (Nothing in VB): =iif(Fields!Y.Value = 0,
Nothing, Fields!Y.Value)
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Florian Kirchlechner" <Florian Kirchlechner@.discussions.microsoft.com>
wrote in message news:31A10DB1-6A82-4AE8-AF21-A4658087ADB5@.microsoft.com...
> Hi,
> is it possible to toggle the visibillity of a char data item? Because if
> the
> value is zero or null i dont want the column in the chart to be displayed.
> Thanks alot
> Florian|||Hi Robert,
thx for the reply - it really helped me :-)
But one more thing - can i hide the series label too? I tried it with your
suggestions but it didnt work.
Thanks and greets /Flo
"Robert Bruckner [MSFT]" wrote:
> If a datapoint value is null, it won't be displayed in the chart.
> If you want to explicitly hide datapoint with other values (e.g. y-value => 0), you can use an expression for the datapoint value similar to this to
> replace the value with null (Nothing in VB): =iif(Fields!Y.Value = 0,
> Nothing, Fields!Y.Value)
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Florian Kirchlechner" <Florian Kirchlechner@.discussions.microsoft.com>
> wrote in message news:31A10DB1-6A82-4AE8-AF21-A4658087ADB5@.microsoft.com...
> > Hi,
> >
> > is it possible to toggle the visibillity of a char data item? Because if
> > the
> > value is zero or null i dont want the column in the chart to be displayed.
> >
> > Thanks alot
> > Florian
>
>|||No, you cannot dynamically hide series labels. Did you look into adding a
filter on the dataset or the chart or the series grouping to filter out all
data points with values you don't want to show in the chart?
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Florian Kirchlechner" <FlorianKirchlechner@.discussions.microsoft.com> wrote
in message news:BA66D7C0-D108-4BF0-9474-D5DD2FADF994@.microsoft.com...
> Hi Robert,
> thx for the reply - it really helped me :-)
> But one more thing - can i hide the series label too? I tried it with
> your
> suggestions but it didnt work.
> Thanks and greets /Flo
> "Robert Bruckner [MSFT]" wrote:
>> If a datapoint value is null, it won't be displayed in the chart.
>> If you want to explicitly hide datapoint with other values (e.g. y-value
>> =>> 0), you can use an expression for the datapoint value similar to this to
>> replace the value with null (Nothing in VB): =iif(Fields!Y.Value = 0,
>> Nothing, Fields!Y.Value)
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Florian Kirchlechner" <Florian Kirchlechner@.discussions.microsoft.com>
>> wrote in message
>> news:31A10DB1-6A82-4AE8-AF21-A4658087ADB5@.microsoft.com...
>> > Hi,
>> >
>> > is it possible to toggle the visibillity of a char data item? Because
>> > if
>> > the
>> > value is zero or null i dont want the column in the chart to be
>> > displayed.
>> >
>> > Thanks alot
>> > Florian
>>|||Im looking for a method to filter the data points without a value and also to
not have their series labels displayed in the legend. Maybe i will overcome
that with manually generating the legend.
Thanks alot
Florian
"Robert Bruckner [MSFT]" wrote:
> No, you cannot dynamically hide series labels. Did you look into adding a
> filter on the dataset or the chart or the series grouping to filter out all
> data points with values you don't want to show in the chart?
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Florian Kirchlechner" <FlorianKirchlechner@.discussions.microsoft.com> wrote
> in message news:BA66D7C0-D108-4BF0-9474-D5DD2FADF994@.microsoft.com...
> > Hi Robert,
> > thx for the reply - it really helped me :-)
> > But one more thing - can i hide the series label too? I tried it with
> > your
> > suggestions but it didnt work.
> >
> > Thanks and greets /Flo
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> If a datapoint value is null, it won't be displayed in the chart.
> >> If you want to explicitly hide datapoint with other values (e.g. y-value
> >> => >> 0), you can use an expression for the datapoint value similar to this to
> >> replace the value with null (Nothing in VB): =iif(Fields!Y.Value = 0,
> >> Nothing, Fields!Y.Value)
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "Florian Kirchlechner" <Florian Kirchlechner@.discussions.microsoft.com>
> >> wrote in message
> >> news:31A10DB1-6A82-4AE8-AF21-A4658087ADB5@.microsoft.com...
> >> > Hi,
> >> >
> >> > is it possible to toggle the visibillity of a char data item? Because
> >> > if
> >> > the
> >> > value is zero or null i dont want the column in the chart to be
> >> > displayed.
> >> >
> >> > Thanks alot
> >> > Florian
> >>
> >>
> >>
>
>|||It may be easier to filter the chart series groups, but generating a custom
legend is also possible. This blog article including a sample should get you
started: http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Florian Kirchlechner" <FlorianKirchlechner@.discussions.microsoft.com> wrote
in message news:2EC010BC-D1BA-4F57-9F92-CE0CAF37F6A9@.microsoft.com...
> Im looking for a method to filter the data points without a value and also
> to
> not have their series labels displayed in the legend. Maybe i will
> overcome
> that with manually generating the legend.
> Thanks alot
> Florian
>
> "Robert Bruckner [MSFT]" wrote:
>> No, you cannot dynamically hide series labels. Did you look into adding a
>> filter on the dataset or the chart or the series grouping to filter out
>> all
>> data points with values you don't want to show in the chart?
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Florian Kirchlechner" <FlorianKirchlechner@.discussions.microsoft.com>
>> wrote
>> in message news:BA66D7C0-D108-4BF0-9474-D5DD2FADF994@.microsoft.com...
>> > Hi Robert,
>> > thx for the reply - it really helped me :-)
>> > But one more thing - can i hide the series label too? I tried it with
>> > your
>> > suggestions but it didnt work.
>> >
>> > Thanks and greets /Flo
>> >
>> > "Robert Bruckner [MSFT]" wrote:
>> >
>> >> If a datapoint value is null, it won't be displayed in the chart.
>> >> If you want to explicitly hide datapoint with other values (e.g.
>> >> y-value
>> >> =>> >> 0), you can use an expression for the datapoint value similar to this
>> >> to
>> >> replace the value with null (Nothing in VB): =iif(Fields!Y.Value = 0,
>> >> Nothing, Fields!Y.Value)
>> >>
>> >> -- Robert
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >>
>> >>
>> >> "Florian Kirchlechner" <Florian
>> >> Kirchlechner@.discussions.microsoft.com>
>> >> wrote in message
>> >> news:31A10DB1-6A82-4AE8-AF21-A4658087ADB5@.microsoft.com...
>> >> > Hi,
>> >> >
>> >> > is it possible to toggle the visibillity of a char data item?
>> >> > Because
>> >> > if
>> >> > the
>> >> > value is zero or null i dont want the column in the chart to be
>> >> > displayed.
>> >> >
>> >> > Thanks alot
>> >> > Florian
>> >>
>> >>
>> >>
>>|||Since you said there is not a way to dynamically hide a label, is there a way
to always hide a series label? I have one line that should not have a label,
but if I set the label to "=Nothing", "=System.DBNULL.Value", or just leave
it blank it puts something automatic like "Series3" -- how can I remove this?
-diana
"Robert Bruckner [MSFT]" wrote:
> No, you cannot dynamically hide series labels. Did you look into adding a
> filter on the dataset or the chart or the series grouping to filter out all
> data points with values you don't want to show in the chart?
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Florian Kirchlechner" <FlorianKirchlechner@.discussions.microsoft.com> wrote
> in message news:BA66D7C0-D108-4BF0-9474-D5DD2FADF994@.microsoft.com...
> > Hi Robert,
> > thx for the reply - it really helped me :-)
> > But one more thing - can i hide the series label too? I tried it with
> > your
> > suggestions but it didnt work.
> >
> > Thanks and greets /Flo
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> If a datapoint value is null, it won't be displayed in the chart.
> >> If you want to explicitly hide datapoint with other values (e.g. y-value
> >> => >> 0), you can use an expression for the datapoint value similar to this to
> >> replace the value with null (Nothing in VB): =iif(Fields!Y.Value = 0,
> >> Nothing, Fields!Y.Value)
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "Florian Kirchlechner" <Florian Kirchlechner@.discussions.microsoft.com>
> >> wrote in message
> >> news:31A10DB1-6A82-4AE8-AF21-A4658087ADB5@.microsoft.com...
> >> > Hi,
> >> >
> >> > is it possible to toggle the visibillity of a char data item? Because
> >> > if
> >> > the
> >> > value is zero or null i dont want the column in the chart to be
> >> > displayed.
> >> >
> >> > Thanks alot
> >> > Florian
> >>
> >>
> >>
>
>
Friday, March 9, 2012
how assign value to cursor using sp_executesql procedure
declare curQueryVehicleHave cursor for
exec sp_executesql @.strQueryVehicleHave
@.strQueryVehicleHave this string contain a queryMaybe someone can offer a better alternative, but as far as I know you can't do it that way. You will need to place the results of the EXEC into a #temp table and then use the #temp table as the source of your cursor.
At the risk of looking like an idiot, this is my testing code:
DECLARE @.myQuery nvarchar(800)
SET @.myQuery = 'select div_code from division'
DECLARE @.div_code varchar(10)
CREATE Table #Temp (div_code varchar(10))INSERT INTO #Temp (div_code) EXECUTE sp_executesql @.myQuery -- note that a table variable will not work here
DECLARE curQueryVehicleHave CURSOR FOR SELECT * FROM #TEMP
OPEN curQueryVehicleHave
FETCH NEXT FROM curQueryVehicleHave INTO @.div_code
WHILE @.@.FETCH_STATUS = 0
BEGIN
PRINT @.div_code
FETCH NEXT FROM curQueryVehicleHave INTO @.div_code
ENDCLOSE curQueryVehicleHave
DEALLOCATE curQueryVehicleHave
DROP TABLE #Temp
Terri|||I hate this about SQL Server. I'd like to see a syntax like
insert into TableName (Columns, ...)
select Columns, ...
from
exec StoredProc
Please SQL Server people?
Wednesday, March 7, 2012
how 2 insert the value from a SP into a tmp table
can any one advice me on how to insert the results of a SP into a temp
table
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!INSERT INTO #tmp (col1, col2, ...)
EXEC procname
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Emil Henrico" <emil@.interres.co.za> wrote in message
news:u%23myVz9HFHA.3332@.TK2MSFTNGP14.phx.gbl...
>
> can any one advice me on how to insert the results of a SP into a temp
> table
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Something like
[script]
create table #MyTable(column1,column2,...,columnX)
go
insert into #MyTable (column1,column2,...,columnX) exec MyProcedure
[/script]
Cristian Lefter, SQL Server MVP
"Emil Henrico" <emil@.interres.co.za> wrote in message
news:u%23myVz9HFHA.3332@.TK2MSFTNGP14.phx.gbl...
>
> can any one advice me on how to insert the results of a SP into a temp
> table
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Emil
INSERT INTO #Temp EXEC sp
"Emil Henrico" <emil@.interres.co.za> wrote in message
news:u%23myVz9HFHA.3332@.TK2MSFTNGP14.phx.gbl...
>
> can any one advice me on how to insert the results of a SP into a temp
> table
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||
evry ting

execp the SP returns 10 vals and i only need to use 2 of them...
how do i do that
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Delete the others from the table after the INSERT. Or, a nasty workaround, i
s to call back to the
SQL Server as a linked server using either OPENQUERY or OPENROWSET and do SE
LECT TOP 2 from that
table valued function.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Emil Henrico" <emil@.interres.co.za> wrote in message
news:u46$uU%23HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>
> evry ting

> execp the SP returns 10 vals and i only need to use 2 of them...
> how do i do that
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||let my try and explain better...itonly returns one row..with 10
Columns..i onle need 2 of those ..not all 10...
thisis my question ...
create table #test
( mktcode int, rttotal float,
)
insert into #test (mktcode, rttotal)
exec sp...but the reslut gives me culmun a,b,c,d,e,f,g,
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Well, with INSERT EXEC you get all. How about modifying the stored procedure
, or extracting the
relevant part of the procedure to make another suitable procedure. Or re-wri
te the procedure into a
table valued user defined function?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Emil Henrico" <emil@.interres.co.za> wrote in message
news:exVfFo%23HFHA.4076@.TK2MSFTNGP10.phx.gbl...
> let my try and explain better...itonly returns one row..with 10
> Columns..i onle need 2 of those ..not all 10...
> thisis my question ...
> create table #test
> ( mktcode int, rttotal float,
> )
> insert into #test (mktcode, rttotal)
> exec sp...but the reslut gives me culmun a,b,c,d,e,f,g,
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Create a temporary Table Variable, say @.Tmp,
Declare @.Tmp Table (
Col1 Varchar(20),
Col2 Varchar(20),
Col3 Varchar(20),
..
Col10 Varchar(20))
Only make the column definitions match the output of the stored proc.
Then Insert @.Tmp Exec SP -- This inserts all ten values into @.Tmp
Then Insert from @.tmp into your real table.
Insert #test (mktcode, rttotal)
Select Col3, Col 7 From @.tmp -- WHichever 2 columns you want
"Emil Henrico" wrote:
> let my try and explain better...itonly returns one row..with 10
> Columns..i onle need 2 of those ..not all 10...
> thisis my question ...
> create table #test
> ( mktcode int, rttotal float,
> )
> insert into #test (mktcode, rttotal)
> exec sp...but the reslut gives me culmun a,b,c,d,e,f,g,
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
>
How ?
How can i pass recordset as parameter in a SP Return value as a RecordSet ?u need not specify a parameter to retun a resultset. SP returns a resultset
if u query on a table in the SP
eg:
create Procedure retResultset
AS
SELECT * FROM <TABLE>
GO
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"DMP" wrote:
> Hi,
> How can i pass recordset as parameter in a SP Return value as a RecordSet
?
>
>|||Hi
No. SQL Server does not care about recordsets.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"DMP" wrote:
> Hi,
> How can i pass recordset as parameter in a SP Return value as a RecordSet
?
>
>|||About the best you could do is store the rows in a table with a key, and
pass the key to the SP, who then looks up the rows and does whatever...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"DMP" <debdulal.mahapatra@.fi-tek.co.in> wrote in message
news:OOkXkaNZFHA.612@.TK2MSFTNGP12.phx.gbl...
> Hi,
> How can i pass recordset as parameter in a SP Return value as a RecordSet
> ?
>
Monday, February 27, 2012
hotfix for: KB816939 (PRB: File Growth Value for TempDB is Not Per
Changed From Fixed Increments to Percentage):
Does anyone know if microsoft has included a fix for this in sp4, or has a
hotfix for this bug?
We tried the workaround listed in the KB, but it did not work...
Link:
http://support.microsoft.com/defaul...n-us;816939#kb4Can you give more info regarding how the work around did not work?
As far as I know the fix did not make it into SP4...
It is fixed in SQL 2005 though.
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Wayne" <Wayne@.discussions.microsoft.com> wrote in message
news:FF219273-52D1-42C0-8CE5-35CDF27E01BD@.microsoft.com...
> Regarding KB816939 (PRB: File Growth Value for TempDB is Not Persistent
When
> Changed From Fixed Increments to Percentage):
> Does anyone know if microsoft has included a fix for this in sp4, or has a
> hotfix for this bug?
> We tried the workaround listed in the KB, but it did not work...
> Link:
> http://support.microsoft.com/defaul...n-us;816939#kb4
hotfix for: KB816939 (PRB: File Growth Value for TempDB is Not Per
Changed From Fixed Increments to Percentage):
Does anyone know if microsoft has included a fix for this in sp4, or has a
hotfix for this bug?
We tried the workaround listed in the KB, but it did not work...
Link:
http://support.microsoft.com/default...-us;816939#kb4
Can you give more info regarding how the work around did not work?
As far as I know the fix did not make it into SP4...
It is fixed in SQL 2005 though.
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Wayne" <Wayne@.discussions.microsoft.com> wrote in message
news:FF219273-52D1-42C0-8CE5-35CDF27E01BD@.microsoft.com...
> Regarding KB816939 (PRB: File Growth Value for TempDB is Not Persistent
When
> Changed From Fixed Increments to Percentage):
> Does anyone know if microsoft has included a fix for this in sp4, or has a
> hotfix for this bug?
> We tried the workaround listed in the KB, but it did not work...
> Link:
> http://support.microsoft.com/default...-us;816939#kb4
hotfix for: KB816939 (PRB: File Growth Value for TempDB is Not Per
Changed From Fixed Increments to Percentage):
Does anyone know if microsoft has included a fix for this in sp4, or has a
hotfix for this bug?
We tried the workaround listed in the KB, but it did not work...
Link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;816939#kb4Can you give more info regarding how the work around did not work?
As far as I know the fix did not make it into SP4...
It is fixed in SQL 2005 though.
--
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
"Wayne" <Wayne@.discussions.microsoft.com> wrote in message
news:FF219273-52D1-42C0-8CE5-35CDF27E01BD@.microsoft.com...
> Regarding KB816939 (PRB: File Growth Value for TempDB is Not Persistent
When
> Changed From Fixed Increments to Percentage):
> Does anyone know if microsoft has included a fix for this in sp4, or has a
> hotfix for this bug?
> We tried the workaround listed in the KB, but it did not work...
> Link:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;816939#kb4