Showing posts with label urgent. Show all posts
Showing posts with label urgent. Show all posts

Wednesday, March 21, 2012

plzz help urgent

hi friends,
this is kesh here. i hav doubts in creating crystal reports. how to convert the crystal reports in pervasive.sql2000i to DB2.
i am totally confused .plz help me in finding out a way.
thanx in advance.open the report and use SelLocation & Set Alias|||open the report and use SelLocation & Set Alias

It should be SetLocation

Tuesday, March 20, 2012

pls/sql help needed urgent.

database:Oracle 7.x
coding:pl/sql
table_size:125 million rows
table_name: ORDER_PROC

columns:
Name Null? Type
---------- --- --
CUST_ID NOT NULL NUMBER(10)
DIV_CODE NOT NULL CHAR(2)
ORDER_ID NOT NULL CHAR(8)
LINE_NBR NOT NULL NUMBER(4)
TOTAL_DEMAND_AMT NUMBER(9,2)
ORDER_DISC_AMT NUMBER(9,2)
DISC_AMT NUMBER(9,2)
ORDER_DEMAND_AMT NUMBER(9,2)
INSERT_DATE DATE

Requirement: Update disc_amt
Formula: disc_amt=(total_demand_amt/order_demand_amt)*order_disc_amt
Condition: Order_disc_amt > 0

Read a summary of order_proc information into a cursor (summarize at cust_id, div_code, order_id level) Summarize total demand amt (line_nbr) and order_disc_amt (order_id). This summary data is required in updating.

I am Unix & SQL guy. I am not a pl/sql coding person. I know very little about cursors. struggled a week with my limited knowledge, now asking for help from a pl/sql expert. Any questions...? Thanking you in advance.Originally posted by hnvhelp
database:Oracle 7.x
coding:pl/sql
table_size:125 million rows

columns:
Name Null? Type
---------- --- --
CUST_ID NOT NULL NUMBER(10)
DIV_CODE NOT NULL CHAR(2)
ORDER_ID NOT NULL CHAR(8)
LINE_NBR NOT NULL NUMBER(4)
TOTAL_DEMAND_AMT NUMBER(9,2)
ORDER_DISC_AMT NUMBER(9,2)
DISC_AMT NUMBER(9,2)
ORDER_DEMAND_AMT NUMBER(9,2)
INSERT_DATE DATE

Requirement: Update disc_amt
Formula: disc_amt=(total_demand_amt/order_demand_amt)*order_disc_amt
Condition: Order_disc_amt > 0

Summarize total_demand_amt (at line_nbr level) and order_disc_amt (at order_id level) grouped by cust_id, div_code & order_id.

I am Unix & SQL guy. I am not a pl/sql coding person. I know very little about cursors. struggled a week with my limited knowledge, now asking for help from a pl/sql expert. Any questions...? Thanking you in advance.
It is not clear to me whether the "Summarize..." sentence relates to the update, or is a separate requirement.

Assuming it is a separate requirement, the update would be simply:

UPDATE tablename
SET disc_amt=(total_demand_amt/order_demand_amt) * order_disc_amt
WHERE Order_disc_amt > 0;

I'm not sure I understand the next bit. Could be:

SELECT cust_id, div_code, order_id, SUM(total_demand_amt), SUM(order_disc_amt)
FROM tablename
GROUP BY cust_id, div_code, order_id;

... but that may not be quite right.|||to andrewst,

Yes, Summarize relates to the update statement. First, read this summary of data into a cursor (inluding cust_id, div_code, order_id) and then update the corresponding disc_amt whose order_disc_amt > 0.

another different question:
And even if it is a direct update, can we update a table simply using a update statement who has 125+ million rows...?|||Originally posted by hnvhelp
to andrewst,

Yes, Summarize relates to the update statement. First, read this summary of data into a cursor (inluding cust_id, div_code, order_id) and then update the corresponding disc_amt whose order_disc_amt > 0.

another different question:
And even if it is a direct update, can we update a table simply using a update statement who has 125+ million rows...?
I can't really follow the requirements for this update. Maybe you could post an example with data before and after?

Yes, you can update a 125+ million row table with an UPDATE statement. Depending on what percentage of rows in the table the UPDATE will modify, you may need a large rollback segment, but using a single UPDATE statement is much more efficient than using PL/SQL cursors and loops.

pls pls pls need help(Urgent)

hi ,
pls tel m how can i get the selected parameter multivalue to my designer textbox. i have tried like following

1) Parameters!BU.Label - error occured
2) Parameters!BU.value(0) - only first value
3) join(Parameters!BU.value,",") - return the uinquename like [Account dsc].[Business_Unit].&[1]

but i need to get the only selected values. not the uniquename, not the first one. if i select three values in the param it should display. pls help me on this.

You were almost there!!

="Business Units " & JOIN(Parameters!test.Label," ,")

Monday, March 12, 2012

pls help.......very urgent....

is there any possible way to have a page break each time a text field from the report changes.

i am using CR 8.5 and VB6

if possible can anyone who has the answer pls contact on msn mesenger....
amit_mash@.hotmail.com

PS: i am attaching a report i generated. i want to have a page break each time the value of the text field containing 'Blood Routine (CBC)' changes.The field you want to page break on first must be part of a sort group. Then the group header and footer will appear. In Format Section select the group and check page break before or after as needed.

Pls Help very urgent

Hi All,
I attached my report with this thread.Pls give me the solution for the following.
when i am selecting the specified record from the field the report shows all the records.
Pls give me the suggestion for the error
Bye
BalaSorry I don't understand your question. Please be more specific about what is wrong with your report, and what are you trying to achieve.|||use record selection formula.. the report u have attached doesnt have any record selection formula to filter records..

zeeshangodil@.hotmail.com

Pls Help Urgent

Hi all,
I have a transcript report which has 2 groups and details of that groups and it is using multiple column. In this students marks will be showing. My problem is even though the student took one subject or five subject i have to show five records into the details section of the report. If the student took only one subject the remaining 4 will be blank and into my table there is only the same no. of data which student took for the concerned term of study. so that it will looks like blocks according to each Term of the study. Now i am getting this as unorganized that is if there is only 2 records means there will be 2 records into the details section... so the format will not coming as blocks for each group...
So pls help to solve this problem
Thanks in advanceCreate stored procedure getting number as input parameter
If the number is 5 then select all five columns
If it is 4, select 4 columns ,etc

In the front end application
Give commands

Crrpt.DiscardSavedData
Crrpt.Database.verify

Pls Help - Urgent handling "-" in query

Hi,

i am using sp_addlinkedserver to connect with my another server.
Let say my current server name is anand and other server name is anand-new

now sp_addlinkedserver worked ok

Now i want to fetch some record from the anand-new server.

I am writing my query in I server (i.e. Anand)

SELECT TOP 10 * FROM anand-new.NEWSITE.DBO.Xyz_NEW

I am getting error

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '-'.

Pls help

Its urgent

Cheers,
AnandSELECT TOP 10 * FROM [anand-new.NEWSITE.DBO.Xyz_NEW]|||Sounds like you (or your DBA) should avoid using such characters in server names! I hate seeing SQL that is full of square brackets!

Friday, March 9, 2012

Pleeeease help! Urgent! DBCC Reindex left table inaccesible

Hello there!
Where to turn if not to this group when one is in dire need and all
other resources have been tried? =)
But ok - now for the serious part. Our maintenance plan failed to
execute yesterday, a certain table 'memberContacts' couldn't be
reindexed and was left inaccesible!!! :(
Ok, so currently 'memberContacts' has about 800 000 rows, not that much
really. The failure is related to indexex, and if we look at the table
using 'sp_helpIndex' - we get the following (where I suppose that the
autogenerated '== ?' and '?8 ' seems like bad moves) :
---
== ? clustered, hypothetical, auto create located on PRIMARY
ContactDate, ReturnDate, OfficeID
hind_18203215_10A_3A nonclustered, hypothetical, auto create located on
PRIMARY OfficeID, ContactDate
hind_18203215_10A_4A nonclustered, hypothetical, auto create located on
PRIMARY OfficeID, ReturnDate
hind_18203215_10A_9A nonclustered, hypothetical, auto create located on
PRIMARY OfficeID, TempLockedByAdminUser
hind_18203215_3A_10A nonclustered, hypothetical, auto create located on
PRIMARY ContactDate, OfficeID
hind_18203215_3A_4A nonclustered, hypothetical, auto create located on
PRIMARY ContactDate, ReturnDate
hind_18203215_3A_4A_10A nonclustered, hypothetical, auto create
located on PRIMARY ContactDate, ReturnDate, OfficeID
hind_18203215_3A_4A_9A nonclustered, hypothetical, auto create
located on PRIMARY ContactDate, ReturnDate, TempLockedByAdminUser
hind_18203215_3A_9A nonclustered, hypothetical, auto create located on
PRIMARY ContactDate, TempLockedByAdminUser
hind_18203215_4A_10A nonclustered, hypothetical, auto create located on
PRIMARY ReturnDate, OfficeID
hind_18203215_4A_3A nonclustered, hypothetical, auto create located on
PRIMARY ReturnDate, ContactDate
hind_18203215_4A_9A nonclustered, hypothetical, auto create located on
PRIMARY ReturnDate, TempLockedByAdminUser
hind_18203215_9A_10A nonclustered, hypothetical, auto create located on
PRIMARY TempLockedByAdminUser, OfficeID
hind_18203215_9A_4A nonclustered, hypothetical, auto create located on
PRIMARY TempLockedByAdminUser, ReturnDate
hind_c_18203215_10A clustered, hypothetical, auto create located on
PRIMARY OfficeID
hind_c_18203215_3A clustered, hypothetical, auto create located on
PRIMARY ContactDate
hind_c_18203215_4A clustered, hypothetical, auto create located on
PRIMARY ReturnDate
hind_c_18203215_9A clustered, hypothetical, auto create located on
PRIMARY TempLockedByAdminUser
IX_ContactDate nonclustered located on PRIMARY ContactDate
IX_MemberID nonclustered located on PRIMARY MemberID
IX_ReturnDate nonclustered located on PRIMARY ReturnDate
IX_TempLockedByAdminUser nonclustered located on PRIMARY
TempLockedByAdminUser
?8 clustered, hypothetical, auto create located on PRIMARY
ContactDate, ReturnDate
MemberContacts1 clustered located on PRIMARY
TempLockedByAdminUser, ReturnDate
PK_MemberContacts nonclustered, unique, primary key located on PRIMARY
MemberContactID
---
Now removing the badly named autogenerated indexes probably should solve
the problem. But since these are named quite inproperly the can't be
deleted. And any 'selects' or other attempts to view the table resulst
in :
---
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 57 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection Broken
---
So how do I go about removing the bad indexes?
MANY MANY MANY THANX (and a very merry x-mas to you all)
Regards,
JohanJust found the answer - in article
http://support.microsoft.com/default.aspx?
scid=http://support.microsoft.com:80/support/kb/articles/Q293/1/77.ASP&N
oWebContent=1
But since this only recognizes the problem with 'hind%'-indexes you'll
have to adjust statement to include (for example) '== '. This problems
seems to have been a well known fact for sql7 and "known" for sql2000.
After scanning this newsgroup it seems that I'm not the only one
experiencing this problem, and it seems to have risen to "fame" with
sp3a...
2 words - "fuck" & "microsoft"...
Peace,
Johan
In article <MPG.1a479cba5768a7ea989680@.news.internet5.net>, johan@.fap.se
says...
> Hello there!
> Where to turn if not to this group when one is in dire need and all
> other resources have been tried? =)
> But ok - now for the serious part. Our maintenance plan failed to
> execute yesterday, a certain table 'memberContacts' couldn't be
> reindexed and was left inaccesible!!! :(
> Ok, so currently 'memberContacts' has about 800 000 rows, not that much
> really. The failure is related to indexex, and if we look at the table
> using 'sp_helpIndex' - we get the following (where I suppose that the
> autogenerated '== ?' and '?8 ' seems like bad moves) :
> ---
> == ? clustered, hypothetical, auto create located on PRIMARY
> ContactDate, ReturnDate, OfficeID
> hind_18203215_10A_3A nonclustered, hypothetical, auto create located on
> PRIMARY OfficeID, ContactDate
> hind_18203215_10A_4A nonclustered, hypothetical, auto create located on
> PRIMARY OfficeID, ReturnDate
> hind_18203215_10A_9A nonclustered, hypothetical, auto create located on
> PRIMARY OfficeID, TempLockedByAdminUser
> hind_18203215_3A_10A nonclustered, hypothetical, auto create located on
> PRIMARY ContactDate, OfficeID
> hind_18203215_3A_4A nonclustered, hypothetical, auto create located on
> PRIMARY ContactDate, ReturnDate
> hind_18203215_3A_4A_10A nonclustered, hypothetical, auto create
> located on PRIMARY ContactDate, ReturnDate, OfficeID
> hind_18203215_3A_4A_9A nonclustered, hypothetical, auto create
> located on PRIMARY ContactDate, ReturnDate, TempLockedByAdminUser
> hind_18203215_3A_9A nonclustered, hypothetical, auto create located on
> PRIMARY ContactDate, TempLockedByAdminUser
> hind_18203215_4A_10A nonclustered, hypothetical, auto create located on
> PRIMARY ReturnDate, OfficeID
> hind_18203215_4A_3A nonclustered, hypothetical, auto create located on
> PRIMARY ReturnDate, ContactDate
> hind_18203215_4A_9A nonclustered, hypothetical, auto create located on
> PRIMARY ReturnDate, TempLockedByAdminUser
> hind_18203215_9A_10A nonclustered, hypothetical, auto create located on
> PRIMARY TempLockedByAdminUser, OfficeID
> hind_18203215_9A_4A nonclustered, hypothetical, auto create located on
> PRIMARY TempLockedByAdminUser, ReturnDate
> hind_c_18203215_10A clustered, hypothetical, auto create located on
> PRIMARY OfficeID
> hind_c_18203215_3A clustered, hypothetical, auto create located on
> PRIMARY ContactDate
> hind_c_18203215_4A clustered, hypothetical, auto create located on
> PRIMARY ReturnDate
> hind_c_18203215_9A clustered, hypothetical, auto create located on

please............ need urgent help on mdx parameter passing


i need to pass parameter to quarter and the year. dnt knw how to pass the it using strtoset. ?
please help me

WITH

SET [FilteredBUSet] AS strtoset(@.Paramater5,constrained)
SET [FilteredAccountSet] AS '[Account—BUSegmentBCDsc].[Billing Code Description].members'

SET [CustomTimeSet] AS 'Descendants([Date—Fiscal].[All Date—Fiscal].[2005].[Quarter 1]:
[Date—Fiscal].[All Date—Fiscal].[2006].[Quarter 2],[Date—Fiscal].[month],Leaves)'

SELECT
nonempty (CROSSJOIN([CustomTimeSet],INTERSECT([FilteredBUSet],[FilteredAccountSet])))ON ROWS,
{[Measures].[Total Revenue],[Measures].[Total Expenses]} ON COLUMNS
FROM Profitability

Well I feel that you should make Members in place of Set. But Still you can test your code as following...

You want to pass the set in peramater type STRTOSET('{....Type your Peramater Set here and then run your code.....}',constrained)

and see your query is ok or not other wise make calculated Members in place of Set and then check your code.

WITH

SET [FilteredBUSet] AS

STRTOSET('{........}',constrained)

SET [FilteredAccountSet] AS

'[Account—BUSegmentBCDsc].[Billing Code Description].members'

SET [CustomTimeSet] AS

'Descendants([Date—Fiscal].[All Date—Fiscal].[2005].[Quarter 1]:

[Date—Fiscal].[All Date—Fiscal].[2006].[Quarter 2],[Date—Fiscal].[month],Leaves)'

SELECT

NON EMPTY (

CROSSJOIN(

[CustomTimeSet],

INTERSECT([FilteredBUSet],[FilteredAccountSet])))ON ROWS,

{

[Measures].[Total Revenue],

[Measures].[Total Expenses]

} ON COLUMNS

FROM Profitability

Bhudev

|||still has some errors. problem is how to pass the parameter to the customtimeset
|||

Wick here I'm sending you one of my MDX Sample Query in which I'm using the parameters, by looking this I feel you may go ahead....

WITH

MEMBER [Measures].[EPUS] AS

CASE

WHEN StrToValue(@.EPUS) = 1 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 1]}

WHEN StrToValue(@.EPUS) = 2 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 2]}

WHEN StrToValue(@.EPUS) = 3 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 3]}

WHEN StrToValue(@.EPUS) = 4 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 4]}

WHEN StrToValue(@.EPUS) = 5 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 5]}

WHEN StrToValue(@.EPUS) = 6 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 6]}

WHEN StrToValue(@.EPUS) = 7 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 7]}

WHEN StrToValue(@.EPUS) = 8 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 8]}

WHEN StrToValue(@.EPUS) = 9 AND StrToValue(@.Production) = 1 THEN {[Measures].[Measure 9]}

WHEN StrToValue(@.EPUS) = 1 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 10]}

WHEN StrToValue(@.EPUS) = 2 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 11]}

WHEN StrToValue(@.EPUS) = 3 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 12]}

WHEN StrToValue(@.EPUS) = 4 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 13]}

WHEN StrToValue(@.EPUS) = 5 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 14]}

WHEN StrToValue(@.EPUS) = 6 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 15]}

WHEN StrToValue(@.EPUS) = 7 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 16]}

WHEN StrToValue(@.EPUS) = 8 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 17]}

WHEN StrToValue(@.EPUS) = 9 AND StrToValue(@.Production) = 2 THEN {[Measures].[Measure 18]}

END

SELECT

NON EMPTY {

STRTOSET(@.MISRange)

} ON 1,

NON EMPTY {

[Measures].[EPUS]

} ON 0

FROM (SELECT(STRTOSET(@.Customer,CONSTRAINED)) ON COLUMNS

FROM (SELECT(STRTOSET(@.UnitModel,CONSTRAINED)) ON COLUMNS

FROM (SELECT(STRTOSET(@.Country,CONSTRAINED)) ON COLUMNS

FROM (SELECT(STRTOSET(@.TimeProduction)) ON COLUMNS

FROM [My Cube]))))

Here I will pass [Time Production].[Time Calendar].[FY 2007] for @.TimeProduction

Bhudev

|||can u tell me the error of the following query? if there is error pls correct it. coz it has some errors. trying to pass the parameter to customtimeset

WITH

SET [FilteredBUSet] AS strtoset(@.BU)
SET [FilteredAccountSet] AS strtoset(@.Account)
SET [FParamYear] AS strtoset(@.FYear)
SET [FParamQuarter] AS strtoset(@.FQuarter)
SET [TParamYear] AS strtoset(@.TYear)
SET [TParamQuarter] AS strtoset(@.TQuarter)

SET [CustomTimeSet] AS Descendants([Date—Fiscal].[All Date—Fiscal].[FParamYear].[FParamQuarter]:
[Date—Fiscal].[All Date—Fiscal].[TParamYear].[TParamQuarter],[Date—Fiscal].[month],Leaves)

SELECT

{[Measures].[Total Revenue],[Measures].[Total Expenses]} ON COLUMNS ,
[CustomTimeSet] ON ROWS
--[Date—Fiscal].[All Date—Fiscal].[2006].[Quarter 1] on rows
FROM Profitability
|||You can't use sets in the unique name reference in the way you have. See my answer on your other thread https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1824709&SiteID=1|||

Hi,

Code looks fine, but what values you are passing for paramaters. can I know? I'm displaying the Sample values passed by me in my enviorment and it is working fine.

What Error Message you are getting. Have you tried without CONSTRAINT. Are you passing rite values....

Well I need to know what you are passing for @.Paramater5 and @.Quarter.

WITH

SET [FilteredBUSet] AS

STRTOSET('{[Customer].[Customer Name].&[1]}') --> @.Paramater5

SET [FilteredAccountSet] AS

'[Customer].[Customer Name].Members'

SET [CustomTimeSet] AS

DESCENDANTS(

STRTOMEMBER('[Time Production].[Time Calendar]'), --> @.Quarter

[Time Production].[Time Calendar].[Quarter],

LEAVES)

SELECT

NON EMPTY (

CROSSJOIN(

[CustomTimeSet],

INTERSECT([FilteredBUSet],[FilteredAccountSet]))) ON ROWS,

{

[Measures].[Total Revenue],

[Measures].[Total Expenses]

} ON COLUMNS

FROM [Profitability]

Bhudev

Monday, February 20, 2012

Please help!! Urgent

Hi guys,

we have a database here and something happened which causes a database block. We tried to run the 'sp_who' 'active' command to see the spid which locked the database, and we found out that some transaction is blocking another transaction. The following is the sample data results from the sp_who 'active'

spid ecid status loginame hostname blk dbname cmd

52 0 sleeping HOSTING\SQLMonitor BLUE2 185 tempdb INSERT
53 0 sleeping sa 10.10.10.106 185 mfgq_live SELECT
56 0 sleeping sa 10.10.10.106 175 mfgq_live UPDATE
57 0 sleeping sa 10.10.10.143 185 mfgq_live SELECT

We killed all spid which casuse the blocking, but they are keep on coming.

Does anybody have any idea on what casuses this problem or a teporary solution for this? Please help.

Thx

you need to findout what these process is actually doing.. run

dbcc inputbuffer(185) to see the sql statement which these spid is executing.

madhu