Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Monday, March 26, 2012

Help with setting Algorithm Paramteres

I was walking through the Text Mining example - which at one step required me to set Algorithm Parameters - MAXIMUM_OUTPUT_ATTRIBUTES=0. When I tried that the project would not build giving an error -
Error (Data mining): The 'MAXIMUM_INPUT_ATTRIBUTES' data mining parameter is not valid for the 'XYZ' model.

I was getting the same error when I tried to set it for Microsoft_neural_netowrk - Hidden_Node_ratio. When I do a properties from "set Algorithm Properties" from Mining Model, I do not see these properties set as default.

I have installed SQLServer 2005 Standard Edition Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00

Any help would be much appreciated.

Thanks
Rajeev Gupta

These parameters are only available in the Enterprise Edition.|||

Do you plan to add these features in future versions of standard edition.

Neural Network modeling suffers greatly as we cannot add more layers/neurons to the model. Are there any hacks...

Thanks
Rajeev Gupta

|||Then are we to assume the Text Mining tutorials are only useful for the Enterprise Edition?

Help with setting Algorithm Paramteres

I was walking through the Text Mining example - which at one step required me to set Algorithm Parameters - MAXIMUM_OUTPUT_ATTRIBUTES=0. When I tried that the project would not build giving an error -
Error (Data mining): The 'MAXIMUM_INPUT_ATTRIBUTES' data mining parameter is not valid for the 'XYZ' model.

I was getting the same error when I tried to set it for Microsoft_neural_netowrk - Hidden_Node_ratio. When I do a properties from "set Algorithm Properties" from Mining Model, I do not see these properties set as default.

I have installed SQLServer 2005 Standard Edition Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00

Any help would be much appreciated.

Thanks
Rajeev Gupta

These parameters are only available in the Enterprise Edition.|||

Do you plan to add these features in future versions of standard edition.

Neural Network modeling suffers greatly as we cannot add more layers/neurons to the model. Are there any hacks...

Thanks
Rajeev Gupta

|||Then are we to assume the Text Mining tutorials are only useful for the Enterprise Edition?

Friday, March 23, 2012

Help with Select statement

Help me with the following query.
I have employee table as follows
EmpID (Number)
FullName (Text)
ReportTo(Number)
ReportTo field contain number from EmpID
Sample Data from the table
EmpIDFullNameReports To
1Nancy Davolio2
2Andrew Fuller
3Janet Leverling2
4Margaret Peacock2
5Steven Buchanan2
6Michael Suyama5
7Robert King5
8Laura Callahan2
9Anne Dodsworth5
10Andrew Leverling3
11Michael Miller5
12Robert Davolio3
13Nancy Suyama6
14Margaret King7
I would like to create a single query (T-SQL), when I pick an
employee ID, I would like to have the entire list of employees come
under that employee including that employee and all below him/her.
Example. If I pick ID = 5, should get the following list.
EmpIDFullNameReports To
5Steven Buchanan2
6Michael Suyama5
7Robert King5
9Anne Dodsworth5
11Michael Miller5
13Nancy Suyama6
14Margaret King7
The list above shows all staff who report to ID 5 directly, But I want very
who are reporting to staff reporting to staff report to ID 5 and below in the
hieratical organization.
How do I do that query?
Thanks
Harry
Harry J Nathan
see
http://www.mindsdoor.net/SQLTsql/Ret...Hierarchy.html
"Harry J Nathan" wrote:

> Help me with the following query.
> I have employee table as follows
> EmpID (Number)
> FullName (Text)
> ReportTo(Number)
> ReportTo field contain number from EmpID
> Sample Data from the table
> EmpIDFullNameReports To
> 1Nancy Davolio2
> 2Andrew Fuller
> 3Janet Leverling2
> 4Margaret Peacock2
> 5Steven Buchanan2
> 6Michael Suyama5
> 7Robert King5
> 8Laura Callahan2
> 9Anne Dodsworth5
> 10Andrew Leverling3
> 11Michael Miller5
> 12Robert Davolio3
> 13Nancy Suyama6
> 14Margaret King7
>
> I would like to create a single query (T-SQL), when I pick an
> employee ID, I would like to have the entire list of employees come
> under that employee including that employee and all below him/her.
> Example. If I pick ID = 5, should get the following list.
> EmpIDFullNameReports To
> 5Steven Buchanan2
> 6Michael Suyama5
> 7Robert King5
> 9Anne Dodsworth5
> 11Michael Miller5
> 13Nancy Suyama6
> 14Margaret King7
> The list above shows all staff who report to ID 5 directly, But I want very
> who are reporting to staff reporting to staff report to ID 5 and below in the
> hieratical organization.
> How do I do that query?
> Thanks
> Harry
> --
> Harry J Nathan

Wednesday, March 21, 2012

Help with read from a text column

All, I have a table containing an ID and a text column. I need to dump the
content of the table into a text file using the following code:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
GO
BEGIN TRAN
set textsize 62713
DECLARE @.ptr varbinary(16)
SELECT @.ptr = textptr(note)
FROM notes
WHERE id = 307
READTEXT note @.ptr 0 62713
COMMIT TRAN
GO
However, I get only 8K out of the text column where I am suppose to get
62713. I ran OSQL to re-direct the output to a file.
thanks.
JohnHi
Query Analyser has a maximum column width or 8192 characters and you can not
increase the size beyone that in the options dialog. Although I have not
found anything to say that osql has a similar limit I can get 8342 character
s
out.
To write to a file correctly look at
http://support.microsoft.com/defaul...kb;en-us;317043
John
"John Smith" wrote:

> All, I have a table containing an ID and a text column. I need to dump the
> content of the table into a text file using the following code:
> SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
> GO
> BEGIN TRAN
> set textsize 62713
> DECLARE @.ptr varbinary(16)
> SELECT @.ptr = textptr(note)
> FROM notes
> WHERE id = 307
> READTEXT note @.ptr 0 62713
> COMMIT TRAN
> GO
> However, I get only 8K out of the text column where I am suppose to get
> 62713. I ran OSQL to re-direct the output to a file.
> thanks.
> John

Monday, February 27, 2012

Help with multiple IIFs, or need suggestion of better solution.

I am trying to check multiple fields from a db to see if they have either a 1 or 0 value, and if there is a 1, then write a value into a text box. I need to check multiple fields, and if all of them are checked then I have to insert the value for each into the text box. If it was just checking one condition it woudl be easy, because I could just nest IIF's until it was true.

So I can't do because once the truth clause is satisfied it will exit the loop: IIF(Fields!Fielda.Value = 1,"Fielda",IIF(Fields!Fieldb.Value=1,"Fieldb"....)

I also cannot do:
=IIfFields!Fielda.Value=1,"Fielda,"")
=IifFields!Fieldb.Value=1,"Fieldb,"")

Is there a way to have a whole bunch of IIF's, or can anyone think of another way to do this?

Much appreciated.

Use the "And" operator. It would look like this:

iif (Fields!Fielda.Value = 1 and Fields!Fieldb.Value=1 and Fields!Fieldc.Value=1, "Fielda", "")

|||Ryan, I appreciate the answer, but I think you misunderstood. I want it to say if Fielda = 1 then insert text, and if Fieldb = 1 then insert text, not if all of them = 1.

This would be the ideal situation:

=IIF(Fields!Fielda.Value=1,"Fielda","")
IIF(Fields!Fieldb.Value=1,"Fieldb","")
IIF(Fields!Fieldc.Value=1,"Fieldc","")
And so on for all the fields for this particular text box.

Or another example (that I've tried that did not work)
=IIF(Fields!Fielda.Value=1,"Fielda","") &
IIF(Fields!Fieldb.Value=1,"Fieldb","") &
IIF(Fields!Fieldc.Value=1,"Fieldc","") &

I can't use what you said because that would only evaluate one statement, and I need to evaluate 8 different statements. That's the problem. Is there a way to have mutliple seperate IIF's in an expression like I have above? If not, is there another solution?
|||

One question is what is the datatype on the database field? If it is boolean then you should be able to do:

=IIF(Fields!Fielda.Value,"Fielda","") + IIF(Fields!Fieldb.Value,"Fieldb","")...

The + should work for concatenation since all of the fields area string. Another thing that I have seen is that you may have to do CDec on the database fields to force a datatype match.

=IIF(CDec(Fields!Fielda.Value)=1,"Fielda","") + IIF(CDec(Fields!Fieldb.Value)=1,"Fieldb","") ...

|||

Use the Report Properties.Code.Custom Code feature.

1.Create a function in the CODE section

2. Pass all your field values to the function

3. The return value is used in the textbox.

You have a lot more coding power in the CODE section than you do with expressions.

Hope this helps.

|||

Can you do it in SQL using case statement ?

|||

=switch(Fields!FieldA.Value = 1, "A", Fields!FieldB.Value = 1, "B", true, "")

Thanks, Donovan.

Sunday, February 19, 2012

Help with large text fields please

I have the following problem (MS SQL 2000):
A modest table with several large fields (currently varchar(5000)), plus some datetime and integer fields recording who's done what and when.

Two problems - (1) I now realise that I'm limited to 8060 characters, and (2) users seem to think even 5000 chars might be too small on occasions (the table is for recording laboratory problems, so the amount of text depends on what the local quality manager finds!)

I thought I'd change my varchars to text. However, when I changed just one of them to text, the record set being returned by my stored procedure has lots of empty fields. The query ran OK before the datatype change and STILL runs OK in Enterprise Manager after the change.

The basic query is:

Code: ( text )

  1. SELECT TechAnomalies.*,

  2. lab1.LabRef AS labref1, lab1.LabName AS labname1, lab1.EULabRef AS EULabRef,

  3. lab2.LabRef AS labref2, lab2.LabName AS labname2,

  4. u1.UserFullName AS RaisedBy,

  5. u2.UserFullName AS Inter,

  6. u3.UserFullName AS SignOffBy,

  7. u4.UserFullName AS LastEditor,

  8. u5.UserFullName AS LQM

  9. FROM dbo.TechAnomalies

  10. INNER JOIN dbo.Labs AS lab1

  11. ON lab1.LabID = TechAnomalies.TALabID

  12. LEFT OUTER JOIN dbo.Labs AS lab2

  13. ON lab2.LabID = TechAnomalies.TAIntermedLabID

  14. LEFT OUTER JOIN dbo.Users AS u1

  15. ON u1.UserID = TechAnomalies.TARaiserUserID

  16. LEFT OUTER JOIN dbo.Users AS u2

  17. ON u2.UserID = TechAnomalies.TAIntermedUserID

  18. LEFT OUTER JOIN dbo.Users AS u3

  19. ON u3.UserID = TechAnomalies.TASignedOffBy

  20. LEFT OUTER JOIN dbo.Users AS u4

  21. ON u4.UserID = TechAnomalies.TALastEditedBy

  22. LEFT OUTER JOIN dbo.Users AS u5

  23. ON u5.UserID = TechAnomalies.TALQMReviewBy

I use it with or without a WHERE clause (passed to the stored procedure as a varchar) to return either a recordset or the details of one record.

Any suggestions please?

You could try using nvarchar

Help with large amount of text and page breaks

What has anyone done with large amounts of text in a table with regard to
page breaks? I've found that the page break happens before the large block
of text starts regardless of where it starts on the page. Even if there is
3/4 of the page empty it will always page break.
Here's an example. To illustrate, I'm just pulling back the Article Title
and the Article Details. I made the table background dark just so to
distinguish it from the rest of the page.
http://www.1uvaknd.com/pagebreaktest.pdf
This is in VS2003 preview mode. Take a look at page 2. The page size is huge
in comparison with the other pages.
http://www.1uvaknd.com/pagebreaktest_page1.jpg
http://www.1uvaknd.com/pagebreaktest_page2.jpg
http://www.1uvaknd.com/pagebreaktest_page3.jpg
Anyone else run into this?
Thanks
Richard.Richard,
We're having the exact same problem and can't seem to resolve it. I'm very
dissapointed there is no answer from MS to this question. If anyone out
there can think of anything please post.
I have found that if you use a list and get it set up just right it may
work. The problem is that you have to use a group and set a page eject at
the end of the group. If you have a unique item for the group it works ok.
One of our issues is that we want to use a field in the page footer which of
course isn't allowed (at least in the early versions).
--
Zip
"Richard Wodabek" wrote:
> What has anyone done with large amounts of text in a table with regard to
> page breaks? I've found that the page break happens before the large block
> of text starts regardless of where it starts on the page. Even if there is
> 3/4 of the page empty it will always page break.
> Here's an example. To illustrate, I'm just pulling back the Article Title
> and the Article Details. I made the table background dark just so to
> distinguish it from the rest of the page.
> http://www.1uvaknd.com/pagebreaktest.pdf
> This is in VS2003 preview mode. Take a look at page 2. The page size is huge
> in comparison with the other pages.
> http://www.1uvaknd.com/pagebreaktest_page1.jpg
> http://www.1uvaknd.com/pagebreaktest_page2.jpg
> http://www.1uvaknd.com/pagebreaktest_page3.jpg
> Anyone else run into this?
> Thanks
> Richard.
>
>|||Zip:
I can't believe I've not gotten any responses from MS on this from any SSRS
newsgroups. It is so easy to reproduce and so obviously wrong. I've gone as
far as to write a SQL function that will split up a text column into a
separate result set. It basically returns a bunch of rows. I then put the
table into a list object and it seems to work. The only problem is that the
function is limited to 8K and if your text is greater than that then it will
truncate. Not a perfect solution but still better than what is happening
now.
Richard.
"Zip" <gregory.zipprich@.arpc.denver.af.mil> wrote in message
news:F908AE27-97EF-4FC6-8C8B-1F796F12B085@.microsoft.com...
> Richard,
> We're having the exact same problem and can't seem to resolve it. I'm
> very
> dissapointed there is no answer from MS to this question. If anyone out
> there can think of anything please post.
> I have found that if you use a list and get it set up just right it may
> work. The problem is that you have to use a group and set a page eject at
> the end of the group. If you have a unique item for the group it works
> ok.
> One of our issues is that we want to use a field in the page footer which
> of
> course isn't allowed (at least in the early versions).
> --
> Zip
>
> "Richard Wodabek" wrote:
>> What has anyone done with large amounts of text in a table with regard to
>> page breaks? I've found that the page break happens before the large
>> block
>> of text starts regardless of where it starts on the page. Even if there
>> is
>> 3/4 of the page empty it will always page break.
>> Here's an example. To illustrate, I'm just pulling back the Article Title
>> and the Article Details. I made the table background dark just so to
>> distinguish it from the rest of the page.
>> http://www.1uvaknd.com/pagebreaktest.pdf
>> This is in VS2003 preview mode. Take a look at page 2. The page size is
>> huge
>> in comparison with the other pages.
>> http://www.1uvaknd.com/pagebreaktest_page1.jpg
>> http://www.1uvaknd.com/pagebreaktest_page2.jpg
>> http://www.1uvaknd.com/pagebreaktest_page3.jpg
>> Anyone else run into this?
>> Thanks
>> Richard.
>>|||Another (probably better solution). Put all the tables into a List
object. Then take the large text column out of the table and place it
in the list object itself. As long as the large text column is NOT in a
table but in a List object - it seems to work much better.
Richard.|||I'll have to try these solutions. Mine worked for some records and not
others. I think there are also special characters embedded that I can't see
and these are causing proglems. We plan on writing a procedure to strip out
all characters that are standard and see if that helps as well.
--
Zip
"richard.wodabek@.gmail.com" wrote:
> Another (probably better solution). Put all the tables into a List
> object. Then take the large text column out of the table and place it
> in the list object itself. As long as the large text column is NOT in a
> table but in a List object - it seems to work much better.
> Richard.
>