Showing posts with label customer. Show all posts
Showing posts with label customer. Show all posts

Friday, March 30, 2012

How to schedule report to run

Hello.
On a monthly basis I need to run a report. The report takes three
parameters: A customer ID, a Month, and a Year.
I want to run this report for every customer in our database and save each
report as a PDF on disk. Then I will store a link to the report in the
customer's "file".
Can this be done? How?
Thanks in advance,
MikeLook up Data-Driven Subscriptions in the docs. That'll be your starting
point. The link part is easy. :)
"MikeL" <MichaelLopez@.inds.com> wrote in message
news:OROPI5hOFHA.3808@.TK2MSFTNGP14.phx.gbl...
> Hello.
> On a monthly basis I need to run a report. The report takes three
> parameters: A customer ID, a Month, and a Year.
> I want to run this report for every customer in our database and save each
> report as a PDF on disk. Then I will store a link to the report in the
> customer's "file".
> Can this be done? How?
> Thanks in advance,
> Mike
>

Monday, March 12, 2012

How to return one xml doument per row

When I do something like "select * from customer for XML auto" I get a single
string containing the xml for all customers in the customer table. I want one
xml string (i.e., document) per row so I can process one document at a time.
Is this possible?
Use FOR XML Explicit. This query should be written in a specific way.
something like this:
select 1 as Tag,
null as Parent,
customers.customerID as [Customer!1!CustomerID!id]
from customers
for xml explicit
Please refer to "EXPLICIT mode" in Books online.
Regards,
Deepak
[I Code, therefore I am]
"ACROWN" wrote:

> When I do something like "select * from customer for XML auto" I get a single
> string containing the xml for all customers in the customer table. I want one
> xml string (i.e., document) per row so I can process one document at a time.
> Is this possible?
|||FOR XML (both auto and explicit mode) is a rowset to XML aggregator. In SQL
Server 2000, this aggregator can only aggregate all the rows.
In SQL Server 2005, you will be able to write something along the lines of
Create table t (id int, name varchar(5))
go
insert into t values (1, 'a')
insert into t values (1, 'b')
insert into t values (2, 'c')
select (select * from t t1 where t1.id = t2.id for xml raw('t'), type)
from t t2
group by t2.id
HTH
Michael
"ACROWN" <ACROWN@.discussions.microsoft.com> wrote in message
news:6D633481-D083-4A18-9FB5-37AA9258FEEE@.microsoft.com...
> When I do something like "select * from customer for XML auto" I get a
> single
> string containing the xml for all customers in the customer table. I want
> one
> xml string (i.e., document) per row so I can process one document at a
> time.
> Is this possible?

Wednesday, March 7, 2012

How to retrieve sa password on Win98?

Hi, we have a problem on a server of our customer running SQL Server
2000. That PC is connected to the Internet, and probably someone has
changed the sa password.
In fact, trying to connect to the sql server using "SQL Server
Enterprise Manager" results in this error message:
"A connection could not be established to SERVERNAME - Login failed for sa."
Query Analyzer instead gives: "Unable to connect to server. Server Msg
18456, Level 16, State 1. Login failed for user sa".
Searching on the net I have found a bunch of good ways to follow, even
if they all require to join into Windows as Administrator user (and
thus, using Windows Authentication mode).
However I can't proceed because the server that runs SQL Server is
Windows 98, thus Windows Authentication Mode is not available.
Can you help please?
TIA,
Paolo
Paolo wrote:

> Hi, we have a problem on a server of our customer running SQL Server
> 2000.
Hrm... sorry, I meant SQL Server 7 ;)
|||I was not aware that it is possible to install SQL Server on Windows 98.
Are you talking about MSDE? or perhaps the Developer Edition of SQL Server?
Since you did not take the appropriate steps to secure your "server" and you
already looked into other options but they will not work for you perhaps the
only option you have left is to contact Microsoft Support.
I do have one final idea: Shut down the "server" copy the database files,
and attach them to a new server. At least you will be able to access your
data.
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23EtmbfCkEHA.3160@.TK2MSFTNGP10.phx.gbl...
> Hi, we have a problem on a server of our customer running SQL Server
> 2000. That PC is connected to the Internet, and probably someone has
> changed the sa password.
> In fact, trying to connect to the sql server using "SQL Server
> Enterprise Manager" results in this error message:
> "A connection could not be established to SERVERNAME - Login failed for
sa."
> Query Analyzer instead gives: "Unable to connect to server. Server Msg
> 18456, Level 16, State 1. Login failed for user sa".
> Searching on the net I have found a bunch of good ways to follow, even
> if they all require to join into Windows as Administrator user (and
> thus, using Windows Authentication mode).
> However I can't proceed because the server that runs SQL Server is
> Windows 98, thus Windows Authentication Mode is not available.
> Can you help please?
> TIA,
> Paolo
|||Keith Kratochvil wrote:

> I do have one final idea: Shut down the "server" copy the database files,
> and attach them to a new server. At least you will be able to access your
> data.
>
Thanks for the suggestion, it worked!
I copied a pristine master database from a vanilla sql server
installation to the "locked" sql server, then the databases containing
datas has been attached using sp_attach_db.
Finally I have specified a non blank password for user sa...
Regards,
Paolo
|||I am glad that you were able to figure things out!
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23a6VLoOkEHA.3844@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Keith Kratochvil wrote:
files,[vbcol=seagreen]
your
> Thanks for the suggestion, it worked!
> I copied a pristine master database from a vanilla sql server
> installation to the "locked" sql server, then the databases containing
> datas has been attached using sp_attach_db.
> Finally I have specified a non blank password for user sa...
> Regards,
> Paolo

How to retrieve sa password on Win98?

Hi, we have a problem on a server of our customer running SQL Server
2000. That PC is connected to the Internet, and probably someone has
changed the sa password.
In fact, trying to connect to the sql server using "SQL Server
Enterprise Manager" results in this error message:
"A connection could not be established to SERVERNAME - Login failed for sa."
Query Analyzer instead gives: "Unable to connect to server. Server Msg
18456, Level 16, State 1. Login failed for user sa".
Searching on the net I have found a bunch of good ways to follow, even
if they all require to join into Windows as Administrator user (and
thus, using Windows Authentication mode).
However I can't proceed because the server that runs SQL Server is
Windows 98, thus Windows Authentication Mode is not available.
Can you help please?
TIA,
PaoloPaolo wrote:
> Hi, we have a problem on a server of our customer running SQL Server
> 2000.
Hrm... sorry, I meant SQL Server 7 ;)|||I was not aware that it is possible to install SQL Server on Windows 98.
Are you talking about MSDE? or perhaps the Developer Edition of SQL Server?
Since you did not take the appropriate steps to secure your "server" and you
already looked into other options but they will not work for you perhaps the
only option you have left is to contact Microsoft Support.
I do have one final idea: Shut down the "server" copy the database files,
and attach them to a new server. At least you will be able to access your
data.
--
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23EtmbfCkEHA.3160@.TK2MSFTNGP10.phx.gbl...
> Hi, we have a problem on a server of our customer running SQL Server
> 2000. That PC is connected to the Internet, and probably someone has
> changed the sa password.
> In fact, trying to connect to the sql server using "SQL Server
> Enterprise Manager" results in this error message:
> "A connection could not be established to SERVERNAME - Login failed for
sa."
> Query Analyzer instead gives: "Unable to connect to server. Server Msg
> 18456, Level 16, State 1. Login failed for user sa".
> Searching on the net I have found a bunch of good ways to follow, even
> if they all require to join into Windows as Administrator user (and
> thus, using Windows Authentication mode).
> However I can't proceed because the server that runs SQL Server is
> Windows 98, thus Windows Authentication Mode is not available.
> Can you help please?
> TIA,
> Paolo|||Keith Kratochvil wrote:
> I do have one final idea: Shut down the "server" copy the database files,
> and attach them to a new server. At least you will be able to access your
> data.
>
Thanks for the suggestion, it worked!
I copied a pristine master database from a vanilla sql server
installation to the "locked" sql server, then the databases containing
datas has been attached using sp_attach_db.
Finally I have specified a non blank password for user sa...
Regards,
Paolo|||I am glad that you were able to figure things out!
--
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23a6VLoOkEHA.3844@.TK2MSFTNGP12.phx.gbl...
> Keith Kratochvil wrote:
> > I do have one final idea: Shut down the "server" copy the database
files,
> > and attach them to a new server. At least you will be able to access
your
> > data.
> >
> Thanks for the suggestion, it worked!
> I copied a pristine master database from a vanilla sql server
> installation to the "locked" sql server, then the databases containing
> datas has been attached using sp_attach_db.
> Finally I have specified a non blank password for user sa...
> Regards,
> Paolo

How to retrieve sa password on Win98?

Hi, we have a problem on a server of our customer running SQL Server
2000. That PC is connected to the Internet, and probably someone has
changed the sa password.
In fact, trying to connect to the sql server using "SQL Server
Enterprise Manager" results in this error message:
"A connection could not be established to SERVERNAME - Login failed for sa."
Query Analyzer instead gives: "Unable to connect to server. Server Msg
18456, Level 16, State 1. Login failed for user sa".
Searching on the net I have found a bunch of good ways to follow, even
if they all require to join into Windows as Administrator user (and
thus, using Windows Authentication mode).
However I can't proceed because the server that runs SQL Server is
Windows 98, thus Windows Authentication Mode is not available.
Can you help please?
TIA,
PaoloPaolo wrote:

> Hi, we have a problem on a server of our customer running SQL Server
> 2000.
Hrm... sorry, I meant SQL Server 7 ;)|||I was not aware that it is possible to install SQL Server on Windows 98.
Are you talking about MSDE? or perhaps the Developer Edition of SQL Server?
Since you did not take the appropriate steps to secure your "server" and you
already looked into other options but they will not work for you perhaps the
only option you have left is to contact Microsoft Support.
I do have one final idea: Shut down the "server" copy the database files,
and attach them to a new server. At least you will be able to access your
data.
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23EtmbfCkEHA.3160@.TK2MSFTNGP10.phx.gbl...
> Hi, we have a problem on a server of our customer running SQL Server
> 2000. That PC is connected to the Internet, and probably someone has
> changed the sa password.
> In fact, trying to connect to the sql server using "SQL Server
> Enterprise Manager" results in this error message:
> "A connection could not be established to SERVERNAME - Login failed for
sa."
> Query Analyzer instead gives: "Unable to connect to server. Server Msg
> 18456, Level 16, State 1. Login failed for user sa".
> Searching on the net I have found a bunch of good ways to follow, even
> if they all require to join into Windows as Administrator user (and
> thus, using Windows Authentication mode).
> However I can't proceed because the server that runs SQL Server is
> Windows 98, thus Windows Authentication Mode is not available.
> Can you help please?
> TIA,
> Paolo|||Keith Kratochvil wrote:

> I do have one final idea: Shut down the "server" copy the database files,
> and attach them to a new server. At least you will be able to access your
> data.
>
Thanks for the suggestion, it worked!
I copied a pristine master database from a vanilla sql server
installation to the "locked" sql server, then the databases containing
datas has been attached using sp_attach_db.
Finally I have specified a non blank password for user sa...
Regards,
Paolo|||I am glad that you were able to figure things out!
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23a6VLoOkEHA.3844@.TK2MSFTNGP12.phx.gbl...
> Keith Kratochvil wrote:
>
files,[vbcol=seagreen]
your[vbcol=seagreen]
> Thanks for the suggestion, it worked!
> I copied a pristine master database from a vanilla sql server
> installation to the "locked" sql server, then the databases containing
> datas has been attached using sp_attach_db.
> Finally I have specified a non blank password for user sa...
> Regards,
> Paolo

Friday, February 24, 2012

How to retrieve data between two dates

For e.g
I want the amount of a customer between 2nd March 2004 and 2nd October
2004.
Basically How to filter this as i cannot put it in a where clause.i.e
customer name in rows amount in columns.
Is this in SQL Server or AS?
If the former, please post DDL, sample data, and sample output.
http://www.aspfaq.com/etiquette.asp?id=5006
If the latter, I will let someone else handle this question
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Amit Asawa" <amit.asawa@.capgemini.com> wrote in message
news:814276fc.0412022212.7d57e2da@.posting.google.c om...
> For e.g
>
> I want the amount of a customer between 2nd March 2004 and 2nd October
> 2004.
> Basically How to filter this as i cannot put it in a where clause.i.e
> customer name in rows amount in columns.
|||If u have got solution to this problem can u please forward it to me at mailketna@.yahoo.com.
I have same problem in asp.net in crystal reports.
Thankyou
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Can you post DDL, sample data, and sample output? I'll help you out, but
not via e-mail. Let's keep this public so that others can benefit from the
discussion as well.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"jalpa patel" <mailketna@.yahoo.com> wrote in message
news:u%23l$ihn4EHA.3388@.TK2MSFTNGP15.phx.gbl...
> If u have got solution to this problem can u please forward it to me at
mailketna@.yahoo.com.
> I have same problem in asp.net in crystal reports.
> Thankyou
> ************************************************** ********************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...

How to retrieve data between two dates

For e.g
I want the amount of a customer between 2nd March 2004 and 2nd October
2004.
Basically How to filter this as i cannot put it in a where clause.i.e
customer name in rows amount in columns.Is this in SQL Server or AS?
If the former, please post DDL, sample data, and sample output.
http://www.aspfaq.com/etiquette.asp?id=5006
If the latter, I will let someone else handle this question
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Amit Asawa" <amit.asawa@.capgemini.com> wrote in message
news:814276fc.0412022212.7d57e2da@.posting.google.com...
> For e.g
>
> I want the amount of a customer between 2nd March 2004 and 2nd October
> 2004.
> Basically How to filter this as i cannot put it in a where clause.i.e
> customer name in rows amount in columns.|||If u have got solution to this problem can u please forward it to me at mail
ketna@.yahoo.com.
I have same problem in asp.net in crystal reports.
Thankyou
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||Can you post DDL, sample data, and sample output? I'll help you out, but
not via e-mail. Let's keep this public so that others can benefit from the
discussion as well.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"jalpa patel" <mailketna@.yahoo.com> wrote in message
news:u%23l$ihn4EHA.3388@.TK2MSFTNGP15.phx.gbl...
> If u have got solution to this problem can u please forward it to me at
mailketna@.yahoo.com.
> I have same problem in asp.net in crystal reports.
> Thankyou
> ****************************************
******************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...