Showing posts with label advance. Show all posts
Showing posts with label advance. Show all posts

Thursday, March 8, 2012

Columns from rows

Hello,
I trying to make columns from rows? How do I do that? I am using SQL Server 2000.
I thank in advance anyone capable of helping me.
E. Woods

Hi,

take a look here (http://www.aspfaq.com/show.asp?id=2462)

Denis the SQL Menace

http://sqlservercode.blogspot.com/

|||Thanks!

Saturday, February 25, 2012

Column name or number of supplied values...

Greetings
Appologies in advance as this is a bit of a newbie question as I have just
started playing with 2005 replication.
I am getting the error
Column name or number of supplied values does not match table definition.
I began ok by setting up replication between 2 servers on the same network.
It replicated some data across ok but I noticed that some tables did not
replicate. When I looked deeper at the articles it said that they can't
replicate because they didn't have a primary key. Ok so I modified the table
in the GUI and added the primary key (it is an identity column) and then the
replication error appeared for the stored procedure that adds entries to
that table.
I then did some looking around and found others had had similar problems. It
looks like I went about it the wrong way (newbie.newbie), so I thought, ok
I'll make sure all the primary keys are there first and then replicate. I
did this by deleting the subscriptions and disabling Pub&Dist, added the PK
and setup replication again. Error appears again.
I have tried numerous ways to "clean up" the Publisher/Distributor data and
remove the replication. While it all looks like it has been removed, if I
setup the replication again it seems to "know" about the previous problem
and my error message keeps appearing. I have even completely removed the
database I am replicating from the publisher and subscriber machines, have
used the procedure in the BOL to disable Pub & Dist
(sp_removedbreplication,sp_dropdistpublisher,sp_dr opdistributiondb,sp_dropdistributor),
and done a full restore of the offending database, however next time I setup
the replication I get the same error.
I maybe off track and identity columns are a no-no?
Anyway sorry for the long winded story. Any help would be creatly
appreciated. I am thinking of doing a compete SQL Server reload as it is
only a test system, but if I don't have to....
Cheers
Peter Lock
PalaceSoftware, Canberra OZ
I think you need to either update your replication stored procedures for the
newly added pk, or update the tables at the subscriber. I think the best
thing to do would be to generate a new snapshot and redistribute it.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Peter" <palace@.internode.on.net> wrote in message
news:uFcN5QM7GHA.1252@.TK2MSFTNGP04.phx.gbl...
> Greetings
> Appologies in advance as this is a bit of a newbie question as I have just
> started playing with 2005 replication.
> I am getting the error
> Column name or number of supplied values does not match table definition.
> I began ok by setting up replication between 2 servers on the same
> network. It replicated some data across ok but I noticed that some tables
> did not replicate. When I looked deeper at the articles it said that they
> can't replicate because they didn't have a primary key. Ok so I modified
> the table in the GUI and added the primary key (it is an identity column)
> and then the replication error appeared for the stored procedure that adds
> entries to that table.
> I then did some looking around and found others had had similar problems.
> It looks like I went about it the wrong way (newbie.newbie), so I thought,
> ok I'll make sure all the primary keys are there first and then replicate.
> I did this by deleting the subscriptions and disabling Pub&Dist, added the
> PK and setup replication again. Error appears again.
> I have tried numerous ways to "clean up" the Publisher/Distributor data
> and remove the replication. While it all looks like it has been removed,
> if I setup the replication again it seems to "know" about the previous
> problem and my error message keeps appearing. I have even completely
> removed the database I am replicating from the publisher and subscriber
> machines, have used the procedure in the BOL to disable Pub & Dist
> (sp_removedbreplication,sp_dropdistpublisher,sp_dr opdistributiondb,sp_dropdistributor),
> and done a full restore of the offending database, however next time I
> setup the replication I get the same error.
> I maybe off track and identity columns are a no-no?
> Anyway sorry for the long winded story. Any help would be creatly
> appreciated. I am thinking of doing a compete SQL Server reload as it is
> only a test system, but if I don't have to....
> Cheers
> Peter Lock
> PalaceSoftware, Canberra OZ
>
|||Hi Hilary
Thank you for the prompt reply. I had already tried numerous new snapshots
and reloads, however I think I have worked out where the problem is (at
least it now replicates all articles without error). It looks like lazy mans
T-SQL is the problem.
I had a table with 2 columns ID (tinyint) as identity and ComputerName as
varchar(50). I set the PK in ID (which I didn't have before because I didn't
need it), and my stored procedure for adding a new entry was
INSERT Computers VALUES (@.ComputerName)
Once I changed my stored procedure to
INSERT Computers (ComputerName) VALUES (@.ComputerName)
the errors disappeared.
I'll give it a good test tonight and see how it goes.
Cheers
Peter Lock
PalaceSoftware, Canberra OZ
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uA%23LjfN7GHA.2288@.TK2MSFTNGP05.phx.gbl...
>I think you need to either update your replication stored procedures for
>the newly added pk, or update the tables at the subscriber. I think the
>best thing to do would be to generate a new snapshot and redistribute it.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Peter" <palace@.internode.on.net> wrote in message
> news:uFcN5QM7GHA.1252@.TK2MSFTNGP04.phx.gbl...
>
|||OK, I take it the errors were occurring on the publisher side, and in this
case were probably not replication related.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Peter" <palace@.internode.on.net> wrote in message
news:ugK3chP7GHA.3452@.TK2MSFTNGP05.phx.gbl...
> Hi Hilary
> Thank you for the prompt reply. I had already tried numerous new snapshots
> and reloads, however I think I have worked out where the problem is (at
> least it now replicates all articles without error). It looks like lazy
> mans T-SQL is the problem.
> I had a table with 2 columns ID (tinyint) as identity and ComputerName as
> varchar(50). I set the PK in ID (which I didn't have before because I
> didn't need it), and my stored procedure for adding a new entry was
> INSERT Computers VALUES (@.ComputerName)
> Once I changed my stored procedure to
> INSERT Computers (ComputerName) VALUES (@.ComputerName)
> the errors disappeared.
> I'll give it a good test tonight and see how it goes.
> Cheers
> Peter Lock
> PalaceSoftware, Canberra OZ
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uA%23LjfN7GHA.2288@.TK2MSFTNGP05.phx.gbl...
>

Tuesday, February 14, 2012

Colors in Charts

Hi Ng,
I was wondering if there is a way to change the colors of the bars in a
chart. Or the colors of the pieces in a cake chart?
Thank in Advance
G. SchmelzerYou can control this from Chart properties dialog -> Data tab -> Values ->
Edit... -> Edit Chart Value dialog -> Appearance tab -> Series Style...
button -> Fill tab.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Georg Schmelzer" <asdf@.adsf.de> wrote in message
news:e9XCdDGeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> Hi Ng,
> I was wondering if there is a way to change the colors of the bars in a
> chart. Or the colors of the pieces in a cake chart?
> Thank in Advance
> G. Schmelzer
>|||Note: this will require SP1 installed on clients (report designer) and
report server.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:%23%23UP63JeEHA.1692@.tk2msftngp13.phx.gbl...
> You can control this from Chart properties dialog -> Data tab -> Values ->
> Edit... -> Edit Chart Value dialog -> Appearance tab -> Series Style...
> button -> Fill tab.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> news:e9XCdDGeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > Hi Ng,
> >
> > I was wondering if there is a way to change the colors of the bars in a
> > chart. Or the colors of the pieces in a cake chart?
> >
> > Thank in Advance
> >
> > G. Schmelzer
> >
> >
>|||Thank You.
The specified color on the "fill tab" is used for all chart items (f.e. all
bars, cake pieces, etc...). Let's say I want to change the color of bar1 to
red, bar2 to green and bar3 to pink. I would be like a user designed
"palette". But I found no information wether or how I can do this. Any Idea?
Thanks in advance
G. Schmelzer
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> schrieb im
Newsbeitrag news:eqd%23A6KeEHA.592@.TK2MSFTNGP11.phx.gbl...
> Note: this will require SP1 installed on clients (report designer) and
> report server.
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
> news:%23%23UP63JeEHA.1692@.tk2msftngp13.phx.gbl...
> > You can control this from Chart properties dialog -> Data tab ->
Values ->
> > Edit... -> Edit Chart Value dialog -> Appearance tab -> Series Style...
> > button -> Fill tab.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> > news:e9XCdDGeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > Hi Ng,
> > >
> > > I was wondering if there is a way to change the colors of the bars in
a
> > > chart. Or the colors of the pieces in a cake chart?
> > >
> > > Thank in Advance
> > >
> > > G. Schmelzer
> > >
> > >
> >
> >
>|||Write an expression for Fill Color. You could use Choose() function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctchoose.asp.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Georg Schmelzer" <asdf@.adsf.de> wrote in message
news:%239AdRUheEHA.3412@.TK2MSFTNGP11.phx.gbl...
> Thank You.
>
> The specified color on the "fill tab" is used for all chart items (f.e.
all
> bars, cake pieces, etc...). Let's say I want to change the color of bar1
to
> red, bar2 to green and bar3 to pink. I would be like a user designed
> "palette". But I found no information wether or how I can do this. Any
Idea?
> Thanks in advance
> G. Schmelzer
>
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> schrieb im
> Newsbeitrag news:eqd%23A6KeEHA.592@.TK2MSFTNGP11.phx.gbl...
> > Note: this will require SP1 installed on clients (report designer) and
> > report server.
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in
message
> > news:%23%23UP63JeEHA.1692@.tk2msftngp13.phx.gbl...
> > > You can control this from Chart properties dialog -> Data tab ->
> Values ->
> > > Edit... -> Edit Chart Value dialog -> Appearance tab -> Series
Style...
> > > button -> Fill tab.
> > >
> > > --
> > > Ravi Mumulla (Microsoft)
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> > > news:e9XCdDGeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > Hi Ng,
> > > >
> > > > I was wondering if there is a way to change the colors of the bars
in
> a
> > > > chart. Or the colors of the pieces in a cake chart?
> > > >
> > > > Thank in Advance
> > > >
> > > > G. Schmelzer
> > > >
> > > >
> > >
> > >
> >
> >
>|||It worked out fine.
Thanks a lot to you guys!!!
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> schrieb im
Newsbeitrag news:%23GTGGNoeEHA.2396@.TK2MSFTNGP11.phx.gbl...
> Write an expression for Fill Color. You could use Choose() function:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctchoose.asp.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> news:%239AdRUheEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > Thank You.
> >
> >
> > The specified color on the "fill tab" is used for all chart items (f.e.
> all
> > bars, cake pieces, etc...). Let's say I want to change the color of bar1
> to
> > red, bar2 to green and bar3 to pink. I would be like a user designed
> > "palette". But I found no information wether or how I can do this. Any
> Idea?
> >
> > Thanks in advance
> >
> > G. Schmelzer
> >
> >
> > "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> schrieb im
> > Newsbeitrag news:eqd%23A6KeEHA.592@.TK2MSFTNGP11.phx.gbl...
> > > Note: this will require SP1 installed on clients (report designer) and
> > > report server.
> > >
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in
> message
> > > news:%23%23UP63JeEHA.1692@.tk2msftngp13.phx.gbl...
> > > > You can control this from Chart properties dialog -> Data tab ->
> > Values ->
> > > > Edit... -> Edit Chart Value dialog -> Appearance tab -> Series
> Style...
> > > > button -> Fill tab.
> > > >
> > > > --
> > > > Ravi Mumulla (Microsoft)
> > > > SQL Server Reporting Services
> > > >
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > > "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> > > > news:e9XCdDGeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > > Hi Ng,
> > > > >
> > > > > I was wondering if there is a way to change the colors of the bars
> in
> > a
> > > > > chart. Or the colors of the pieces in a cake chart?
> > > > >
> > > > > Thank in Advance
> > > > >
> > > > > G. Schmelzer
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Hi Ng,
I was wondering if there is a way to change the orientation of headings on
X-axis of a chart from horizontal to vertical?
Please reply on this site or at the foll: email id : sp_kamath@.hotmail.com
Thank in Advance
SPK|||In RS 2000 the orientation of x-axis labels is determined automatically
based on the amount of space available. If labels cannot be drawn
horizontally in one line, and also not in two lines, they will be rotated
by -90 degrees.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"SanjayK" <SanjayK@.discussions.microsoft.com> wrote in message
news:F876F44C-CEA6-4D90-9A73-A9C6721A563D@.microsoft.com...
> Hi Ng,
> I was wondering if there is a way to change the orientation of headings
on
> X-axis of a chart from horizontal to vertical?
> Please reply on this site or at the foll: email id : sp_kamath@.hotmail.com
> Thank in Advance
> SPK
>|||Hi Ng,
I was wondering if there is a way to display headings on Z axis of graph
since I am not getting any headings on this axis.
Please reply to this post or mail me at sp_kamath@.hotmail.com
Thank in Advance
Sanjay K|||Headings on the Z-axis are not available. You may want to look into using
the legend to provide a description for the series along the Z-axis.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"SanjayK" <SanjayK@.discussions.microsoft.com> wrote in message
news:596FB267-23AE-4D98-A399-B5C76AF50000@.microsoft.com...
> Hi Ng,
> I was wondering if there is a way to display headings on Z axis of graph
> since I am not getting any headings on this axis.
> Please reply to this post or mail me at sp_kamath@.hotmail.com
> Thank in Advance
> Sanjay K
>|||Hi,
Even i want different bars to have customized colors but i am unable to set
it. Ravi has asked to use choose function.But i am unable to use it. please
let me know how to use it. You can mail me at kiran_nandedkar@.rediffmail.com
or reply at same post
Thanks in advance
Kiran
"Georg Schmelzer" wrote:
> It worked out fine.
> Thanks a lot to you guys!!!
>
> "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> schrieb im
> Newsbeitrag news:%23GTGGNoeEHA.2396@.TK2MSFTNGP11.phx.gbl...
> > Write an expression for Fill Color. You could use Choose() function:
> >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctchoose.asp.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> > news:%239AdRUheEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > Thank You.
> > >
> > >
> > > The specified color on the "fill tab" is used for all chart items (f.e.
> > all
> > > bars, cake pieces, etc...). Let's say I want to change the color of bar1
> > to
> > > red, bar2 to green and bar3 to pink. I would be like a user designed
> > > "palette". But I found no information wether or how I can do this. Any
> > Idea?
> > >
> > > Thanks in advance
> > >
> > > G. Schmelzer
> > >
> > >
> > > "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> schrieb im
> > > Newsbeitrag news:eqd%23A6KeEHA.592@.TK2MSFTNGP11.phx.gbl...
> > > > Note: this will require SP1 installed on clients (report designer) and
> > > > report server.
> > > >
> > > > --
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > >
> > > >
> > > > "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in
> > message
> > > > news:%23%23UP63JeEHA.1692@.tk2msftngp13.phx.gbl...
> > > > > You can control this from Chart properties dialog -> Data tab ->
> > > Values ->
> > > > > Edit... -> Edit Chart Value dialog -> Appearance tab -> Series
> > Style...
> > > > > button -> Fill tab.
> > > > >
> > > > > --
> > > > > Ravi Mumulla (Microsoft)
> > > > > SQL Server Reporting Services
> > > > >
> > > > > This posting is provided "AS IS" with no warranties, and confers no
> > > > rights.
> > > > > "Georg Schmelzer" <asdf@.adsf.de> wrote in message
> > > > > news:e9XCdDGeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > > > Hi Ng,
> > > > > >
> > > > > > I was wondering if there is a way to change the colors of the bars
> > in
> > > a
> > > > > > chart. Or the colors of the pieces in a cake chart?
> > > > > >
> > > > > > Thank in Advance
> > > > > >
> > > > > > G. Schmelzer
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>