|
First of all, don't start a topic with some generic topic like "help". I had to click on it and read it to determine it's contents - something I don't do when there's not much time. People could have an easy answer and skip your question, simply because the topic doesn't provide any clue. Most people posting questions here on the boards are looking for help in one way or the other.
On to your problem; there are some free dictionaries here[^], but I never seen them and can't say much about them.
Ergane[^] has it's dictionaries available as a separate download.
Last alternative, you can download the wiktionary[^].
Good luck
Bastard Programmer from Hell
|
|
|
|
|
Hi,
I am using a SSRS report and the report is generated by executing a stored procedure.
The procedure gets 4 input values a,b,c,d where values c and d is a string containing multiple values.
I am executing a Complex SQL statement for all values of c and d.
For this reason i am using nested loop:
A as INPUT
B as INPUT
C as INPUT
D as input
Cursor Cur as OUTPUT
Loop for c
Loop for d
execute the SQL Statement(select
END loop
END Loop
problem:
Now the results of the SQL statement has to be saved temporarily somewhere I am not allowed use permanent tables and I m struglling using temporary tables.
If i save the value in the cursor each time the loop runs the previous results get overwritten.
|
|
|
|
|
Use a Table Variable to store temporary data.
Syntax:
DECLARE @TableVar1 table(
Col1 int NOT NULL,
Col2 varchar(100),
Col3 datetime
)
And then you can use it just like a physical table, e.g:
INSERT INTO @TableVar1 (Col1, Col2, Col3) VALUES (10, 'Hello', GETDATE())
|
|
|
|
|
Just to let you know.I am using this procedure in a package.
Where should I write the temp table declaration?
|
|
|
|
|
What does you mean by a package? Since you mentioned SSRS in your original post, I assumed the database to be SQL Server. AFAIK, SQL Server does not support packages, only Oracle does.
|
|
|
|
|
Sorry I didnt mention earlier..
I am writing the stored procedure in oracle.
I wanted to know if I can use a array and the store the results in the reference cursor which can be pulled by SSRS. but i dont know how to pass the values form array to reference
|
|
|
|
|
Shameel wrote:
AFAIK, SQL Server does not support packages, only Oracle does
FYI, SSIS (SQL Server Intergration Services) does use the term 'packages' for its code base.
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
I doubt it is going to be efficient to try to incrementally retrieve values from Oracle and use them in sql server.
So you have two steps.
1. Retreive the data from Oracle, all of it, and put it into a suitable data structure.
2. Use it in SSRS.
First step would probably be generally achieved by
A. Create appropriate temp table(s)
B. Populate table(s) from Oracle.
The design of the temp tables depends specifically on business information based on the what you are doing in SSRS and how that relates to the data in Oracle. So if you cannot determine the structure of the tables yourself you are going to need to explain the problem in detail or provide a sample that has been reduced from those requirements.
Keep in mind that you do NOT attempt step 2 until you have completed step 1.
|
|
|
|
|
Is there any posibility of Inner Query in my SQL as Like MS Sql?
|
|
|
|
|
|
You need to expand on your question so that we can answer it correctly and hopefully save you time.
also have a read of this in case the other answer is not what you are looking for.
MySQL Inner joins[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
|
Thanks for good comment dear...
but this syntex not working proper now i m sending my sample query on message board.
"SELECT * From tbladussentry where SID in (select Id from tbladusentry where SID in ( select ID from tbladuset where CID in(108,367)))"
|
|
|
|
|
I know you asked for subqueries however in this case I think joins are easier to read and more elegant:
select t1.*
From tbladussentry t1
join tbladusentry t2
on t1.SID = t2.Id
join tbladuset t3
on t2.SID = t3.ID
and t3.CID in(108,367)
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
Thanks dear....You are probably right but there is something more.......Look at my Example proper and told that is possible or not in MySql
|
|
|
|
|
i use this line in my script
Select Data = ltrim(rtrim(@RowData))
@RowData is ntext
so i receive this error when trying to execute it
argument data type ntext is invalid for argument 1 of rtrim function
so what is the replacement to work with ntext instead of ltrim & rtrim
md_refay
|
|
|
|
|
What database is it? If it is SQL Server 2008, you should use nvarchar(max) instead of ntext . Most string functions cannot work with ntext .
EDIT: As a workaround, you can do this:
Select Data = CAST(ltrim(rtrim(CAST(@RowData AS nvarchar(max))) AS ntext)
modified on Monday, August 8, 2011 11:45 AM
|
|
|
|
|
Hi all !
In DB2, I want to create primary key on partition table. How can I do it?
Example:
Create table TEMP1:
CREATE TABLE TEMP1 (
ID INTEGER NOT NULL,
DATEREPORT VARCHAR(8) NOT NULL,
NUMBERREPORT VARCHAR(20),
TITLE VARCHAR,
YEAR INTEGER,
IDCOM INTEGER,
IDTEN INTEGER DEFAULT 0 NOT NULL
)DISTRIBUTE BY HASH (IDTEN, YEAR);
After that, I want to create primary key on ID column but not yet. How can I do?
Thanks !
MCP.NET, MCAD.NET, MCSD.NET
|
|
|
|
|
|
Sorry, do you understand my question?
You must run by step:
- Create table with partition by hash
- Create PK on that table
or
- Create table with PK and partition by hash
will have same error
SQL0270N Function not supported Reason code = "1")
MCP.NET, MCAD.NET, MCSD.NET
|
|
|
|
|
As far as I know you cannot create a primary key without including all the columns in distribute list. So basically you either have to:
- include ID in the distribute list
- define the primary key using IDTEN and YEAR and ID
|
|
|
|
|
ok, thanks
MCP.NET, MCAD.NET, MCSD.NET
|
|
|
|
|
Hi,
After processing your ETL package which loads data into the cube, how do you ensure that your cube has been processed?
Current
|
|
|
|
|
Surely the last step in your ETL package is to call the processing method of the cube! (seems obvious but I don't deal with cubes so I may be completely wrong).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
current1999 wrote: After processing your ETL package which loads data into the cube, how do you
ensure that your cube has been processed?
Well it depends on what you are looking for in confirmation.
1: Confirmation of last successful processing
1.1: If the SQL Server agent is processing your cubes, then you can set the agent up to send out an email on completion. This will tell you if the process completed successfully or failed. The only caveat is if you run the job as a SQL Server Analysis command, then the agent wont know if the command failed or was successful. Just make sure to run your commands as a SSIS package and there wont be any issues.
1.2: In addition to agent notifications I use a modified version of the Microsoft SSAS example, AMO Display Object Names. I modified it to read the structure and send me an email with last processing date / times of the cubes and dimensions.
Info: http://technet.microsoft.com/en-us/library/ms160876(SQL.90).aspx
Had to remove some of the code as it contained company info in it, but here is the juxed of it
try
{
foreach (Database db in server.Databases)
{
Console.WriteLine("{0}", db.Name);
Console.WriteLine("\tDimensions:");
foreach (Dimension dimension in db.Dimensions)
Console.WriteLine("\t\t{0}", dimension.Name);
Console.WriteLine("\tCubes:");
foreach (Cube cube in db.Cubes)
{
Console.WriteLine("\t\t{0}", cube.Name);
Console.WriteLine("\t\tMeasure Groups:");
foreach (MeasureGroup group in cube.MeasureGroups)
{
Console.WriteLine("\t\t\tGroup Name: \t{0}", group.Name);
Console.WriteLine("\t\t\t\tSource: \t{0}", group.Source);
Console.WriteLine("\t\t\t\tCreated: \t{0}", group.CreatedTimestamp);
Console.WriteLine("\t\t\t\tLast Proc: \t{0} ", group.LastProcessed);
Console.WriteLine("\t\t\t\tEstimatedSize: \t{0} ", group.EstimatedSize);
Console.WriteLine("\t\t\t\tStorageLocation: \t{0} ", group.StorageLocation);
string sState = "None";
switch (group.State)
{
case AnalysisState.Processed:
sState = "Processed";
break;
case AnalysisState.PartiallyProcessed:
sState = "PartiallyProcessed";
break;
case AnalysisState.Unprocessed:
sState = "Unprocessed";
break;
}
Console.WriteLine("\t\t\t State: \t{0}", sState);
Console.WriteLine("\t\t\t\t Type: \t{0}", group.Type);
foreach (Measure meas in group.Measures)
{
Console.WriteLine("\t\t\t\t\t Name: \t{0}", meas.Name);
Console.WriteLine("\t\t\t\t\t\t Expression: \t{0}", meas.MeasureExpression);
Console.WriteLine("\t\t\t\t\t\t Aggregate: \t{0}", meas.AggregateFunction);
Console.WriteLine("\t\t\t\t\t\t DisplayFolder: \t{0}", meas.DisplayFolder);
Console.WriteLine("\t\t\t\t\t\t Source: \t{0}", meas.Source);
Console.WriteLine("\t\t\t\t\t\t DisplayFolder: \t{0} ", meas.DisplayFolder);
}
foreach (MdxScript mdx in cube.MdxScripts)
{
string MeasureName = mdx.Name.Replace("[MEASURES].[", "");
MeasureName = MeasureName.Replace("]", "");
Console.WriteLine("\t\t\t\t\t Name: \t{0}", MeasureName);
Console.WriteLine("\t\t\t\t\t\t DisplayFolder: \t{0} ", mdx.Annotations);
}
}
}
Console.WriteLine("\tMining Structures:");
foreach (MiningStructure miningStructure in db.MiningStructures)
Console.WriteLine("\t\t{0}", miningStructure.Name);
}
}
finally
{
server.Disconnect();
server.Dispose();
}
}
catch (AmoException e)
{
Console.WriteLine(e.ToString());
}
2: Validating the data, that’s a whole task all unto it self. I used to do this with a SSIS package that would run a MDX query and send the results from that. However, I found that just making sure everything processed correct really solved this issues we where having.
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|