Hi, I have a series of columns which I need to be able to change the
background color of dynamically depending on a date which is computed
dynamically when the report is created.
I a using a textbox to display the dynamically calculated date
(e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
But I cannot seem to reference this textbox object at runtime.
I also need to know how to get the actual dayname given the calculated
date above.
Any ideas about how I can do this'
Thanks
MarkusOn Apr 11, 7:19 pm, Markus...@.gmail.com wrote:
> Hi, I have a series of columns which I need to be able to change the
> background color of dynamically depending on a date which is computed
> dynamically when the report is created.
> I a using a textbox to display the dynamically calculated date
> (e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
> But I cannot seem to reference this textbox object at runtime.
> I also need to know how to get the actual dayname given the calculated
> date above.
> Any ideas about how I can do this'
> Thanks
> Markus
You should use something like this in a new dataset that populates a
hidden report parameter:
SELECT DATENAME(DW, GETDATE())
Then reference the hidden parameter as part of the table's column
background property. Something like this should work:
=iif(Parameters!HiddenParameterName.Value = "Monday", "Red", "White")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Apr 12, 1:07 pm, "EMartinez" <emartinez...@.gmail.com> wrote:
> On Apr 11, 7:19 pm, Markus...@.gmail.com wrote:
>
>
> > Hi, I have a series of columns which I need to be able to change the
> > background color of dynamically depending on a date which is computed
> > dynamically when the report is created.
> > I a using a textbox to display the dynamically calculated date
> > (e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
> > But I cannot seem to reference this textbox object at runtime.
> > I also need to know how to get the actual dayname given the calculated
> > date above.
> > Any ideas about how I can do this'
> > Thanks
> > Markus
> You should use something like this in a new dataset that populates a
> hidden report parameter:
> SELECT DATENAME(DW, GETDATE())
> Then reference the hidden parameter as part of the table's column
> background property. Something like this should work:
> =iif(Parameters!HiddenParameterName.Value = "Monday", "Red", "White")
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant- Hide quoted text -
> - Show quoted text -
Thanks Enrique, I will give that a shot
Cheers
Markus|||On Apr 12, 5:00 pm, Markus...@.gmail.com wrote:
> On Apr 12, 1:07 pm, "EMartinez" <emartinez...@.gmail.com> wrote:
>
> > On Apr 11, 7:19 pm, Markus...@.gmail.com wrote:
> > > Hi, I have a series of columns which I need to be able to change the
> > > background color of dynamically depending on a date which is computed
> > > dynamically when the report is created.
> > > I a using a textbox to display the dynamically calculated date
> > > (e.g. =DateAdd(DateInterval.Day,5,Today).ToString("dd-MMM") )
> > > But I cannot seem to reference this textbox object at runtime.
> > > I also need to know how to get the actual dayname given the calculated
> > > date above.
> > > Any ideas about how I can do this'
> > > Thanks
> > > Markus
> > You should use something like this in a new dataset that populates a
> > hidden report parameter:
> > SELECT DATENAME(DW, GETDATE())
> > Then reference the hidden parameter as part of the table's column
> > background property. Something like this should work:
> > =iif(Parameters!HiddenParameterName.Value = "Monday", "Red", "White")
> > Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant- Hide quoted text -
> > - Show quoted text -
> Thanks Enrique, I will give that a shot
> Cheers
> Markus
You're welcome. Let me know if you need further assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
Showing posts with label depending. Show all posts
Showing posts with label depending. Show all posts
Thursday, March 22, 2012
Sunday, March 11, 2012
Changing Scale Minimum value on a Graph
How can we change in code the Scale Minimum value via code, depending
on the data in a dataset?
What I would like to beable to do is find the min. value in the dataset
and then set Scale Minimum valueBryan,
I had contacted Dundas support via email on this subject on 3/29 and they
said that it was not possible via the RS version and noted they don't provide
support for RS and directed me to Microsoft's forum websites.
"Bryan Avery" wrote:
> How can we change in code the Scale Minimum value via code, depending
> on the data in a dataset?
> What I would like to beable to do is find the min. value in the dataset
> and then set Scale Minimum value
>|||RS 2000: If you leave the Min value empty, the chart control will
"auto-scale" the minimum based on the actual data values.
RS 2005: you will be able to specify an expression for the min/max values.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"yrmeyer" <yrmeyer@.discussions.microsoft.com> wrote in message
news:6DDA957A-3D62-4CC9-87F9-7374DF9AA1C1@.microsoft.com...
> Bryan,
> I had contacted Dundas support via email on this subject on 3/29 and they
> said that it was not possible via the RS version and noted they don't
> provide
> support for RS and directed me to Microsoft's forum websites.
> "Bryan Avery" wrote:
>> How can we change in code the Scale Minimum value via code, depending
>> on the data in a dataset?
>> What I would like to beable to do is find the min. value in the dataset
>> and then set Scale Minimum value
>>
on the data in a dataset?
What I would like to beable to do is find the min. value in the dataset
and then set Scale Minimum valueBryan,
I had contacted Dundas support via email on this subject on 3/29 and they
said that it was not possible via the RS version and noted they don't provide
support for RS and directed me to Microsoft's forum websites.
"Bryan Avery" wrote:
> How can we change in code the Scale Minimum value via code, depending
> on the data in a dataset?
> What I would like to beable to do is find the min. value in the dataset
> and then set Scale Minimum value
>|||RS 2000: If you leave the Min value empty, the chart control will
"auto-scale" the minimum based on the actual data values.
RS 2005: you will be able to specify an expression for the min/max values.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"yrmeyer" <yrmeyer@.discussions.microsoft.com> wrote in message
news:6DDA957A-3D62-4CC9-87F9-7374DF9AA1C1@.microsoft.com...
> Bryan,
> I had contacted Dundas support via email on this subject on 3/29 and they
> said that it was not possible via the RS version and noted they don't
> provide
> support for RS and directed me to Microsoft's forum websites.
> "Bryan Avery" wrote:
>> How can we change in code the Scale Minimum value via code, depending
>> on the data in a dataset?
>> What I would like to beable to do is find the min. value in the dataset
>> and then set Scale Minimum value
>>
Thursday, March 8, 2012
Changing Report's Datasource
I have one report that I want to have the ability to use different stored
procedures...depending on the the user's criteria they want to see. Is there
an RS method that I can use to change the stored procedure that a report is
using at runtime, or is there a better way to do what I want to do?ALthough I have never tried this,,, you could create a single SP which calls
the other SPs based on the user... OR
in the data set you can put the T-SQL IF statement to choose the SP..
I suspect that the SPs need to return the same result sets however...
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Mike Collins" wrote:
> I have one report that I want to have the ability to use different stored
> procedures...depending on the the user's criteria they want to see. Is there
> an RS method that I can use to change the stored procedure that a report is
> using at runtime, or is there a better way to do what I want to do?
procedures...depending on the the user's criteria they want to see. Is there
an RS method that I can use to change the stored procedure that a report is
using at runtime, or is there a better way to do what I want to do?ALthough I have never tried this,,, you could create a single SP which calls
the other SPs based on the user... OR
in the data set you can put the T-SQL IF statement to choose the SP..
I suspect that the SPs need to return the same result sets however...
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Mike Collins" wrote:
> I have one report that I want to have the ability to use different stored
> procedures...depending on the the user's criteria they want to see. Is there
> an RS method that I can use to change the stored procedure that a report is
> using at runtime, or is there a better way to do what I want to do?
Wednesday, March 7, 2012
Changing parameter prompt depending on language
Hi,
is it possible to change the prompt for a parameter depending on the browser
language ?
Kind regardsNo, not at this time. You can use a linked report to customize the labels
per language.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"obeckers" <obeckers@.discussions.microsoft.com> wrote in message
news:655D999C-AA4A-46DC-8424-C20942F24230@.microsoft.com...
> Hi,
> is it possible to change the prompt for a parameter depending on the
> browser
> language ?
> Kind regards
>
is it possible to change the prompt for a parameter depending on the browser
language ?
Kind regardsNo, not at this time. You can use a linked report to customize the labels
per language.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"obeckers" <obeckers@.discussions.microsoft.com> wrote in message
news:655D999C-AA4A-46DC-8424-C20942F24230@.microsoft.com...
> Hi,
> is it possible to change the prompt for a parameter depending on the
> browser
> language ?
> Kind regards
>
Saturday, February 25, 2012
Changing ORDER BY
Hi All
win 2k pro sql 2k IIS 5 ASP-vbscript
I got a stored proc which basically returns a set of records depending
on a category ID (or all if passed ID =0) - see below
The FAQ Category below is retuned mostly order by Title but in some
other areas of my site I need to return it orded by CatID.
I was wondering whats the best way to do this as I cant seem to pass a
column name to the procedure and put "ORDER BY @.SortOrder"
These are the other ways I thought of.
1) create a new procedure the same with order by catID.
2) pass a number and use CASE - but I get error 1008
eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
I can see this becoming a common problem so wouldn't like to do #1
above as that would require alot of maintence to keep them the same if
I changed any of the table design.
Thanks for any help.
Al
CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
@.SelCatID TINYINT = 0
AS
SET NOCOUNT ON
-- Return all the FAQ Categories with Cat ID of the selected Category
SELECT CatID, ParentID, Title, FaqCount
FROM Help_FAQ_Categories
WHERE CatID= CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
ORDER BY Title
GOTry
ORDER BY CASE WHEN @.sort = 'col1' THEN col1 END ASC,
"Harag" <harag@.softhome.net> wrote in message
news:3v4mlvo18e9vbjisl08jqrs9m75pc240gd@.4ax.com...
> Hi All
> win 2k pro sql 2k IIS 5 ASP-vbscript
> I got a stored proc which basically returns a set of records depending
> on a category ID (or all if passed ID =0) - see below
> The FAQ Category below is retuned mostly order by Title but in some
> other areas of my site I need to return it orded by CatID.
> I was wondering whats the best way to do this as I cant seem to pass a
> column name to the procedure and put "ORDER BY @.SortOrder"
> These are the other ways I thought of.
> 1) create a new procedure the same with order by catID.
> 2) pass a number and use CASE - but I get error 1008
> eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
>
> I can see this becoming a common problem so wouldn't like to do #1
> above as that would require alot of maintence to keep them the same if
> I changed any of the table design.
> Thanks for any help.
> Al
>
> CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
> @.SelCatID TINYINT = 0
> AS
> SET NOCOUNT ON
> -- Return all the FAQ Categories with Cat ID of the selected Category
> SELECT CatID, ParentID, Title, FaqCount
> FROM Help_FAQ_Categories
> WHERE CatID=> CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
> ORDER BY Title
> GO
>|||Harag,
it is almost correct. However, you cannot mix data types without
explicit conversions. The typical solution to this type of problem is to
use an ORDER BY column for each sort order:
ORDER BY CASE WHEN @.Order=0 THEN Title END,
CASE WHEN @.Order=1 THEN CatID END
Gert-Jan
Harag wrote:
> Hi All
> win 2k pro sql 2k IIS 5 ASP-vbscript
> I got a stored proc which basically returns a set of records depending
> on a category ID (or all if passed ID =0) - see below
> The FAQ Category below is retuned mostly order by Title but in some
> other areas of my site I need to return it orded by CatID.
> I was wondering whats the best way to do this as I cant seem to pass a
> column name to the procedure and put "ORDER BY @.SortOrder"
> These are the other ways I thought of.
> 1) create a new procedure the same with order by catID.
> 2) pass a number and use CASE - but I get error 1008
> eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
> I can see this becoming a common problem so wouldn't like to do #1
> above as that would require alot of maintence to keep them the same if
> I changed any of the table design.
> Thanks for any help.
> Al
> CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
> @.SelCatID TINYINT = 0
> AS
> SET NOCOUNT ON
> -- Return all the FAQ Categories with Cat ID of the selected Category
> SELECT CatID, ParentID, Title, FaqCount
> FROM Help_FAQ_Categories
> WHERE CatID=> CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
> ORDER BY Title
> GO|||Cool thanks guys this is what I wanted and will save alot of
maintence. :)
Thanks again
Al
On Sun, 07 Sep 2003 14:01:35 +0200, Gert-Jan Strik
<sorry@.toomuchspamalready.nl> wrote:
>Harag,
>it is almost correct. However, you cannot mix data types without
>explicit conversions. The typical solution to this type of problem is to
>use an ORDER BY column for each sort order:
>ORDER BY CASE WHEN @.Order=0 THEN Title END,
> CASE WHEN @.Order=1 THEN CatID END
>Gert-Jan
>
>Harag wrote:
>> Hi All
>> win 2k pro sql 2k IIS 5 ASP-vbscript
>> I got a stored proc which basically returns a set of records depending
>> on a category ID (or all if passed ID =0) - see below
>> The FAQ Category below is retuned mostly order by Title but in some
>> other areas of my site I need to return it orded by CatID.
>> I was wondering whats the best way to do this as I cant seem to pass a
>> column name to the procedure and put "ORDER BY @.SortOrder"
>> These are the other ways I thought of.
>> 1) create a new procedure the same with order by catID.
>> 2) pass a number and use CASE - but I get error 1008
>> eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
>> I can see this becoming a common problem so wouldn't like to do #1
>> above as that would require alot of maintence to keep them the same if
>> I changed any of the table design.
>> Thanks for any help.
>> Al
>> CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
>> @.SelCatID TINYINT = 0
>> AS
>> SET NOCOUNT ON
>> -- Return all the FAQ Categories with Cat ID of the selected Category
>> SELECT CatID, ParentID, Title, FaqCount
>> FROM Help_FAQ_Categories
>> WHERE CatID=>> CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
>> ORDER BY Title
>> GO
win 2k pro sql 2k IIS 5 ASP-vbscript
I got a stored proc which basically returns a set of records depending
on a category ID (or all if passed ID =0) - see below
The FAQ Category below is retuned mostly order by Title but in some
other areas of my site I need to return it orded by CatID.
I was wondering whats the best way to do this as I cant seem to pass a
column name to the procedure and put "ORDER BY @.SortOrder"
These are the other ways I thought of.
1) create a new procedure the same with order by catID.
2) pass a number and use CASE - but I get error 1008
eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
I can see this becoming a common problem so wouldn't like to do #1
above as that would require alot of maintence to keep them the same if
I changed any of the table design.
Thanks for any help.
Al
CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
@.SelCatID TINYINT = 0
AS
SET NOCOUNT ON
-- Return all the FAQ Categories with Cat ID of the selected Category
SELECT CatID, ParentID, Title, FaqCount
FROM Help_FAQ_Categories
WHERE CatID= CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
ORDER BY Title
GOTry
ORDER BY CASE WHEN @.sort = 'col1' THEN col1 END ASC,
"Harag" <harag@.softhome.net> wrote in message
news:3v4mlvo18e9vbjisl08jqrs9m75pc240gd@.4ax.com...
> Hi All
> win 2k pro sql 2k IIS 5 ASP-vbscript
> I got a stored proc which basically returns a set of records depending
> on a category ID (or all if passed ID =0) - see below
> The FAQ Category below is retuned mostly order by Title but in some
> other areas of my site I need to return it orded by CatID.
> I was wondering whats the best way to do this as I cant seem to pass a
> column name to the procedure and put "ORDER BY @.SortOrder"
> These are the other ways I thought of.
> 1) create a new procedure the same with order by catID.
> 2) pass a number and use CASE - but I get error 1008
> eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
>
> I can see this becoming a common problem so wouldn't like to do #1
> above as that would require alot of maintence to keep them the same if
> I changed any of the table design.
> Thanks for any help.
> Al
>
> CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
> @.SelCatID TINYINT = 0
> AS
> SET NOCOUNT ON
> -- Return all the FAQ Categories with Cat ID of the selected Category
> SELECT CatID, ParentID, Title, FaqCount
> FROM Help_FAQ_Categories
> WHERE CatID=> CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
> ORDER BY Title
> GO
>|||Harag,
it is almost correct. However, you cannot mix data types without
explicit conversions. The typical solution to this type of problem is to
use an ORDER BY column for each sort order:
ORDER BY CASE WHEN @.Order=0 THEN Title END,
CASE WHEN @.Order=1 THEN CatID END
Gert-Jan
Harag wrote:
> Hi All
> win 2k pro sql 2k IIS 5 ASP-vbscript
> I got a stored proc which basically returns a set of records depending
> on a category ID (or all if passed ID =0) - see below
> The FAQ Category below is retuned mostly order by Title but in some
> other areas of my site I need to return it orded by CatID.
> I was wondering whats the best way to do this as I cant seem to pass a
> column name to the procedure and put "ORDER BY @.SortOrder"
> These are the other ways I thought of.
> 1) create a new procedure the same with order by catID.
> 2) pass a number and use CASE - but I get error 1008
> eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
> I can see this becoming a common problem so wouldn't like to do #1
> above as that would require alot of maintence to keep them the same if
> I changed any of the table design.
> Thanks for any help.
> Al
> CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
> @.SelCatID TINYINT = 0
> AS
> SET NOCOUNT ON
> -- Return all the FAQ Categories with Cat ID of the selected Category
> SELECT CatID, ParentID, Title, FaqCount
> FROM Help_FAQ_Categories
> WHERE CatID=> CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
> ORDER BY Title
> GO|||Cool thanks guys this is what I wanted and will save alot of
maintence. :)
Thanks again
Al
On Sun, 07 Sep 2003 14:01:35 +0200, Gert-Jan Strik
<sorry@.toomuchspamalready.nl> wrote:
>Harag,
>it is almost correct. However, you cannot mix data types without
>explicit conversions. The typical solution to this type of problem is to
>use an ORDER BY column for each sort order:
>ORDER BY CASE WHEN @.Order=0 THEN Title END,
> CASE WHEN @.Order=1 THEN CatID END
>Gert-Jan
>
>Harag wrote:
>> Hi All
>> win 2k pro sql 2k IIS 5 ASP-vbscript
>> I got a stored proc which basically returns a set of records depending
>> on a category ID (or all if passed ID =0) - see below
>> The FAQ Category below is retuned mostly order by Title but in some
>> other areas of my site I need to return it orded by CatID.
>> I was wondering whats the best way to do this as I cant seem to pass a
>> column name to the procedure and put "ORDER BY @.SortOrder"
>> These are the other ways I thought of.
>> 1) create a new procedure the same with order by catID.
>> 2) pass a number and use CASE - but I get error 1008
>> eg ORDER BY CASE WHEN @.Order=0 THEN Title ELSE CatID END
>> I can see this becoming a common problem so wouldn't like to do #1
>> above as that would require alot of maintence to keep them the same if
>> I changed any of the table design.
>> Thanks for any help.
>> Al
>> CREATE PROCEDURE dbo.usp_Help_FindFAQCategoryByCatID
>> @.SelCatID TINYINT = 0
>> AS
>> SET NOCOUNT ON
>> -- Return all the FAQ Categories with Cat ID of the selected Category
>> SELECT CatID, ParentID, Title, FaqCount
>> FROM Help_FAQ_Categories
>> WHERE CatID=>> CASE WHEN @.SelCatID=0 THEN CatID ELSE @.SelCatID END
>> ORDER BY Title
>> GO
Sunday, February 19, 2012
Changing Index Question
Hi All,
I'm trying to desgin a table that will reset the index depending on field
values. Example:
INDX Date1 NETID JunkField
-- -- -- --
1 05/05/05 USER1 1
2 05/05/05 USER1 1
3 05/05/05 USER1 1
1 05/05/05 USER2 1
1 05/06/05 USER2 1
Every time there is a new user NETID or the DATE1 values changes, the INDX
value should reset back to 1. Could someone provide me with a simple SQL
script. I'm new to this.
Thanks.Triggers may help you acheive this. Have a look at :-
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\tsq
lref.chm::/ts_create2_7eeq.htm
--
HTH
Ryan Waight, MCDBA, MCSE
"JackV" <vituja@.consumer.org> wrote in message
news:%23guTPiRgDHA.620@.TK2MSFTNGP11.phx.gbl...
> Hi All,
> I'm trying to desgin a table that will reset the index depending on field
> values. Example:
> INDX Date1 NETID JunkField
> -- -- -- --
> 1 05/05/05 USER1 1
> 2 05/05/05 USER1 1
> 3 05/05/05 USER1 1
> 1 05/05/05 USER2 1
> 1 05/06/05 USER2 1
> Every time there is a new user NETID or the DATE1 values changes, the INDX
> value should reset back to 1. Could someone provide me with a simple SQL
> script. I'm new to this.
> Thanks.
>|||Hi Ryan,
The link doesn't seem to work. Can you resend it. Thanks.
"Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> wrote in message
news:eO0gI9RgDHA.2292@.TK2MSFTNGP10.phx.gbl...
> Triggers may help you acheive this. Have a look at :-
>
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\tsq
> lref.chm::/ts_create2_7eeq.htm
> --
> HTH
> Ryan Waight, MCDBA, MCSE
> "JackV" <vituja@.consumer.org> wrote in message
> news:%23guTPiRgDHA.620@.TK2MSFTNGP11.phx.gbl...
> > Hi All,
> >
> > I'm trying to desgin a table that will reset the index depending on
field
> > values. Example:
> >
> > INDX Date1 NETID JunkField
> > -- -- -- --
> > 1 05/05/05 USER1 1
> > 2 05/05/05 USER1 1
> > 3 05/05/05 USER1 1
> > 1 05/05/05 USER2 1
> > 1 05/06/05 USER2 1
> >
> > Every time there is a new user NETID or the DATE1 values changes, the
INDX
> > value should reset back to 1. Could someone provide me with a simple
SQL
> > script. I'm new to this.
> >
> > Thanks.
> >
> >
>
I'm trying to desgin a table that will reset the index depending on field
values. Example:
INDX Date1 NETID JunkField
-- -- -- --
1 05/05/05 USER1 1
2 05/05/05 USER1 1
3 05/05/05 USER1 1
1 05/05/05 USER2 1
1 05/06/05 USER2 1
Every time there is a new user NETID or the DATE1 values changes, the INDX
value should reset back to 1. Could someone provide me with a simple SQL
script. I'm new to this.
Thanks.Triggers may help you acheive this. Have a look at :-
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\tsq
lref.chm::/ts_create2_7eeq.htm
--
HTH
Ryan Waight, MCDBA, MCSE
"JackV" <vituja@.consumer.org> wrote in message
news:%23guTPiRgDHA.620@.TK2MSFTNGP11.phx.gbl...
> Hi All,
> I'm trying to desgin a table that will reset the index depending on field
> values. Example:
> INDX Date1 NETID JunkField
> -- -- -- --
> 1 05/05/05 USER1 1
> 2 05/05/05 USER1 1
> 3 05/05/05 USER1 1
> 1 05/05/05 USER2 1
> 1 05/06/05 USER2 1
> Every time there is a new user NETID or the DATE1 values changes, the INDX
> value should reset back to 1. Could someone provide me with a simple SQL
> script. I'm new to this.
> Thanks.
>|||Hi Ryan,
The link doesn't seem to work. Can you resend it. Thanks.
"Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> wrote in message
news:eO0gI9RgDHA.2292@.TK2MSFTNGP10.phx.gbl...
> Triggers may help you acheive this. Have a look at :-
>
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\tsq
> lref.chm::/ts_create2_7eeq.htm
> --
> HTH
> Ryan Waight, MCDBA, MCSE
> "JackV" <vituja@.consumer.org> wrote in message
> news:%23guTPiRgDHA.620@.TK2MSFTNGP11.phx.gbl...
> > Hi All,
> >
> > I'm trying to desgin a table that will reset the index depending on
field
> > values. Example:
> >
> > INDX Date1 NETID JunkField
> > -- -- -- --
> > 1 05/05/05 USER1 1
> > 2 05/05/05 USER1 1
> > 3 05/05/05 USER1 1
> > 1 05/05/05 USER2 1
> > 1 05/06/05 USER2 1
> >
> > Every time there is a new user NETID or the DATE1 values changes, the
INDX
> > value should reset back to 1. Could someone provide me with a simple
SQL
> > script. I'm new to this.
> >
> > Thanks.
> >
> >
>
Tuesday, February 14, 2012
Changing Default Names
I am planning to change the default names from
'DF__tablename__columnname_28F7FFC9'to
'tablename_columnname_df'.
Depending on the number of default columns 'df1, df2,
df3 ....e.t.c' will be added.
I am going to rename them in the 'sysobjects' table where
I see the only location for them.
Is there any side effects to this ?.
Thanks for any help.Hard to say if there are side effects; it's not the supported way of
renaming objects. Instead, use sp_rename. Look up syntax in BOL.
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1444801c4182b$45f41160$a601280a@.phx
.gbl...
> I am planning to change the default names from
> 'DF__tablename__columnname_28F7FFC9'to
> 'tablename_columnname_df'.
> Depending on the number of default columns 'df1, df2,
> df3 ....e.t.c' will be added.
> I am going to rename them in the 'sysobjects' table where
> I see the only location for them.
> Is there any side effects to this ?.
> Thanks for any help.|||I can not use sp_rename because the defaults are not
recognized as objects.
>--Original Message--
>Hard to say if there are side effects; it's not the
supported way of
>renaming objects. Instead, use sp_rename. Look up
syntax in BOL.
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1444801c4182b$45f41160$a601280a@.phx
.gbl...
where
>
>.
>|||It works for me... Does the following work for you:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b check (id = 1)
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1722a01c4182f$5d987aa0$a401280a@.phx
.gbl...
> I can not use sp_rename because the defaults are not
> recognized as objects.
>
> supported way of
> syntax in BOL.
> message
> where|||sorry, that was a CHECK constraint... here's a default:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b default (1) for id
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Adam Machanic" <amachanic@.air-worldwide.nospamallowed.com> wrote in message
news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
> It works for me... Does the following work for you:
>
> create table a(id int)
> GO
> create table b (id int)
> GO
> alter table b add constraint r_b check (id = 1)
> GO
> sp_rename 'r_b', 'r_c', 'object'
> GO
> "Dave" <anonymous@.discussions.microsoft.com> wrote in message
> news:1722a01c4182f$5d987aa0$a401280a@.phx
.gbl...
>|||NO. Here is what I am running:
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
i_df', 'object'
Here is what I get:
Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
Line 223
Either the parameter @.objname is ambiguous or the claimed
@.objtype (object) is wrong.
>--Original Message--
>sorry, that was a CHECK constraint... here's a default:
>
>create table a(id int)
>GO
>create table b (id int)
>GO
>alter table b add constraint r_b default (1) for id
>GO
>sp_rename 'r_b', 'r_c', 'object'
>GO
>"Adam Machanic" <amachanic@.air-
worldwide.nospamallowed.com> wrote in message
>news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
message
df2,
>
>.
>|||I just tried the same thing on my server, with no problem. Created the
default using the DEFAULT(n) syntax...
What version are you running?
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,|||Hi Dave
Is it possible the constraint has a different owner than the user you are
currently connected as?
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,|||I am connecting as sysadmin.
>--Original Message--
>Hi Dave
>Is it possible the constraint has a different owner than
the user you are
>currently connected as?
>--
>HTH
>--
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>|||SQL Server 2000 SP3.
>--Original Message--
>I just tried the same thing on my server, with no
problem. Created the
>default using the DEFAULT(n) syntax...
>What version are you running?
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>
'DF__tablename__columnname_28F7FFC9'to
'tablename_columnname_df'.
Depending on the number of default columns 'df1, df2,
df3 ....e.t.c' will be added.
I am going to rename them in the 'sysobjects' table where
I see the only location for them.
Is there any side effects to this ?.
Thanks for any help.Hard to say if there are side effects; it's not the supported way of
renaming objects. Instead, use sp_rename. Look up syntax in BOL.
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1444801c4182b$45f41160$a601280a@.phx
.gbl...
> I am planning to change the default names from
> 'DF__tablename__columnname_28F7FFC9'to
> 'tablename_columnname_df'.
> Depending on the number of default columns 'df1, df2,
> df3 ....e.t.c' will be added.
> I am going to rename them in the 'sysobjects' table where
> I see the only location for them.
> Is there any side effects to this ?.
> Thanks for any help.|||I can not use sp_rename because the defaults are not
recognized as objects.
>--Original Message--
>Hard to say if there are side effects; it's not the
supported way of
>renaming objects. Instead, use sp_rename. Look up
syntax in BOL.
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1444801c4182b$45f41160$a601280a@.phx
.gbl...
where
>
>.
>|||It works for me... Does the following work for you:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b check (id = 1)
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1722a01c4182f$5d987aa0$a401280a@.phx
.gbl...
> I can not use sp_rename because the defaults are not
> recognized as objects.
>
> supported way of
> syntax in BOL.
> message
> where|||sorry, that was a CHECK constraint... here's a default:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b default (1) for id
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Adam Machanic" <amachanic@.air-worldwide.nospamallowed.com> wrote in message
news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
> It works for me... Does the following work for you:
>
> create table a(id int)
> GO
> create table b (id int)
> GO
> alter table b add constraint r_b check (id = 1)
> GO
> sp_rename 'r_b', 'r_c', 'object'
> GO
> "Dave" <anonymous@.discussions.microsoft.com> wrote in message
> news:1722a01c4182f$5d987aa0$a401280a@.phx
.gbl...
>|||NO. Here is what I am running:
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
i_df', 'object'
Here is what I get:
Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
Line 223
Either the parameter @.objname is ambiguous or the claimed
@.objtype (object) is wrong.
>--Original Message--
>sorry, that was a CHECK constraint... here's a default:
>
>create table a(id int)
>GO
>create table b (id int)
>GO
>alter table b add constraint r_b default (1) for id
>GO
>sp_rename 'r_b', 'r_c', 'object'
>GO
>"Adam Machanic" <amachanic@.air-
worldwide.nospamallowed.com> wrote in message
>news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
message
df2,
>
>.
>|||I just tried the same thing on my server, with no problem. Created the
default using the DEFAULT(n) syntax...
What version are you running?
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,|||Hi Dave
Is it possible the constraint has a different owner than the user you are
currently connected as?
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,|||I am connecting as sysadmin.
>--Original Message--
>Hi Dave
>Is it possible the constraint has a different owner than
the user you are
>currently connected as?
>--
>HTH
>--
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>|||SQL Server 2000 SP3.
>--Original Message--
>I just tried the same thing on my server, with no
problem. Created the
>default using the DEFAULT(n) syntax...
>What version are you running?
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1725d01c41833$5dffcb20$a401280a@.phx
.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>
Changing Default Names
I am planning to change the default names from
'DF__tablename__columnname_28F7FFC9'to
'tablename_columnname_df'.
Depending on the number of default columns 'df1, df2,
df3 ....e.t.c' will be added.
I am going to rename them in the 'sysobjects' table where
I see the only location for them.
Is there any side effects to this ?.
Thanks for any help.
Hard to say if there are side effects; it's not the supported way of
renaming objects. Instead, use sp_rename. Look up syntax in BOL.
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1444801c4182b$45f41160$a601280a@.phx.gbl...
> I am planning to change the default names from
> 'DF__tablename__columnname_28F7FFC9'to
> 'tablename_columnname_df'.
> Depending on the number of default columns 'df1, df2,
> df3 ....e.t.c' will be added.
> I am going to rename them in the 'sysobjects' table where
> I see the only location for them.
> Is there any side effects to this ?.
> Thanks for any help.
|||I can not use sp_rename because the defaults are not
recognized as objects.
>--Original Message--
>Hard to say if there are side effects; it's not the
supported way of
>renaming objects. Instead, use sp_rename. Look up
syntax in BOL.
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1444801c4182b$45f41160$a601280a@.phx.gbl...
where
>
>.
>
|||It works for me... Does the following work for you:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b check (id = 1)
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1722a01c4182f$5d987aa0$a401280a@.phx.gbl...
> I can not use sp_rename because the defaults are not
> recognized as objects.
>
> supported way of
> syntax in BOL.
> message
> where
|||sorry, that was a CHECK constraint... here's a default:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b default (1) for id
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Adam Machanic" <amachanic@.air-worldwide.nospamallowed.com> wrote in message
news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
> It works for me... Does the following work for you:
>
> create table a(id int)
> GO
> create table b (id int)
> GO
> alter table b add constraint r_b check (id = 1)
> GO
> sp_rename 'r_b', 'r_c', 'object'
> GO
> "Dave" <anonymous@.discussions.microsoft.com> wrote in message
> news:1722a01c4182f$5d987aa0$a401280a@.phx.gbl...
>
|||NO. Here is what I am running:
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
i_df', 'object'
Here is what I get:
Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
Line 223
Either the parameter @.objname is ambiguous or the claimed
@.objtype (object) is wrong.
>--Original Message--
>sorry, that was a CHECK constraint... here's a default:
>
>create table a(id int)
>GO
>create table b (id int)
>GO
>alter table b add constraint r_b default (1) for id
>GO
>sp_rename 'r_b', 'r_c', 'object'
>GO
>"Adam Machanic" <amachanic@.air-
worldwide.nospamallowed.com> wrote in message
>news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
message
df2,
>
>.
>
|||I just tried the same thing on my server, with no problem. Created the
default using the DEFAULT(n) syntax...
What version are you running?
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,
|||Hi Dave
Is it possible the constraint has a different owner than the user you are
currently connected as?
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,
|||I am connecting as sysadmin.
>--Original Message--
>Hi Dave
>Is it possible the constraint has a different owner than
the user you are
>currently connected as?
>--
>HTH
>--
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>
|||SQL Server 2000 SP3.
>--Original Message--
>I just tried the same thing on my server, with no
problem. Created the
>default using the DEFAULT(n) syntax...
>What version are you running?
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>
'DF__tablename__columnname_28F7FFC9'to
'tablename_columnname_df'.
Depending on the number of default columns 'df1, df2,
df3 ....e.t.c' will be added.
I am going to rename them in the 'sysobjects' table where
I see the only location for them.
Is there any side effects to this ?.
Thanks for any help.
Hard to say if there are side effects; it's not the supported way of
renaming objects. Instead, use sp_rename. Look up syntax in BOL.
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1444801c4182b$45f41160$a601280a@.phx.gbl...
> I am planning to change the default names from
> 'DF__tablename__columnname_28F7FFC9'to
> 'tablename_columnname_df'.
> Depending on the number of default columns 'df1, df2,
> df3 ....e.t.c' will be added.
> I am going to rename them in the 'sysobjects' table where
> I see the only location for them.
> Is there any side effects to this ?.
> Thanks for any help.
|||I can not use sp_rename because the defaults are not
recognized as objects.
>--Original Message--
>Hard to say if there are side effects; it's not the
supported way of
>renaming objects. Instead, use sp_rename. Look up
syntax in BOL.
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1444801c4182b$45f41160$a601280a@.phx.gbl...
where
>
>.
>
|||It works for me... Does the following work for you:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b check (id = 1)
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1722a01c4182f$5d987aa0$a401280a@.phx.gbl...
> I can not use sp_rename because the defaults are not
> recognized as objects.
>
> supported way of
> syntax in BOL.
> message
> where
|||sorry, that was a CHECK constraint... here's a default:
create table a(id int)
GO
create table b (id int)
GO
alter table b add constraint r_b default (1) for id
GO
sp_rename 'r_b', 'r_c', 'object'
GO
"Adam Machanic" <amachanic@.air-worldwide.nospamallowed.com> wrote in message
news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
> It works for me... Does the following work for you:
>
> create table a(id int)
> GO
> create table b (id int)
> GO
> alter table b add constraint r_b check (id = 1)
> GO
> sp_rename 'r_b', 'r_c', 'object'
> GO
> "Dave" <anonymous@.discussions.microsoft.com> wrote in message
> news:1722a01c4182f$5d987aa0$a401280a@.phx.gbl...
>
|||NO. Here is what I am running:
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
i_df', 'object'
Here is what I get:
Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
Line 223
Either the parameter @.objname is ambiguous or the claimed
@.objtype (object) is wrong.
>--Original Message--
>sorry, that was a CHECK constraint... here's a default:
>
>create table a(id int)
>GO
>create table b (id int)
>GO
>alter table b add constraint r_b default (1) for id
>GO
>sp_rename 'r_b', 'r_c', 'object'
>GO
>"Adam Machanic" <amachanic@.air-
worldwide.nospamallowed.com> wrote in message
>news:#oIt9BDGEHA.4044@.TK2MSFTNGP10.phx.gbl...
message
df2,
>
>.
>
|||I just tried the same thing on my server, with no problem. Created the
default using the DEFAULT(n) syntax...
What version are you running?
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,
|||Hi Dave
Is it possible the constraint has a different owner than the user you are
currently connected as?
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
> NO. Here is what I am running:
> sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
> i_df', 'object'
>
> Here is what I get:
> Server: Msg 15248, Level 11, State 1, Procedure sp_rename,
> Line 223
> Either the parameter @.objname is ambiguous or the claimed
> @.objtype (object) is wrong.
>
> worldwide.nospamallowed.com> wrote in message
> message
> df2,
|||I am connecting as sysadmin.
>--Original Message--
>Hi Dave
>Is it possible the constraint has a different owner than
the user you are
>currently connected as?
>--
>HTH
>--
>Kalen Delaney
>SQL Server MVP
>www.SolidQualityLearning.com
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>
|||SQL Server 2000 SP3.
>--Original Message--
>I just tried the same thing on my server, with no
problem. Created the
>default using the DEFAULT(n) syntax...
>What version are you running?
>
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1725d01c41833$5dffcb20$a401280a@.phx.gbl...
sp_rename 'DF__admuserpr__origi__2B0043CC', 'admuserpr_orig
sp_rename,
claimed
not
the
up
wrote in
table
>
>.
>
Subscribe to:
Comments (Atom)