Saturday, February 25, 2012

Need Help?

I have a field with the name in my database called comments. In this field i have data like "zeroed out (10/21 10:37 AM - GS)CT SAID THIS CASE IS DISPOSED ALREADY (2/13 10:05 AM - CD)"

I need to get datetime that is in last braces (2/13 10:05AM - CD). how can i get this if i have multiple braces in substring function in sql server ?.

Thank you.

.substring(lastindexof( '(' ), lastindexof( ')' )|||

VB

Dim commentsAs String ="zeroed out (10/21 10:37 AM - GS)CT SAID THIS CASE IS DISPOSED ALREADY (2/13 10:05 AM - CD)"Dim startAs Integer = comments.LastIndexOf("(")Dim endingAs Integer = comments.LastIndexOf(")") - start + 1 comments = comments.Substring(start, ending)
C#
{string comments ="zeroed out (10/21 10:37 AM - GS)CT SAID THIS CASE IS DISPOSED ALREADY (2/13 10:05 AM - CD)";int start = comments.LastIndexOf("(");int ending = comments.LastIndexOf(")") - start + 1; comments = comments.Substring(start, ending); }
Just some other options|||

Thank you for your help but i want this to do in sql server.

NEED HELP:cannot run sql server 7.0 on windows 98

Hello !
I've installed SQL Server 7 Desktop on my computer (Windows 98).
(French version)
It has been complicated and long to get the SQL Server Services list
installed with SQL Server Services Manager. But I finally got it !!
I thought that whis this SQL Server was full ready to start.
But now, when I try to start SQL Server, it tries to start, but stop
immediatly.
When I try to open a SQL Server group with Enterprise Manager, it
returns me an error "ConnectionOpen (RPCopen...)". If SQL Server was
ready to start, it would open automatically.
So that's obvious SQL Server is not correctly installed...
I installed SQL Server 7.0 once two years ago and I did it
successfully whith a same configuration (Desktop 7.0 with Windows 98).
But I remember it had been difficult. And I didn't save anything about
what I did.
What do I have to do to complete SQL Server installation '?
Thanks for your help !So you start the SQL Server service and it stops again immediately? Then
check the SQL Server errorlog file and eventlog for error messages.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"bilou" <loghara@.yahoo.fr> wrote in message
news:9aac58ce.0311130811.33e86ea3@.posting.google.com...
> Hello !
> I've installed SQL Server 7 Desktop on my computer (Windows 98).
> (French version)
> It has been complicated and long to get the SQL Server Services list
> installed with SQL Server Services Manager. But I finally got it !!
> I thought that whis this SQL Server was full ready to start.
> But now, when I try to start SQL Server, it tries to start, but stop
> immediatly.
> When I try to open a SQL Server group with Enterprise Manager, it
> returns me an error "ConnectionOpen (RPCopen...)". If SQL Server was
> ready to start, it would open automatically.
> So that's obvious SQL Server is not correctly installed...
> I installed SQL Server 7.0 once two years ago and I did it
> successfully whith a same configuration (Desktop 7.0 with Windows 98).
> But I remember it had been difficult. And I didn't save anything about
> what I did.
> What do I have to do to complete SQL Server installation '?
> Thanks for your help !

Need help: With Dutch regional options, MS SQL Server BCP incorrectly delivers v

Hi all,

With Windows regional options are set to Dutch/Netherlands (or any other country using comma as the decimal symbol), MS SQL Server BCP Delivers incorrect figures to the target table.

The source table is a text file containing commas as the decimal character (As an example, in the text file 100.000 is represented as 100,000).

The target table is a Sql Server database table, with the column in question defined as a FLOAT datatype.

When BCP is run to deliver the data from the text file to Sql Server,
all figures are multiplied by 1000 because the input file for BCP contains a comma as the decimal symbol.

Thus, instead of the data being delivered with a value of 100, it ends up having a value of 100000

Is there anyone out there who is aware of any command line parameters that can be added to the bcp command in order to avoid this ? Note, the field in question is defined as SQLCHAR in the BCP format file.

Thanks for any help anyone may be able to offer.Second try on this one, does anyone have any possible suggestions ?

thanks again.|||What's the collation set to?

Mayb if you bcp the data to a staging table with a column a varchar then use replace?

Or divide by 1000 after the load?

Never had this problem

Need Help: SP fast in QA, slow in APP

I have a strored procedure which takes .016 seconds in Query Analyzer,
but takes 16.8 seconds when run in my ASP.NET application. [yes, you rea
d
that right]
I've run profiler to find this info.
The machine has all the updates and service packs.
Where should I look next for an answer?
Thanks in advance.
Server:
Windows 2000 Server
SQL Server 2000 Standard
SP3I suspect that your problem might be related to parameter sniffing. Here
are a few links:
http://groups-beta.google.com/group...e4a2438bed08aca
http://groups-beta.google.com/group...eb556c8dfb6a82c
Keith
"Rich Miller" <rooster575@.hotmail.com> wrote in message
news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
> I have a strored procedure which takes .016 seconds in Query Analyzer,
> but takes 16.8 seconds when run in my ASP.NET application. [yes, you r
ead
> that right]
> I've run profiler to find this info.
> The machine has all the updates and service packs.
> Where should I look next for an answer?
> Thanks in advance.
> Server:
> Windows 2000 Server
> SQL Server 2000 Standard
> SP3
>
>|||"Rich Miller" <rooster575@.hotmail.com> wrote in message
news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
>I have a strored procedure which takes .016 seconds in Query Analyzer,
> but takes 16.8 seconds when run in my ASP.NET application. [yes, you r
ead
> that right]
> I've run profiler to find this info.
> The machine has all the updates and service packs.
> Where should I look next for an answer?
>
Also look at the SET settings used by ASP.NET. If you have any indexed
views or indexes on computed columns they cannot be used unless your
connection settings are correct.
Also when you say that it runs in .016 seconds in QA, how are you running
it? Just running the body of the stored procedure with hard-coded values is
not the same. You can always capture application's activity from Profiler
and replay it in QA.
David|||David:
Thanks for the response.
To answer your questions:
What I am doing is running Profiler,
1) watching the line " exec mySP_getMatch @.ClientID=2, @.thisOther=1 " on
Profiler, as the web app fires the sp.
2) Cutting and pasting the exact line that was run with ASP.NET into Query
Analyzer
3) Running the query. [returns a value immediately]
Also, the SP is just grabbing values from a table, with indexes where
necessary.
No views or computed columns.
What do you mean by the "SET" settings?
This one has me perplexed.
I've never had a case where performance what night and day when comparing a
query run in asp.net vs. query analyzer.
Thanks,
Rich
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:uf2pAhvLFHA.3868@.TK2MSFTNGP10.phx.gbl...
> "Rich Miller" <rooster575@.hotmail.com> wrote in message
> news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
>
> Also look at the SET settings used by ASP.NET. If you have any indexed
> views or indexes on computed columns they cannot be used unless your
> connection settings are correct.
> Also when you say that it runs in .016 seconds in QA, how are you running
> it? Just running the body of the stored procedure with hard-coded values
> is not the same. You can always capture application's activity from
> Profiler and replay it in QA.
> David
>

Need Help: SP fast in QA, slow in APP

I have a strored procedure which takes .016 seconds in Query Analyzer,
but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
that right]
I've run profiler to find this info.
The machine has all the updates and service packs.
Where should I look next for an answer?
Thanks in advance.
Server:
Windows 2000 Server
SQL Server 2000 Standard
SP3
I suspect that your problem might be related to parameter sniffing. Here
are a few links:
http://groups-beta.google.com/group/...4a2438bed08aca
http://groups-beta.google.com/group/...b556c8dfb6a82c
Keith
"Rich Miller" <rooster575@.hotmail.com> wrote in message
news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
> I have a strored procedure which takes .016 seconds in Query Analyzer,
> but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
> that right]
> I've run profiler to find this info.
> The machine has all the updates and service packs.
> Where should I look next for an answer?
> Thanks in advance.
> Server:
> Windows 2000 Server
> SQL Server 2000 Standard
> SP3
>
>
|||"Rich Miller" <rooster575@.hotmail.com> wrote in message
news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
>I have a strored procedure which takes .016 seconds in Query Analyzer,
> but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
> that right]
> I've run profiler to find this info.
> The machine has all the updates and service packs.
> Where should I look next for an answer?
>
Also look at the SET settings used by ASP.NET. If you have any indexed
views or indexes on computed columns they cannot be used unless your
connection settings are correct.
Also when you say that it runs in .016 seconds in QA, how are you running
it? Just running the body of the stored procedure with hard-coded values is
not the same. You can always capture application's activity from Profiler
and replay it in QA.
David
|||David:
Thanks for the response.
To answer your questions:
What I am doing is running Profiler,
1) watching the line " exec mySP_getMatch @.ClientID=2, @.thisOther=1 " on
Profiler, as the web app fires the sp.
2) Cutting and pasting the exact line that was run with ASP.NET into Query
Analyzer
3) Running the query. [returns a value immediately]
Also, the SP is just grabbing values from a table, with indexes where
necessary.
No views or computed columns.
What do you mean by the "SET" settings?
This one has me perplexed.
I've never had a case where performance what night and day when comparing a
query run in asp.net vs. query analyzer.
Thanks,
Rich
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:uf2pAhvLFHA.3868@.TK2MSFTNGP10.phx.gbl...
> "Rich Miller" <rooster575@.hotmail.com> wrote in message
> news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
>
> Also look at the SET settings used by ASP.NET. If you have any indexed
> views or indexes on computed columns they cannot be used unless your
> connection settings are correct.
> Also when you say that it runs in .016 seconds in QA, how are you running
> it? Just running the body of the stored procedure with hard-coded values
> is not the same. You can always capture application's activity from
> Profiler and replay it in QA.
> David
>

Need Help: SP fast in QA, slow in APP

I have a strored procedure which takes .016 seconds in Query Analyzer,
but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
that right]
I've run profiler to find this info.
The machine has all the updates and service packs.
Where should I look next for an answer?
Thanks in advance.
Server:
Windows 2000 Server
SQL Server 2000 Standard
SP3I suspect that your problem might be related to parameter sniffing. Here
are a few links:
http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/a8f61dc6ac3aedcd/1e4a2438bed08aca?q=parameter+sniffing+group:microsoft.public.sqlserver.*#1e4a2438bed08aca
http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/b6bf1ec648ae8815/3eb556c8dfb6a82c?q=parameter+sniffing+group:microsoft.public.sqlserver.*#3eb556c8dfb6a82c
--
Keith
"Rich Miller" <rooster575@.hotmail.com> wrote in message
news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
> I have a strored procedure which takes .016 seconds in Query Analyzer,
> but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
> that right]
> I've run profiler to find this info.
> The machine has all the updates and service packs.
> Where should I look next for an answer?
> Thanks in advance.
> Server:
> Windows 2000 Server
> SQL Server 2000 Standard
> SP3
>
>|||"Rich Miller" <rooster575@.hotmail.com> wrote in message
news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
>I have a strored procedure which takes .016 seconds in Query Analyzer,
> but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
> that right]
> I've run profiler to find this info.
> The machine has all the updates and service packs.
> Where should I look next for an answer?
>
Also look at the SET settings used by ASP.NET. If you have any indexed
views or indexes on computed columns they cannot be used unless your
connection settings are correct.
Also when you say that it runs in .016 seconds in QA, how are you running
it? Just running the body of the stored procedure with hard-coded values is
not the same. You can always capture application's activity from Profiler
and replay it in QA.
David|||David:
Thanks for the response.
To answer your questions:
What I am doing is running Profiler,
1) watching the line " exec mySP_getMatch @.ClientID=2, @.thisOther=1 " on
Profiler, as the web app fires the sp.
2) Cutting and pasting the exact line that was run with ASP.NET into Query
Analyzer
3) Running the query. [returns a value immediately]
Also, the SP is just grabbing values from a table, with indexes where
necessary.
No views or computed columns.
What do you mean by the "SET" settings?
This one has me perplexed.
I've never had a case where performance what night and day when comparing a
query run in asp.net vs. query analyzer.
Thanks,
Rich
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:uf2pAhvLFHA.3868@.TK2MSFTNGP10.phx.gbl...
> "Rich Miller" <rooster575@.hotmail.com> wrote in message
> news:OZ8bHOvLFHA.3844@.TK2MSFTNGP14.phx.gbl...
>>I have a strored procedure which takes .016 seconds in Query Analyzer,
>> but takes 16.8 seconds when run in my ASP.NET application. [yes, you read
>> that right]
>> I've run profiler to find this info.
>> The machine has all the updates and service packs.
>> Where should I look next for an answer?
>
> Also look at the SET settings used by ASP.NET. If you have any indexed
> views or indexes on computed columns they cannot be used unless your
> connection settings are correct.
> Also when you say that it runs in .016 seconds in QA, how are you running
> it? Just running the body of the stored procedure with hard-coded values
> is not the same. You can always capture application's activity from
> Profiler and replay it in QA.
> David
>

Need help: Openxml failed for datasize greater than 120k

Hi,
Can anybody help me on what is going wrong, please?
I tried to pass an XML document as text parameter in a stored procedure
where openxml is being used to insert data into temp tables. If I pass any
XML document over 120k of size it goes in a loop and does not return any
error message. The SQL server is 2000 standard edition with service pack 3
running on windows 2003 server and it has all the latest versions of MSXML
(version 2, 3 and 4. All with latest service packs).
However if I try to execute it in my laptop (win XP professional, MSDE 2000
with service pack 3), it works fine. I tried with 500k XML data and it can
process.
Am I missing anything?
thanks
-Asir
Message posted via http://www.webservertalk.comHi
I assume you are calling SQLXML which uses MSXML? In which case make sure
that you have download the latest service pack (sp3). Without DDL, code or
example data it is not possible diagnose this problem. Check the differences
in the structure of the small files compared to the larger ones. You may wan
t
to try posting to microsoft.public.sqlserver.xml to see if anyone there has
more to add.
John
"Asir Sikdar via webservertalk.com" wrote:

> Hi,
> Can anybody help me on what is going wrong, please?
> I tried to pass an XML document as text parameter in a stored procedure
> where openxml is being used to insert data into temp tables. If I pass any
> XML document over 120k of size it goes in a loop and does not return any
> error message. The SQL server is 2000 standard edition with service pack 3
> running on windows 2003 server and it has all the latest versions of MSXML
> (version 2, 3 and 4. All with latest service packs).
> However if I try to execute it in my laptop (win XP professional, MSDE 200
0
> with service pack 3), it works fine. I tried with 500k XML data and it can
> process.
> Am I missing anything?
> thanks
> -Asir
> --
> Message posted via http://www.webservertalk.com
>|||My Code block is given below: From front end, ASP.Net(C#) I passed the XML
document as text to the stored procedure.
CREATE PROCEDURE p_xmlinsert
@.RequestId As Int,
@.Data1 As Int,
@.doc As text
As
Begin
Declare @.idoc Int
Declare @.TranCount Int,
@.Msg Varchar(256)
Set @.Msg = 'OK'
Set @.TranCount = @.@.TRANCOUNT
Exec sp_xml_preparedocument @.idoc OUTPUT, @.doc
SELECT *
Into #Tmp1
FROM OPENXML (@.idoc, '/Data/Invoice',2)
WITH
( InvoiceNumber VarChar(64) '@.Invoice_Number',
Data1 Int '@.Data1',
Adderess1 VarChar(32) '@.Adder1',
Adderess2 VarChar(32) '@.Adder2',
City VarChar(32) '@.City',
State VarChar(32) '@.State',
Zip VarChar(32) '@.Zip',
Date VarChar(32) '@.Date',
Total VarChar(32) '@.Total'
)
SELECT *
Into #Tmp2
FROM OPENXML (@.idoc, '/Data/Invoice/Event',2)
WITH
( InvoiceNumber VarChar(64) '../@.Invoice_Number',
OrderNumber VarChar(32) '@.Order_Number',
OrderDate DateTime '@.Order_Date',
ContactName VarChar(64) '@.Contact_Name',
ContactEmail VarChar(64) '@.Contact_Email',
ContactPhone VarChar(24) '@.Contact_Phone',
ContactAddr1 VarChar(128) '@.Contact_Addr1',
ContactAddr2 VarChar(128) '@.Contact_Addr2',
ContactCity VarChar(32) '@.Contact_City',
ContactState VarChar(2) '@.Contact_State',
ContactZip VarChar(5) '@.Contact_Zip',
)
SELECT *
Into #Tmp3
FROM OPENXML (@.idoc, '/Data/Invoice/Event/Order_Detail',2)
WITH
(InvoiceNumber VarChar(64) '../../@.Invoice_Number',
OrderNumber VarChar(32) '../@.Order_Number',
ItemName VarChar(64) '@.Item_Name',
ItemDesc VarChar(256) '@.Item_Desc',
Quantity Decimal(18,2) '@.Quantity',
UnitPrice Decimal(18,2) '@.Unit_Price',
OrderTax Decimal(18,2) '@.Order_Tax',
OrderTotal Decimal(18,2) '@.Order_Total'
)
EXECUTE sp_xml_removedocument @.idoc
--Now Add data
If @.TranCount = 0
Begin Tran
Insert Into table1
(
ReqId,
Data1,
InvoiceNumber,
UnitAddress1,
UnitAddress2,
UnitCity,
UnitState,
UnitZip,
InvoiceDate,
InvoiceNetAmount,
InvoiceTaxAmount,
InvoiceTotalAmount,
CreatedDate
)
Select
@.RequestId,
Data1,
InvoiceNumber,
UnitAdder1,
UnitAdder2,
UnitCity,
UnitState,
UnitZip,
InvoiceDate,
0.0,
0.0,
Total,
GetDate()
From #Tmp1
If @.@.error<>0
Begin
Set @.Msg = 'Error: Insert1 failed!'
RAISERROR (@.Msg, 16, 1)
If @.TranCount = 0
Rollback Transaction
Select 0
Return
End
Insert Into table2
(
Table1Id,
OrderNumber,
OrderDate,
ContactName,
ContactEmail,
ContactPhone,
ContactAddress1,
ContactAddress2,
ContactCity,
ContactState,
ContactZip,
)
Select A.Table1Id,
OrderNumber,
OrderDate,
ContactName,
ContactEmail,
ContactPhone,
ContactAddr1,
ContactAddr2,
ContactCity,
ContactState,
ContactZip,
From #Tmp2 A,
Table1 B
Where A.InvoiceNumber = B.InvoiceNumber
And B.Data1 = @.Data1
And B.ReqId = @.RequestId
If @.@.error<>0
Begin
Set @.Msg = 'Error: Insert2 failed!'
RAISERROR (@.Msg, 16, 1)
If @.TranCount = 0
Rollback Transaction
Select 0
Return
End
Insert Into Table3
(
Table2Id,
ItemName,
ItemDescription,
Quantity,
UnitPrice,
SalesTax,
TotalPrice
)
Select B.Table2Id,
ItemName,
ItemDesc,
Quantity,
UnitPrice,
OrderTax,
OrderTotal
From #Tmp3 A,
Table1 B,
Table2 C
Where A.InvoiceNumber = B.InvoiceNumber
And B.Data1 = @.Data1
And B.ReqId = @.RequestId
And A.OrderNumber = C.OrderNumber
And B.Table1Id = C.Table1Id
If @.@.error<>0
Begin
Set @.Msg = 'Error: Insert3 failed!'
RAISERROR (@.Msg, 16, 1)
If @.TranCount = 0
Rollback Transaction
Select 0
Return
End
Update TableQueue Set Status = 'Ready' Where ReqId = @.RequestId and Status
= 'Pending'
If @.@.error<>0
Begin
Set @.Msg = 'Error: Update failed!'
RAISERROR (@.Msg, 16, 1)
If @.TranCount = 0
Rollback Transaction
Select 0
Return
End
If @.TranCount = 0
Commit Transaction
Select 3
Return
End
GO
Thanks
-Asir
Message posted via http://www.webservertalk.com

need help: new at store procedure

HI,
I want to create Store Procedure that Do:
I have 2 tables (A,B) and i want to know if theres records equal
between A.id1 in B.id2 or in B.id3
I want to call this Store Procedure from Asp (need to know how)
I work with SQL Server.
Regardsmoshe wrote:
> HI,
> I want to create Store Procedure that Do:
> I have 2 tables (A,B) and i want to know if theres records equal
> between A.id1 in B.id2 or in B.id3
> I want to call this Store Procedure from Asp (need to know how)
> I work with SQL Server.
> Regards
Create a SQL login and add the user to your database. Let's assume you call
the login "asplogin" with a password of "nigolpsa"
In Query Analyzer, run this script:
Create PROCEDURE CompareData AS
SET NOCOUNT ON
IF EXISTS (SELECT * FROM A INNER JOIN B ON A.id1=B.id2) OR
EXISTS (SELECT * FROM A INNER JOIN B ON A.id1=B.id3)
RETURN 1
ELSE
RETURN 2
go
GRANT EXECUTE ON CompareData TO asplogin
go
In ASP (I'm assuming you mean classic ASP since you did not specify
ASP.Net), follow the procedure described here to add the ADO type library to
your application's global.asa file :
http://www.aspfaq.com/show.asp?id=2112
Then create a page with this code (untested - there may be typos or syntax
errors. This should give you the idea. Look up the correct syntax in the ADO
reference at
http://msdn.microsoft.com/library/e...pireference.asp)
:
<%
dim cn, cmd
set cn=createobject("adodb.connection")
set cmd=createobject("adodb.command")
With cmd
.CommandType=adCmdStoredProc
.CommandText="CompareData"
set .ActiveConnection = cn
.Parameters.Append .CreateParameter("RETURN_VALUE", _
adInteger,adParamReturnValue)
end with
cn.Open "Provider=SQLOLEDB; " & _
"Data Source=YourServerName; " & _
"Initial Catalog=YourDatabaseName;" & _
"User ID=asplogin;Password=nigolpsa"
cmd.Execute
If cmd.Parameters(0) = 1 Then
Response.Write "Matching records exist"
Else
Response.Write "No matching records exist"
End if
cn.close: set cn=nothing
%>
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Need Help: How to schedule a report that has parameter?

Hi All:
I have created a report that is based on stored procedure and also has some
parameters. Manually after entering proper parameter values, I can run the
report properly.
My questions are:
1. How can I schedule this report?
2. While scheduling this report, is there anyway I can provide the
corresponding proper parameter values so that I can get my required report?
I would appreciate your help.
Thanks.
SamHave you try to use a subscription?
"Sue" wrote:
> Hi All:
> I have created a report that is based on stored procedure and also has some
> parameters. Manually after entering proper parameter values, I can run the
> report properly.
> My questions are:
> 1. How can I schedule this report?
> 2. While scheduling this report, is there anyway I can provide the
> corresponding proper parameter values so that I can get my required report?
> I would appreciate your help.
> Thanks.
> Sam
>|||Yes. But did not work out properly. Need help.
Here is my Case
+++++++++++++++++++++++++++++
I have a common report object residing on Reporting Service. The report
shows Monthly Activity for a Department. This report is based on a Stored
Procedure and has Department ID as a parameter.
Through an application different departments either can run this report or
create a schedule so that at the end of each month, any department can get
the report related to only its data.
How can I do that?
+++++++++++++++++++++++++
"Soan" wrote:
> Have you try to use a subscription?
> "Sue" wrote:
> > Hi All:
> >
> > I have created a report that is based on stored procedure and also has some
> > parameters. Manually after entering proper parameter values, I can run the
> > report properly.
> >
> > My questions are:
> >
> > 1. How can I schedule this report?
> >
> > 2. While scheduling this report, is there anyway I can provide the
> > corresponding proper parameter values so that I can get my required report?
> >
> > I would appreciate your help.
> >
> > Thanks.
> >
> > Sam
> >
> >

Need Help: For Cube data in Multi Languages.

Dear Friends..

I need help if any one can... My need is that...I am devloping my Cube using SSAS. I want to access my cube in multi languages e.g.: English, Japanese or other. At the movement I have two languages description in SQL Database like English and Japanese.

But In SSAS Translations, I can translate Measures Groups, Dimensions, Perspectives, KPIs, Actions, Named Sets & Calculated Members names. But there will be a need to Map Columns as per selected Lenguage so that I can display in proper language data.

Suppose I select Japanese the description should come from Column where Japanese description is stored.

OR any othere method by doing I can see my reports/data in any language.

Please Help...

Do you whant to display the description for the dimension members also translated?

In dimension editor you can specify data source feild for name translation of any dimension attribute. It this what you are looking for?

|||

Thanks for your reply.

What I'm understanding here that in dimension editor I will have to set NameColumn for another Lenguage Atrribute in Source. But doing that I will have to maintain two Dimension/Hierarchies for Two Languages e.g.: English and Japanese. I donot want like this. I want only based on lenguage selection data should come for that lenguage without duplicating hierarchies for the languages.

Or if I'm not understanding what you said please clear.

Looking positive response..

|||

Hi

I've got the solution in dimension editor in transalations we can do Attribute Data Transalation by clicking ellipsis.Thanks again.

But I've read out regarding Analysis Services Instance for Multi Languages - If you know about please tell me. Or in other words I would like to say any method so that all data in Cube should display in any lenguage based on lenguage selection, but we are not maitaing any manual mapping columns.

Thanks Again.

|||

Translations is the way for you to model your cube such that you can later on switch the language and present your users with translated data.

For that you got to specify where Analysis Server shoudl read translated data from.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Take a look at adventure works sample SSAS database. There you find an example of what you are looking for.

You don't have to maintain two dimensions\hierarchies. You will still have the same dimension with it's hierarchies but depending of LCID of connection you will see captions of dimensions and dimension member in corresponding language.

What you have to do is to supply you dimension tables with additional fields, containing translated names. It's pretty easy, without headache.

|||

Need Help

I tried with AdventureWorks db for Analysis Services - Translation. I made a Geography Dimention Attribute translation for Spanish & Franch having columns in DimGeography. It is working fine when browse SQL Browser. Then I made a SSRS Sample Report..given below a detail...

SELECT
NON EMPTY
{[Measures].[Reseller Sales-Sales Amount]} ON 0,
NON EMPTY
{
([Reseller Geography].[Geographies].[State-Province])
*
([Date].[Month Name].[Month Name])
} ON 1
FROM (SELECT(STRTOSET(@.DateMonthName, CONSTRAINED)) ON COLUMNS
FROM (SELECT(STRTOSET(@.ResellerGeographyGeographies, CONSTRAINED)) ON COLUMNS
FROM [Reseller Sales]))

AND DATASET FOR Geography

WITH
MEMBER [Measures].[ParameterCaption] AS '[Reseller Geography].[Geographies].CURRENTMEMBER.MEMBER_CAPTION'
MEMBER [Measures].[ParameterValue] AS '[Reseller Geography].[Geographies].CURRENTMEMBER.UNIQUENAME'
MEMBER [Measures].[ParameterLevel] AS '[Reseller Geography].[Geographies].CURRENTMEMBER.LEVEL.ORDINAL'
SELECT
{
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
} ON COLUMNS ,
{[Reseller Geography].[Geographies].[Country-Region]} ON ROWS
FROM [Reseller Sales]

AND DATASET FOR Date/Month

WITH MEMBER [Measures].[ParameterCaption] AS '[Date].[Month Name].CURRENTMEMBER.MEMBER_CAPTION' MEMBER [Measures].[ParameterValue] AS '[Date].[Month Name].CURRENTMEMBER.UNIQUENAME' MEMBER [Measures].[ParameterLevel] AS '[Date].[Month Name].CURRENTMEMBER.LEVEL.ORDINAL' SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Date].[Month Name].ALLMEMBERS ON ROWS FROM [Reseller Sales]

Now Report is successfully deployed. But How to change the language. Here I am not sure but what I tried writting....I have opened Report Server and change the setting in Tools/Internet Settings/Lenguages -> and added Franch and move it to 1st place. After this Drop down list labels and it's data start to come in Franch but not same data comming in report itself. What to do.

Please Help.

|||

Moving to RS forum

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Need Help: For Cube data in Multi Languages.

Dear Friends..

I need help if any one can... My need is that...I am devloping my Cube using SSAS. I want to access my cube in multi languages e.g.: English, Japanese or other. At the movement I have two languages description in SQL Database like English and Japanese.

But In SSAS Translations, I can translate Measures Groups, Dimensions, Perspectives, KPIs, Actions, Named Sets & Calculated Members names. But there will be a need to Map Columns as per selected Lenguage so that I can display in proper language data.

Suppose I select Japanese the description should come from Column where Japanese description is stored.

OR any othere method by doing I can see my reports/data in any language.

Please Help...

Do you whant to display the description for the dimension members also translated?

In dimension editor you can specify data source feild for name translation of any dimension attribute. It this what you are looking for?

|||

Thanks for your reply.

What I'm understanding here that in dimension editor I will have to set NameColumn for another Lenguage Atrribute in Source. But doing that I will have to maintain two Dimension/Hierarchies for Two Languages e.g.: English and Japanese. I donot want like this. I want only based on lenguage selection data should come for that lenguage without duplicating hierarchies for the languages.

Or if I'm not understanding what you said please clear.

Looking positive response..

|||

Hi

I've got the solution in dimension editor in transalations we can do Attribute Data Transalation by clicking ellipsis.Thanks again.

But I've read out regarding Analysis Services Instance for Multi Languages - If you know about please tell me. Or in other words I would like to say any method so that all data in Cube should display in any lenguage based on lenguage selection, but we are not maitaing any manual mapping columns.

Thanks Again.

|||

Translations is the way for you to model your cube such that you can later on switch the language and present your users with translated data.

For that you got to specify where Analysis Server shoudl read translated data from.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Take a look at adventure works sample SSAS database. There you find an example of what you are looking for.

You don't have to maintain two dimensions\hierarchies. You will still have the same dimension with it's hierarchies but depending of LCID of connection you will see captions of dimensions and dimension member in corresponding language.

What you have to do is to supply you dimension tables with additional fields, containing translated names. It's pretty easy, without headache.

|||

Need Help

I tried with AdventureWorks db for Analysis Services - Translation. I made a Geography Dimention Attribute translation for Spanish & Franch having columns in DimGeography. It is working fine when browse SQL Browser. Then I made a SSRS Sample Report..given below a detail...

SELECT
NON EMPTY
{[Measures].[Reseller Sales-Sales Amount]} ON 0,
NON EMPTY
{
([Reseller Geography].[Geographies].[State-Province])
*
([Date].[Month Name].[Month Name])
} ON 1
FROM (SELECT(STRTOSET(@.DateMonthName, CONSTRAINED)) ON COLUMNS
FROM (SELECT(STRTOSET(@.ResellerGeographyGeographies, CONSTRAINED)) ON COLUMNS
FROM [Reseller Sales]))

AND DATASET FOR Geography

WITH
MEMBER [Measures].[ParameterCaption] AS '[Reseller Geography].[Geographies].CURRENTMEMBER.MEMBER_CAPTION'
MEMBER [Measures].[ParameterValue] AS '[Reseller Geography].[Geographies].CURRENTMEMBER.UNIQUENAME'
MEMBER [Measures].[ParameterLevel] AS '[Reseller Geography].[Geographies].CURRENTMEMBER.LEVEL.ORDINAL'
SELECT
{
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
} ON COLUMNS ,
{[Reseller Geography].[Geographies].[Country-Region]} ON ROWS
FROM [Reseller Sales]

AND DATASET FOR Date/Month

WITH MEMBER [Measures].[ParameterCaption] AS '[Date].[Month Name].CURRENTMEMBER.MEMBER_CAPTION' MEMBER [Measures].[ParameterValue] AS '[Date].[Month Name].CURRENTMEMBER.UNIQUENAME' MEMBER [Measures].[ParameterLevel] AS '[Date].[Month Name].CURRENTMEMBER.LEVEL.ORDINAL' SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Date].[Month Name].ALLMEMBERS ON ROWS FROM [Reseller Sales]

Now Report is successfully deployed. But How to change the language. Here I am not sure but what I tried writting....I have opened Report Server and change the setting in Tools/Internet Settings/Lenguages -> and added Franch and move it to 1st place. After this Drop down list labels and it's data start to come in Franch but not same data comming in report itself. What to do.

Please Help.

|||

Moving to RS forum

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Need Help...-sqlmangr.exe

I have the sql 7.0 and sql 2000 server installed.
On restart the sqlmangr shows the status of the 7.0 server.
I want to see the status of the 2000 server.
How can i change this ?
Thanxopen up SQL Server Service Manager .. look at "Server" on the right of that box, there is a drop down menu arrow. Click it ;) Or you can just type over the sql server name.

Need help...any suggestions?

here is my schema...

Board of Zoning AppealsParcel#BZACase#ApplicantIDOwnerIDDateFiledSizeZoning

VU (Variance of Use)BZACase#ProposedUseCommentsVDS (Variance of Developmental Standard)BZACase#OrdinanceReqRequestedDimProposedUseCommentsSE (Special Exception)BZACase#CurrentUseProposedUseOrdinanceReqRequestedDimComments

ApplicantApplicantIDFirstNameLastNameCompanyNameLine1Line2CityStateZipPhoneNum

OwnerOwnerIDFirstNameLastNameCompanyNameLine1Line2CityStateZipPhoneNum

Now i know what im doing with the applicantID and ownerID...but the BZAcase# is a number/unique identifier that looks like this...2007-VU-000, 2007-VU-001, 2007-VU-003...so my question is

1. how do i get the last three numbers to increment each time a new application is created?

2. how do i retrieve the last record in the table?

3. Do you have any other suggestions?? i have to have the number and what type of form they applied for in the "case#"?

If you want to manually assign the numbers, make sure all your INSERTs are well maintained within TRANSACTIONs so there's no resouce contention.

>>>1. how do i get the last three numbers to increment each time a new application is created?

RIGHT(column,3)

>>>2. how do i retrieve the last record in the table?

MAX(Column) From the Table.

>>>3. Do you have any other suggestions?? i have to have the number and what type of form they applied for in the "case#"?

Its probably better to have an Identity column, let SQL Server assign the number, then have your Case# as a computed column. Get the Id from the INSERT via SCOPE_IDENTITY() and concatenate it with the Case#.

|||

Here is some code w/comments addressing points 1 & 2, I'm heading out, so I don't have time to comment on point 3. I would warn you though that case numbers don't look like they replicate very well. I understand that people like having a sequential number that is human friendly, but I would consider adding on a random sequence or something.

Good luck

-- table to hold test dataCREATE TABLE #TestTable(CaseNumberVARCHAR(20)PRIMARY KEY CLUSTERED,DataVARCHAR(1));-- previous years dataINSERT INTO #TestTable (CaseNumber, Data)VALUES('2006-VU-001','a');INSERT INTO #TestTable (CaseNumber, Data)VALUES('2006-VU-002','a');INSERT INTO #TestTable (CaseNumber, Data)VALUES('2006-VU-003','a');-- we don't want anyone inserting while we are in hereSET TRANSACTION ISOLATION LEVEL SERIALIZABLE;-- storage for the next caseDECLARE @.NextCaseVARCHAR(20);-- determine the next case by checking if we need a new year, case 1 for the new year-- or if we need to increment the previous years case countSELECT TOP 1 @.NextCase =CASEWHENDATEPART(yy,GETDATE()) =DATEPART(yy,CAST(LEFT(tt.CaseNumber, 4)AS DATETIME))THENLEFT(tt.CaseNumber, 4) +'-VU-' + REPLICATE('0', 3 -LEN(CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR))) +CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR)ELSECAST(DATEPART(yy,GETDATE())AS VARCHAR) +'-VU-001'ENDFROM #TestTableAS ttORDER BY tt.CaseNumberDESC;-- add the new case, note this tests the year roll-overINSERT INTO #TestTable (CaseNumber, Data)VALUES (@.NextCase,'b');-- view the last caseSELECT TOP 1 CaseNumberAS HighestCaseNumberFROM #TestTableORDER BY CaseNumberDESC;-- get the next case againSELECT TOP 1 @.NextCase =CASEWHENDATEPART(yy,GETDATE()) =DATEPART(yy,CAST(LEFT(tt.CaseNumber, 4)AS DATETIME))THENLEFT(tt.CaseNumber, 4) +'-VU-' + REPLICATE('0', 3 -LEN(CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR))) +CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR)ELSECAST(DATEPART(yy,GETDATE())AS VARCHAR) +'-VU-001'ENDFROM #TestTableAS ttORDER BY tt.CaseNumberDESC;-- add the new case to the table, note this tests incrementing the current yearINSERT INTO #TestTable (CaseNumber, Data)VALUES (@.NextCase,'c');-- view the latest caseSELECT TOP 1 CaseNumberAS HighestCaseNumberFROM #TestTableORDER BY CaseNumberDESC;-- get the next case againSELECT TOP 1 @.NextCase =CASEWHENDATEPART(yy,GETDATE()) =DATEPART(yy,CAST(LEFT(tt.CaseNumber, 4)AS DATETIME))THENLEFT(tt.CaseNumber, 4) +'-VU-' + REPLICATE('0', 3 -LEN(CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR))) +CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR)ELSECAST(DATEPART(yy,GETDATE())AS VARCHAR) +'-VU-001'ENDFROM #TestTableAS ttORDER BY tt.CaseNumberDESC;-- add the new case to the table, note this tests incrementing the current yearINSERT INTO #TestTable (CaseNumber, Data)VALUES (@.NextCase,'d');-- view the latest caseSELECT TOP 1 CaseNumberAS HighestCaseNumberFROM #TestTableORDER BY CaseNumberDESC;-- view all casesSELECT *FROM #TestTable;-- drop the test tableDROP TABLE #TestTable;/*-- lets take a look at our cased based goodness-- the first condition in the caseCASE WHEN DATEPART(yy, GETDATE()) = DATEPART(yy, CAST(LEFT(tt.CaseNumber, 4) AS DATETIME))THEN -- the current max case is the current year, build the next case based on the highest number for the yearELSE -- the current max case is not this year, we can shortcut here and build the 001 case number based on the current yearEND-- the first statement of the true/current year build id-- use the left four digits of the case number as for the current year-- concatenate on -VU-LEFT(tt.CaseNumber, 4) + '-VU-' +-- zero pad the right three digits to three positions-- this part is pretty nasty-- we need to calculate the case number twice, once to know how much zero-- padding is necessary and once to actually produce a value-- we need to add one to the number before padding just in case our next digit rolls over-- first get the case number, make it an INT, then add one to it, finally use that length/value-- cast back to varchar and concat everything togetherREPLICATE('0', 3 - LEN(CAST(CAST(RIGHT(tt.CaseNumber, 3) AS INT) + 1 AS VARCHAR))) + CAST(CAST(RIGHT(tt.CaseNumber, 3) AS INT) + 1 AS VARCHAR)*/
|||

ok...now this maybe a little rediculous of a question but where does this go?? in SQL itself or somewhere else? i've never worked with exceptions before so...

|||

I would place the code into a stored procedure that is used for inserting new cases. The stored procedure would take the inputs necessary to create a row, use the code I wrote above to determine the next case number and then perform the insert.

CREATE PROCEDURE dbo.InsertCase
(
@.Parm1 ...
)
AS
BEGIN
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
DECLARE @.NextCase;

SELECT @.NextCase = Code from above;

INSERT INTO YourTable(CaseNumer, Parm1...) VALUES(@.NextCase, @.Parm1...);
END;

|||

so when i create the stored procedure...it should look like this??

CREATE PROCEDURE dbo.InsertCase
(
@.Parm1 ...
)
AS
BEGIN
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
DECLARE @.NextCase;

SELECT @.NextCase =CASEWHENDATEPART(yy,GETDATE()) =DATEPART(yy,CAST(LEFT(tt.CaseNumber, 4)AS DATETIME))
THENLEFT(tt.CaseNumber, 4) +'-VU-' + REPLICATE('0', 3 -LEN(CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR))) +CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR)
ELSECAST(DATEPART(yy,GETDATE())AS VARCHAR) +'-VU-001';

INSERT INTO BZA(BZAcaseNum, ApplicantID, OwnerID, ParcelNum, DateFiled, AcerageSize, Zoning, HearingMonth, HearingDay VALUES (@.NextCase, @.ApplicantID, @.OwnerID, @.ParcelNum, @.DateFiled, @.AcerageSize, @.Zoning, @.HearingMonth, @.HearingDay);
END;

what is the tt.CaseNumber?? that is the table its pulling the data from right?? so in my table where it gets the case number is the VarianceOfUse table...so it should be "VarianceOfUse.BZAcaseNum"

|||

sorry to be a pest but does that look right??

|||

keinspahr:

so when i create the stored procedure...it should look like this??

CREATE PROCEDURE dbo.InsertCase
(
@.Parm1 ...
)
AS
BEGIN
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
DECLARE @.NextCase;

SELECT @.NextCase =CASEWHENDATEPART(yy,GETDATE()) =DATEPART(yy,CAST(LEFT(tt.CaseNumber, 4)AS DATETIME))
THENLEFT(tt.CaseNumber, 4) +'-VU-' + REPLICATE('0', 3 -LEN(CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR))) +CAST(CAST(RIGHT(tt.CaseNumber, 3)AS INT) + 1AS VARCHAR)
ELSECAST(DATEPART(yy,GETDATE())AS VARCHAR) +'-VU-001';

INSERT INTO BZA(BZAcaseNum, ApplicantID, OwnerID, ParcelNum, DateFiled, AcerageSize, Zoning, HearingMonth, HearingDay VALUES (@.NextCase, @.ApplicantID, @.OwnerID, @.ParcelNum, @.DateFiled, @.AcerageSize, @.Zoning, @.HearingMonth, @.HearingDay);
END;

what is the tt.CaseNumber?? that is the table its pulling the data from right?? so in my table where it gets the case number is the VarianceOfUse table...so it should be "VarianceOfUse.BZAcaseNum"


you need to have a FROM and ORDER BY statements for your SELECT @.NextCase.
Possibly, FROM BZA ORDER BY CaseNumber DESC

Other than that and filling in the rest of the parameters, you should be good to go.

|||

do you have a good website or anything to learn about that statement...cause it confuses the hell out of me i've never seen something like that before, i kind of get the idea of what is going on but i just always want to know more about it...thanks

|||

i just can't get it working...i don't know im sure it works great but i just don't have the understanding of that situational stuff...so maybe if you can take to site or something to learn what is going on there i will understand it and use it...i really appreciate it...

|||

The code that I posted should run on its own. Just take that code and put it into a query analyzer window and run it. You should be able to see it work. Once you've made it that far, run it piece-by-piece. Analyze it. Try incorporating your base table instead of the test table. Get that working, then try making a procedure to do the insert. Try doing things step-by-step.

|||

ok here is the final of what i did...the table i am pulling from is called VarianceOfUse, which has columns for BZAcaseNum, CurrentUse, ProposedUse, Comments....and when i run this in query analyzer it says "Incorrect Syntax Near BZAcaseNum" im total lost!!!

-- table to hold data
dbo.VarianceOfUse
(
BZAcaseNum CHAR(20) PRIMARY KEY CLUSTERED
,CurrentUse Char(100)
,ProposedUse Char(500)
,Comments Char(500)
);

-- we don't want anyone inserting while we are in here
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

-- storage for the next case
DECLARE @.NextCase VARCHAR(20);

-- determine the next case by checking if we need a new year, case 1 for the new year
-- or if we need to increment the previous years case count
SELECT TOP 1 @.NextCase = CASE WHEN DATEPART(yy, GETDATE()) = DATEPART(yy, CAST(LEFT(VarianceOfUse.BZAcaseNumber, 4) AS DATETIME))
THEN LEFT(VarianceOfUse.BZAcaseNumber, 4) + '-VU-' + REPLICATE('0', 3 - LEN(CAST(CAST(RIGHT(VarianceOfUse.BZAcaseNumber, 3) AS INT) + 1 AS VARCHAR))) + CAST(CAST(RIGHT(VarianceOfUse.BZAcaseNumber, 3) AS INT) + 1 AS VARCHAR)
ELSE CAST(DATEPART(yy, GETDATE()) AS VARCHAR) + '-VU-001'
END
FROM VarianceOfUse
ORDER BY VarianceOfUse.BZAcaseNumber DESC;

Need Help....

I got two table MasterTable and MemberTable

MasterTable got three column (ID, AwardName)
MemberTable got three column (ID, Name, Stage)

I want to display the AwardName and Stage where Name = Dropdownlist value.

The problem is AwardName that the member achieved comes with their various Stage...

So the output shoule be something like this when a ddl value is autopostback:

AwardName Stage
----- --
XXXXXXX Advanced
CCCCCC Basic

How do I get the stage to match with the AwardName in the same Row... ?What is the relationship between the two tables? Is there a FOREIGN KEY here? If so, specify.|||The MasterTable store all the awards info: Awards ID, Awards Name
The MemberTable store the achivement of member...the awards that they have achieved: Awards ID, Members ID, Stage

Stage have 2 values, Basic and Advanced...
So everytime a member received an award...it will store in MemberTable. Example, if a member achieved an Award with the Awards ID "01" and the stage is "Advanced"
It will store in MemberTable as one record :

MemberTable
AID MID Stage
-- -- --
01 xxx Advanced

So now I want to display all result achived by particular member... i want to display the Stage and the Awards Name

I never use foreign key...|||I have got the SQL Statement...

Thanks

Need Help... Urgent!

I've installed SQL Server 2005 from MSDN, however, while I was trying to
install the SP1 from the same DVD, it said:
"Shared String ID 11217 Not Found" with the body of the message saying
"Shared String ID 11216 Not Found"...
What could I do? How do I solve this?
I went to Microsoft.com to download the SP1 directly from there.. But the
error continues...
Thanks...
Hi Sonia,
Why dont you apply SP2 directly?
Ekrem ?nsoy
"Sonia.Madureira" <Sonia.Madureira@.discussions.microsoft.com> wrote in
message news:067A08DC-D5B1-4734-B24D-3A23E951F562@.microsoft.com...
> I've installed SQL Server 2005 from MSDN, however, while I was trying to
> install the SP1 from the same DVD, it said:
> "Shared String ID 11217 Not Found" with the body of the message saying
> "Shared String ID 11216 Not Found"...
> What could I do? How do I solve this?
> I went to Microsoft.com to download the SP1 directly from there.. But the
> error continues...
> Thanks...
|||Hi Ekrem,
Thanks for answer.. I've tried right now to install SP2 but it didn't work
out either..
When it's extracting, occours an error saying:
"The following error occoured", same in body - OK
When I click in OK it shows:
"A recently applied update, , failed to install" and in the content of the
report it says:
"EventType: sqlsetup P1 : unknown P2 : 0x0 P3 : unknown ..." , the
unknown repeats until P10...
Can you Help me?
"Ekrem ?nsoy" wrote:
Hi Sonia,
Why dont you apply SP2 directly?
Ekrem ?nsoy
|||I'm not sure if your prior SP installation attempt broke some SQL Server
binaries or not but it look's like it did. As you do not have a chance to
uninstall only the SP installation (that corrupted one), there is not
emerging an idea in my mind but to uninstall the problematic SQL Server
instance and install a new SQL Server instance from scratch and applying SP2
then.
I don't know your environment and if it's an important SQL Server instance
and can not be offline for a while or something don't blame me for my
comments =)
I hope others has a better idea on this problem.
P.S.
You said that an error occurs when the package is being extracted but as it
complains about the corrupted SP installation in the error message, I think
it finishes extracting the package and the problem occurs when it's checking
the system before applying the SP.
Ekrem ?nsoy
"Sonia.Madureira" <SoniaMadureira@.discussions.microsoft.com> wrote in
message news:523C6A93-BF60-492A-A58F-DF9729087D2E@.microsoft.com...
> Hi Ekrem,
> Thanks for answer.. I've tried right now to install SP2 but it didn't work
> out either..
> When it's extracting, occours an error saying:
> "The following error occoured", same in body - OK
> When I click in OK it shows:
> "A recently applied update, , failed to install" and in the content of the
> report it says:
> "EventType: sqlsetup P1 : unknown P2 : 0x0 P3 : unknown ..." , the
> unknown repeats until P10...
> Can you Help me?
>
>
>
> "Ekrem ?nsoy" wrote:
> Hi Sonia,
> Why dont you apply SP2 directly?
> --
> Ekrem ?nsoy
>
|||Thanks Ekrem,
I'll uninstall SQL and try again.
I've started this week serving as aprenctice in a company of services,
software, harware... So, they want me to learn as logic that is... (by the
way, forgive me my mistakes, i'm portuguese)
We install PC's, servers, etc in clients.. So we use SQL server...
They told me to install SQL server in my PC to start learning and when
errors occour, they answer to looke online.. I am looking everywhere but with
no luck... =( LOL
Thanks for helping me Ekrom... I will try to uninstall now... And try
again... =)
"Ekrem ?nsoy" wrote:

> I'm not sure if your prior SP installation attempt broke some SQL Server
> binaries or not but it look's like it did. As you do not have a chance to
> uninstall only the SP installation (that corrupted one), there is not
> emerging an idea in my mind but to uninstall the problematic SQL Server
> instance and install a new SQL Server instance from scratch and applying SP2
> then.
> I don't know your environment and if it's an important SQL Server instance
> and can not be offline for a while or something don't blame me for my
> comments =)
> I hope others has a better idea on this problem.
> P.S.
> You said that an error occurs when the package is being extracted but as it
> complains about the corrupted SP installation in the error message, I think
> it finishes extracting the package and the problem occurs when it's checking
> the system before applying the SP.
> --
> Ekrem ?nsoy
|||Thanks Ekrem,
I'm allready installing SP2...
I have my problem solved...
=)
|||That's a good news =)
I suggest you to be careful about installing SQL Server and its Service
Packs... For example, close any running apps that can\may prevent SQL Server
Setup to install its components successfully. It was your computer this time
but it could be an important SQL Server server. So ensure that there is a
clean and pure running system before starting installing SQL Server and its
Service Pack or something.
To learn better you could buy some books about SQL Server and your best
online assistant will be Books Online. Take advantage of it.
Good luck.
Ekrem ?nsoy
"Sonia.Madureira" <SoniaMadureira@.discussions.microsoft.com> wrote in
message news:BDDAFBE5-0CE4-4831-8827-314F87C4E5F0@.microsoft.com...
> Thanks Ekrem,
> I'm allready installing SP2...
> I have my problem solved...
> =)

Need Help... Urgent!

I've installed SQL Server 2005 from MSDN, however, while I was trying to
install the SP1 from the same DVD, it said:
"Shared String ID 11217 Not Found" with the body of the message saying
"Shared String ID 11216 Not Found"...
What could I do? How do I solve this?
I went to Microsoft.com to download the SP1 directly from there.. But the
error continues...
Thanks...Hi Sonia,
Why dont you apply SP2 directly?
--
Ekrem Ã?nsoy
"Sonia.Madureira" <Sonia.Madureira@.discussions.microsoft.com> wrote in
message news:067A08DC-D5B1-4734-B24D-3A23E951F562@.microsoft.com...
> I've installed SQL Server 2005 from MSDN, however, while I was trying to
> install the SP1 from the same DVD, it said:
> "Shared String ID 11217 Not Found" with the body of the message saying
> "Shared String ID 11216 Not Found"...
> What could I do? How do I solve this?
> I went to Microsoft.com to download the SP1 directly from there.. But the
> error continues...
> Thanks...|||Hi Ekrem,
Thanks for answer.. I've tried right now to install SP2 but it didn't work
out either..
When it's extracting, occours an error saying:
"The following error occoured", same in body - OK
When I click in OK it shows:
"A recently applied update, , failed to install" and in the content of the
report it says:
"EventType: sqlsetup P1 : unknown P2 : 0x0 P3 : unknown ..." , the
unknown repeats until P10...
Can you Help me?
"Ekrem Ã?nsoy" wrote:
Hi Sonia,
Why dont you apply SP2 directly?
--
Ekrem Ã?nsoy|||I'm not sure if your prior SP installation attempt broke some SQL Server
binaries or not but it look's like it did. As you do not have a chance to
uninstall only the SP installation (that corrupted one), there is not
emerging an idea in my mind but to uninstall the problematic SQL Server
instance and install a new SQL Server instance from scratch and applying SP2
then.
I don't know your environment and if it's an important SQL Server instance
and can not be offline for a while or something don't blame me for my
comments =)
I hope others has a better idea on this problem.
P.S.
You said that an error occurs when the package is being extracted but as it
complains about the corrupted SP installation in the error message, I think
it finishes extracting the package and the problem occurs when it's checking
the system before applying the SP.
--
Ekrem Ã?nsoy
"Sonia.Madureira" <SoniaMadureira@.discussions.microsoft.com> wrote in
message news:523C6A93-BF60-492A-A58F-DF9729087D2E@.microsoft.com...
> Hi Ekrem,
> Thanks for answer.. I've tried right now to install SP2 but it didn't work
> out either..
> When it's extracting, occours an error saying:
> "The following error occoured", same in body - OK
> When I click in OK it shows:
> "A recently applied update, , failed to install" and in the content of the
> report it says:
> "EventType: sqlsetup P1 : unknown P2 : 0x0 P3 : unknown ..." , the
> unknown repeats until P10...
> Can you Help me?
>
>
>
> "Ekrem Ã?nsoy" wrote:
> Hi Sonia,
> Why dont you apply SP2 directly?
> --
> Ekrem Ã?nsoy
>|||Thanks Ekrem,
I'll uninstall SQL and try again.
I've started this week serving as aprenctice in a company of services,
software, harware... So, they want me to learn as logic that is... (by the
way, forgive me my mistakes, i'm portuguese)
We install PC's, servers, etc in clients.. So we use SQL server...
They told me to install SQL server in my PC to start learning and when
errors occour, they answer to looke online.. I am looking everywhere but with
no luck... =( LOL
Thanks for helping me Ekrom... I will try to uninstall now... And try
again... =)
"Ekrem Ã?nsoy" wrote:
> I'm not sure if your prior SP installation attempt broke some SQL Server
> binaries or not but it look's like it did. As you do not have a chance to
> uninstall only the SP installation (that corrupted one), there is not
> emerging an idea in my mind but to uninstall the problematic SQL Server
> instance and install a new SQL Server instance from scratch and applying SP2
> then.
> I don't know your environment and if it's an important SQL Server instance
> and can not be offline for a while or something don't blame me for my
> comments =)
> I hope others has a better idea on this problem.
> P.S.
> You said that an error occurs when the package is being extracted but as it
> complains about the corrupted SP installation in the error message, I think
> it finishes extracting the package and the problem occurs when it's checking
> the system before applying the SP.
> --
> Ekrem Ã?nsoy|||Thanks Ekrem,
I'm allready installing SP2...
I have my problem solved...
=)|||That's a good news =)
I suggest you to be careful about installing SQL Server and its Service
Packs... For example, close any running apps that can\may prevent SQL Server
Setup to install its components successfully. It was your computer this time
but it could be an important SQL Server server. So ensure that there is a
clean and pure running system before starting installing SQL Server and its
Service Pack or something.
To learn better you could buy some books about SQL Server and your best
online assistant will be Books Online. Take advantage of it.
Good luck.
--
Ekrem Ã?nsoy
"Sonia.Madureira" <SoniaMadureira@.discussions.microsoft.com> wrote in
message news:BDDAFBE5-0CE4-4831-8827-314F87C4E5F0@.microsoft.com...
> Thanks Ekrem,
> I'm allready installing SP2...
> I have my problem solved...
> =)|||Thanks so much for helping me...
I have a lot to learn... =)
i will look for ebooks about it...
Thanks again!

Need Help. Please

Hi there,
I know it is a bit odd to ask questions on my first posting. I'm new at setting up a MS SQL 2000 Server. I would really appreciate if you can help clarify a few of my questions :) .
I'm considering to buy SQL 2000 Ent. Ed and Windows Server 2003 Ent. Ed. for my two new Servers. I've tried to contact MS customer support, but they are not very helpful :( . I've searched many articles, most of them are not very helpful in helping me make the decision :( .
I would like to set up a cluster with two Windows 2003 Server Ent. Ed. One for active SQL2000 Ent. Ed. and another one for passive. Can this work?
For the Server running the passive SQL 2000. I'll be running a java networking application. I would like to know if the passive windows server 2003 fails, will the Windows Server 2003 be able to handle the failover and transfer my java application to the other server. :confused:
Thanks a lot in advance. Any help is appreciated.

Best Regards,
Keen HonTypically, Microsoft prefers the customer to engage either an OEM or a Microsoft Solutions Provider for this kind of pre-sales support, but that is no reason for them to ignore your request. How did you try to contact customer support?

-PatP|||I called the Customer Care Centre (Microsoft Careline) for my Country in Singapore. I also called some of the Resellers. Maybe I will call the OEM to try my luck.

- KH|||You do know what you're configuring will be a lot of cash...

And you should probably get another box for the app server...

You do know that clustering is NOT for load balancing...right....and don't you want another box for shared Disk?|||Of course your application will be failed over...only if you make it a cluster-aware service.

need help. need to check a value inside a sql statement

What i need to do is check a field inside a sql statement to see if it is null and if it is then change the value to a 0.

for example

select Field1,field2,field3(if null then =0)
from table1

does this make sense. I think in oracle PL/SQL is uses decode(field3, null... or something like that

any help would be appreciated

thanksYou can use either the coalesce function which takes the first non-null value in a list, or the isnull function. I understand coalesce is more ansi-sql friendly, and I believe is implemented in Oracle as well.|||Example:

select Field1, field2, isnull(field3, 0) from table1

or

select Field1, field2, coalesce(field3, 0) from table1

blindman|||I am trying to put this in a MS access query

My statement look like this

Select Table_Name.Field1, Table_name.Field2, ISNULL(Table_Name.Field3,0),Table_Name.field4
from Table, Table
where....

I get an error message saying

" wrong number of arguments used with function in query expression
ISNULL(LDSSHLRN_LDMCH1.QMCHRS,0"

thanks|||I am trying to put this in a MS access query

My statement look like this

Select Table_Name.Field1, Table_name.Field2, ISNULL(Table_Name.Field3,0),Table_Name.field4
from Table, Table
where....

I get an error message saying

" wrong number of arguments used with function in query expression
ISNULL(LDSSHLRN_LDMCH1.QMCHRS,0"

thanks|||MS Access does not use the same exact same function list as SQL Server. The ISNULL function in MS Access takes a single parameter and returns a boolean value indicating whether the parameter was null.

The MSAccess function you are looking for is "NZ", short for Null to Zero.

Select Table_Name.Field1, Table_name.Field2, NZ(Table_Name.Field3,0),Table_Name.field4
from Table, Table

MS Access SQL is hybridized with VB.

blindman

Need Help.

I m using SQL SERVER EXPRESS edition for storing user login information. I have use built in login controls in my application. Login is working properly, user are also created but i also want to assign roles to users and modify their details programmatically.

How can i do this ? Plzzzzzzz Help. Its urgent.

These resouces should help point you in the 'right' direction:

Security -Giving Permissions through Stored Procedures
http://www.sommarskog.se/grantperm.html

SQL Server 2005 Security
http://msdn.microsoft.com/msdnmag/issues/05/06/SQLServerSecurity/

need help, How to change datatype in order to sort some extracted numbers from string

Hello,

I am trying to extract from some strings like the following strings the number and order them by that number:

Box 1
Box 2
Box 3
Box 20
Box 21
...(and so on)

The problem I am having is that I already extracted the number using

Substring([field],[starting position],[lenght])

but the output seems to be in a string format, so the order is not in an ascending order.

Thanks for any suggestions.

You need to cast the result as a number. It looks like your number is always an integer so the following should do it:

(DT_I4)Substring([field],[starting position],[lenght])

-Jamie

|||I tried it but I am getting an SQL Execution Error message,

I am doing this on the Query Builder using Visual Studio 2005.net

|||

If you're getting an error message its useful to post it up here!

-Jamie

|||Sorry, I am behind a very restrictive firewall at work, doesnt let me get inthere!

Why should I post it somewhere else, anyways?

|||

mendez_edd wrote:

Sorry, I am behind a very restrictive firewall at work, doesnt let me get inthere!

It doesn't let you get to where? Can you replicate the error in BIDS?

mendez_edd wrote:


Why should I post it somewhere else, anyways?

Posting the error message helps people deduce what is causing the error!

-Jamie

|||

Where are you doing this? Jamie’s solution was for a SSIS expression as you might use in the Derived Column Transform. Your did mention a SQL exception, but since this is a SSIS forum, we are kind of thinking you may want a SSIS solution.

To sort like a number, convert the value to a number, so strip off the text as Jamie suggested, or pad the numeric part with spaces ans sort as a string–
Box 1
Box 2
Box 21
Box 22

(Note the extra space for single digit numbers.)

Regardless of your firewall you can post to this forum, so could you not type the error message text you get into a post?

Need Help, fast

I have a SP which is having an odd problem. There is an int which I am
using to to return several different queries in the SP. The first
query gets the value of the int based on a date, @.minsess. @.minsess is
then used in multiple queries in the SP. For some reason if I replace
@.minsess with a value say 656 then query plan changes and the entire sp
executes in seconds, with @.minsess each query takes much longer
resulting in the SP taking more than a minute to execute.
A dumbed down version of this would be like this.
Select @.minsess = min(sessionid) from table1 where FileDate >=
CONVERT(varchar(10), getdate() - 3, 112)
Select * FRom table2 where sessionid >= @.minsess
Select * FRom table2 where sessionid >= 656
In this example @.minsess would equal 656. Both are INTs, why in the
world would the first table2 hit take multiple times longer to return
than the second?For a parameter to a stored procedure, the optimizer picks up the value for
when the execution plan
is created ("first execution") and put into cache. This is the value the opt
imize base its execution
plan on.
For a constant, then the optimize know the value.
For a variable, the optimizer doesn't know the value and have to guess the s
electivity (number of
rows that matches).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Paul Moore" <ptmoore@.gmail.com> wrote in message
news:1108047830.104598.326620@.o13g2000cwo.googlegroups.com...
>I have a SP which is having an odd problem. There is an int which I am
> using to to return several different queries in the SP. The first
> query gets the value of the int based on a date, @.minsess. @.minsess is
> then used in multiple queries in the SP. For some reason if I replace
> @.minsess with a value say 656 then query plan changes and the entire sp
> executes in seconds, with @.minsess each query takes much longer
> resulting in the SP taking more than a minute to execute.
> A dumbed down version of this would be like this.
> Select @.minsess = min(sessionid) from table1 where FileDate >=
> CONVERT(varchar(10), getdate() - 3, 112)
> Select * FRom table2 where sessionid >= @.minsess
>
> Select * FRom table2 where sessionid >= 656
> In this example @.minsess would equal 656. Both are INTs, why in the
> world would the first table2 hit take multiple times longer to return
> than the second?
>|||You get this problem because you use a variable in a WHERE clause. Because
the Query Optimizer doesn't know at compile time what the value of the
variable will be, it decides on a query plan based on an estimate of the
number of rows that will be returned. For a >= comparison it assumes 30% of
the rows will be returned IIRC.
If you change your code to:
Select * FRom table2 where sessionid >= (Select min(sessionid) from table1
where FileDate >=
CONVERT(varchar(10), getdate() - 3, 112))
the Query Optimizer will come up with a faster execution plan.
Jacco Schalkwijk
SQL Server MVP
"Paul Moore" <ptmoore@.gmail.com> wrote in message
news:1108047830.104598.326620@.o13g2000cwo.googlegroups.com...
>I have a SP which is having an odd problem. There is an int which I am
> using to to return several different queries in the SP. The first
> query gets the value of the int based on a date, @.minsess. @.minsess is
> then used in multiple queries in the SP. For some reason if I replace
> @.minsess with a value say 656 then query plan changes and the entire sp
> executes in seconds, with @.minsess each query takes much longer
> resulting in the SP taking more than a minute to execute.
> A dumbed down version of this would be like this.
> Select @.minsess = min(sessionid) from table1 where FileDate >=
> CONVERT(varchar(10), getdate() - 3, 112)
> Select * FRom table2 where sessionid >= @.minsess
>
> Select * FRom table2 where sessionid >= 656
> In this example @.minsess would equal 656. Both are INTs, why in the
> world would the first table2 hit take multiple times longer to return
> than the second?
>|||Thanks

Need help, error with store proc

I am trying to do an insert with a SPand I get the following error: "The name 'A2LA Website' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted."
When iParentID=30 and strTexte="A2LA Website"

What an I doing wrong?

Table:
ID int(identity)
ParentID int
Text nvarchar(50)
Valeur nvarchar(50) Allow Null
Ordre int Allow Nulls


Public Sub addItemToDdSelection(ByVal strTable As String, ByVal iParentID As Int16, ByVal strTexte As String)
Dim connect As New SqlConnection(strConnection)
Dim cmdSelect As New SqlCommand("AddDropDownContent", connect)
Dim paramReturnValue As SqlParameter
Dim strError As String

cmdSelect.CommandType = CommandType.StoredProcedure
'PARAM
cmdSelect.Parameters.Add("@.intParentID", iParentID)
cmdSelect.Parameters.Add("@.strTexte", strTexte)
Try
connect.Open()
cmdSelect.ExecuteNonQuery()
connect.Close()
Catch ex As Exception

strError = ex.Message
Finally
If connect.State = ConnectionState.Open Then
connect.Close()
End If
End Try
End Sub

ALTER PROCEDURE dbo.AddDropDownContent
(
@.intParentID int,
@.strTexte varchar(50)
)
AS
EXEC ('INSERT INTO DropDownMenus (ParentID, Texte) VALUES(' + @.intParentID + ',"' + @.strTexte + '")')

(1) when you add parameters, specify their type/lengths too
xample :
cmdSelect.Parameters.Add("@.intParentID", iParentID)
should be

cmdSelect.Parameters.Add(New SqlParameter("@.intParentID",SqlDbType.int))
cmdSelect.Parameters("@.intParentID").Value = Trim(iParentID)

and
(2) you dont need dynamic sql to insert. you can modify your insert stmt as

Create Procedure ...
AS
SET NOCOUNT ON
INSERT INTO DropDownMenus (ParentID, Texte) VALUES ( @.intParentID ,@.strTexte )

SET NOCOUNT OFF

hth|||Thanks for your reply this is really helping. A few questions,
-Trim(iParentID) is used in case the id is enter from a text box I guess?
-What is the role of the line "SET NOCOUNT ON" and "SET NOCOUNT OFF"?|||>>-Trim(iParentID) is used in case the id is enter from a text box I guess?

yes. you might also want to do a

Convert.ToInt16(Trim(iParentId))
to make sure you are sending in an integer type value. Its a good idea to validate user input.

>>What is the role of the line "SET NOCOUNT ON" and "SET NOCOUNT OFF"?

read up BOL (Books On Line)

hth

Need Help, DTS is Running extremely Slow!

Hi guys.

I have a DTS package ON SQL 2000 which transfer data from AS400 to SQL 2000 using an ODBC Client Access 5.1 (The DSN was configured by a sysdmin on the AS400 so it is configured properly).
When i execute the package manualy (by right click and "execute package") the package runns fine and ruterns data in no time (Eproximatly 30000 rows in 15 sec).

The problem starts when a job executes the same packagee!!!
When i start the job, the DTS package is running Very Very Slow!!!!
sometime it takes Hours to return a few rows! and it seems that it is stuck.

The SQLAgent is running as a NT Account with Administrator rights, and has full access to the AS400!! so the problem is not the Agent.

by monitoring the AS400, i have noticed that the job/DTS is retreaving the first fetch quickly , and then it is in a waiting status

i have tried everything and cant seem to get this problem fixed

Does anyone know what could be the problem?
I Need Help Quick!!!
Thank You

GilTo maximize CPU resources, you can define a CPU idle condition for SQL Server Agent. SQL Server Agent uses the CPU idle condition setting to determine the most advantageous time to execute jobs.

For example, you can schedule a daily backup job to occur during CPU idle time and slow production periods.

Before you define jobs to execute during CPU idle time, determine how much CPU the job requires. You can use SQL Server Profiler or Windows NT Performance Monitor to monitor server traffic and collect statistics. You can use the information you gather to set the CPU idle time percentage.

Define the CPU idle condition as a percentage below which the average CPU usage must remain for a specified time. Next, set the amount of time. When this time has been exceeded, SQL Server Agent starts all jobs that have a CPU idle time schedule.

But test it before deploying on production.|||Thnx for replying Satya,

I am afraid this ahs nothing to do with CPU resources. Even when i start the job manualy when there is no activity at all an the server the DTS runs Very Very Slow.

I am prety sure that there is somthing else to be done , allthow i will try your advise.

Any suggestions?|||The are a number of thing you can do. It's specific to your job. First of all who has control. AS400 or the database(SQL). I don't know of a DTS package in AS400. So start there, next, you might want to look at the parameters manually vs job. Are there any environmental issues to look at. Such as: numbers of records to commit, indexes, maintenance and backups, buffers size, Look it up on books online SQL Server.|||AS400?

You mean DB2, no?

Have the DB2 dba set up an unload then copy the data to your box...

Then bcp the data in

I know that doesn't address your problem...

What's the execution step in the job look like?

One difference in your methods is the context of which ID is being used.

When you execute it from EM, it's under the context of your id, AND your location.

From the job, it's under the context of the agent AND the server drive mappings..

I'm guessing it's a network issue...

Did the job ever finish?|||Thnx alll 4 replying,

But i am afriad that that is not the problem...

I think i have solved it though...

The Client Access has an option to translate data by a DLL.
it was using one...dont know its name.

removing this dll solved the problem and the job is executing fine now.

thank you all for helping

Gil

Need help, crystal 8.5 trying to open diferent DSN...

Hi...

I have an application in VB6 and CR8.5 with MSSQL, this app is multi-company, means that have to open 1 or more MSSQL databases, opening the first DSN (ODBC) is ok (opening directly is another headache), but when I try to open a diferent DSN to open another DB by code I get the message "Server has not yet been opened".

Note that I am using Crystal Designer and Viewer control, it seems that the crystal is only opening the DSN that is set by default in designer window... I dont know what am I doing wrong...

Thanks in advance

PD1: sorry my english is not good at all...

PD2: This is the code to open report:
--- CODE ----
Dim m_Report As New tax_rpt_anulados 'set original report to variable

m_Report.Database.LogOnServer "pdsodbc.dll", "DSNname","DBname", "username", "password"
m_Report.RecordSelectionFormula = "{tax_anulados.tipoComprobante}=1"
m_Report.ReportTitle = "Title of report"
CRViewer1.ReportSource = m_Report
CRViewer1.ViewReportHi again guys, dont worry about this question I already solved...

Thanks anyway...

Need help, crosstab?

Dear all,

I am a newbie and I have a problem to generate a crystal report...

suppose the data is:

Process style A Style B Style C Style D
1 50 40 100 10
2 100 200 40 20
3 40 70 40 30
4 60 80 40
5 90 150 50
6 150
7 150 170
8 75
(each max number of process is A=8, B=5, C=7, D=5)

Can i display it in one report with the following format?

PROCESS
-------------------
1 2 3 4 5 6 7 8
--------------------
Style A 50 100 40 60 90 0 150 75

PROCESS
----------------
1 2 3 4 5
----------------
Style B 40 200 70 80 150
Style D 10 20 30 40 50

------------------
1 2 3 4 5 6 7
------------------
Style C 100 40 40 0 0 150 170

I tried with the crosstab and the result is:
PROCESS
-------------------
1 2 3 4 5 6 7 8
--------------------
Style A 50 100 40 60 90 0 150 75
Style B 40 200 70 80 150 0 0 0
Style C 100 40 40 0 0 150 170 0
Style D 10 20 30 40 50 0 0 0

Seems like the crosstab presented the max number of all the process (in this case 'Style A' and put zero (or blank if suppressed) for the other styles, although there are no data with process number 6,7,8 for style B and D, and process number 8 for style C

can anyone help me please, i'm stuck..

thanks in advanceso sorry, the previous post did not display the data correctly

the data is:

Process Style A
1.50
2.100
3.40
4.60
5.90
6.-
7.150
8.75

Process Style B
1.40
2.200
3.70
4.80
5.150

Process Style C
1.100
2.40
3.40
4.-
5.-
6.150
7.170

Process Style D
1.10
2.20
3.30
4.40
5.50

thanks