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

Thursday, March 29, 2012

Can we extract adjectives using SQL server 2005 text mining?

Do you mean, filter out everything in a text that is not an adjective? Then no, this

is not supported by the Term Extraction transform.

A possible solution is to run Term Extraction with a maximum phrase length of 1, then manually remove the non-adjectives from the list of terms.

Term Lookup will only use the terms available in the table

sql

Tuesday, March 27, 2012

Can we directly execute a text file that contains all sql commands

Hi, friends,
We have our stored procedures (sp) saved in a .sql file, one for each. When
we want to create an sp, we open the corresponding .sql file using notepad o
r
sql query analyzer, and then execute it.
Do we have a way that we just need to pass those .sql files' name, including
full path, and run all those sp creation sql code in a batch, without
openning each .sql file one by one?
Thanks a lot for your help.Yes, use osql.
exec master..xp_cmdshell 'osql ...'
You can look up the syntax for osql in Books Online...
A
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:917F3B91-8A8E-454D-8782-A76CF5D59B4A@.microsoft.com...
> Hi, friends,
> We have our stored procedures (sp) saved in a .sql file, one for each.
> When
> we want to create an sp, we open the corresponding .sql file using notepad
> or
> sql query analyzer, and then execute it.
> Do we have a way that we just need to pass those .sql files' name,
> including
> full path, and run all those sp creation sql code in a batch, without
> openning each .sql file one by one?
> Thanks a lot for your help.|||You can use the command line tools for that. Look up 'osql' in BOL.
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:917F3B91-8A8E-454D-8782-A76CF5D59B4A@.microsoft.com...
> Hi, friends,
> We have our stored procedures (sp) saved in a .sql file, one for each.
> When
> we want to create an sp, we open the corresponding .sql file using notepad
> or
> sql query analyzer, and then execute it.
> Do we have a way that we just need to pass those .sql files' name,
> including
> full path, and run all those sp creation sql code in a batch, without
> openning each .sql file one by one?
> Thanks a lot for your help.

Tuesday, March 20, 2012

Can this be done?

Hello,

I have been trying to figure out what seems to be a simple task:

I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.

I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?

I also tried this: The below code sets the value for MYTEXTBOX. If the value in “MyField” of my dataset = “0.0”, I want MYTEXTBOX to hold the value of “MyRelatedField” (so another field within the same row of my dataset). Otherwise, DO NOTHING!!!!!, but because all functions MUST return a value, I attempted to return the value of MYTEXTBOX—hence setting it equal to what it already is, but this give me #ERROR!

=iif(Fields!MyField.Value = "0.0",Fields!MyRelatedField.Value, ReportItems!MYTEXTBOX.Value)

I have read the wrox reporting service book from front to back, and what seems like pie is giving me a grief—any help, link or advice would be so much appreciated!...much thanks, John

It could be done through some custom code. Store the data set element access code in a little class and refer it from the report

http://msdn2.microsoft.com/en-us/library/ms155798.aspx

|||

Johnny606 wrote:

I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.

I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?


What about saving the first dataset into a multivalue report parameter (make it internal or hidden if you do not want users to see it)
Make a 2nd dataset that selects top 3 from the multivalue parameter.

The textfield value should then be something like =Last(Fields!<nameOfField>.Value, "<name of 1st dataset>")

That way you have not changed the first dataset and you get the correct value in your text box

I cannot test it at the moment so it might not work (I'm in the middle of installing the SP2 CTP and have a little time for surfing while it's doing its thing) :-)

can this be done?

I have a text file that is generated from a host transaction. I have a batch
program that loads the text file into SQL and does a boatload of validation.
Is it possible to create DTS job or do this some how in SQL to make it
pretty less painful?you can create a dts package using import/export wizard in mssql server
enterprise manager, store it somewhere ( either on the server, or as a
file ), and then call this package from your app, and supply all dynamic
variables, including the filename, etc.
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:exxPynAUFHA.1432@.TK2MSFTNGP09.phx.gbl...
>I have a text file that is generated from a host transaction. I have a
>batch program that loads the text file into SQL and does a boatload of
>validation. Is it possible to create DTS job or do this some how in SQL to
>make it pretty less painful?
>
>|||would i still have to do all the business rules, validation etc, in the
batch program or could I use SQL to do all of that?
"Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
news:exhFJ5AUFHA.2556@.TK2MSFTNGP12.phx.gbl...
> you can create a dts package using import/export wizard in mssql server
> enterprise manager, store it somewhere ( either on the server, or as a
> file ), and then call this package from your app, and supply all dynamic
> variables, including the filename, etc.
> --
> Ilyan Mishiyev
> IGM Consulting Corporation
> Enterprise Web Solutions
> www.igmcc.com
>
> "microsoft.news.com" <CSharpCoder> wrote in message
> news:exxPynAUFHA.1432@.TK2MSFTNGP09.phx.gbl...
>|||after you load all the data, you can call a stored proc by the same app
that proc might be used for validation
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:Of5CG$AUFHA.2056@.tk2msftngp13.phx.gbl...
> would i still have to do all the business rules, validation etc, in the
> batch program or could I use SQL to do all of that?
> "Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
> news:exhFJ5AUFHA.2556@.TK2MSFTNGP12.phx.gbl...
>|||is there somewere online i could read about or look at this being done or
something like it being done?
"Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
news:uxYGZUBUFHA.3652@.TK2MSFTNGP10.phx.gbl...
> after you load all the data, you can call a stored proc by the same app
> that proc might be used for validation
> --
> Ilyan Mishiyev
> IGM Consulting Corporation
> Enterprise Web Solutions
> www.igmcc.com
>
> "microsoft.news.com" <CSharpCoder> wrote in message
> news:Of5CG$AUFHA.2056@.tk2msftngp13.phx.gbl...
>|||not sure about that
actually it's really not that complicated
step 1 - create dts package
step 2 - call tht package from the app to load data
step 3 - call stored proc that validates loaded data
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:ebXU5cBUFHA.736@.TK2MSFTNGP10.phx.gbl...
> is there somewere online i could read about or look at this being done or
> something like it being done?
> "Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
> news:uxYGZUBUFHA.3652@.TK2MSFTNGP10.phx.gbl...
>|||that appears easy, but how will i define what data goes into what column in
the table since my data in the file looks like this:
BMW325i20051212 65222 John Smith
its:
Car: BMW
Model: 3251
Year: 20051212
Price: 65222
Buyer: John Smith
and so on.
"Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
news:O0YBSwBUFHA.2556@.TK2MSFTNGP12.phx.gbl...
> not sure about that
> actually it's really not that complicated
> step 1 - create dts package
> step 2 - call tht package from the app to load data
> step 3 - call stored proc that validates loaded data
> --
> Ilyan Mishiyev
> IGM Consulting Corporation
> Enterprise Web Solutions
> www.igmcc.com
>
> "microsoft.news.com" <CSharpCoder> wrote in message
> news:ebXU5cBUFHA.736@.TK2MSFTNGP10.phx.gbl...
>|||Is it a fixed length file?
Do you know the layout of this file?
For example,
from 1st character to 5th, field 1
from 6th character to 12th, field 2, etc.
If this is a fixed length file and you do know what the layout is, then you
can specify that when creating a dts package.
If it's a delimited file ( i don't think it's a delimited file by looking at
data ), then specify what the delimiter ( comma, semicolon, pipe, etc. ) is
so dts knows how to split that data into fields.
Then, when that package is called by your application, all the data will
automatically be loaded into the specified fields.
Try creating a package first and load that data manually.
Ilyan Mishiyev
IGM Consulting Corporation
Enterprise Web Solutions
www.igmcc.com
"microsoft.news.com" <CSharpCoder> wrote in message
news:uIr9U8BUFHA.2820@.tk2msftngp13.phx.gbl...
> that appears easy, but how will i define what data goes into what column
> in the table since my data in the file looks like this:
> BMW325i20051212 65222 John Smith
>
> its:
> Car: BMW
> Model: 3251
> Year: 20051212
> Price: 65222
> Buyer: John Smith
> and so on.
>
> "Ilyan Mishiyev" <msnewsaccountREMOVE@.THISigmcc.com> wrote in message
> news:O0YBSwBUFHA.2556@.TK2MSFTNGP12.phx.gbl...
>

Monday, March 19, 2012

Can there be read only fields in a reporting services report?

Hey guys, I have a really dumb question. In the header of my report I am trying to put in a text box. This text box should look like this.

Legend Value 1

Value 2

Value 3

Here is my problem. Everytime I put in a carrige return it clears everything that I have in the box. What is going on? I then thought I should put in a table which would make my life easier but it does not allow me to put in a table in the header.. HELP

Open the expresion builder and simply enter the text as you want it to appear (without an equal sign) but with your returns. Even though it will look as if there is only one line, all three will be there when the report is renderred.

PS... only dumb question is the one you do not ask .

|||

Lonnie,

That was easy, thank you very much.. Trust me, I really didn't want to ask this question but nothing seemed like an obvious solution

|||you can also try this way. After you type the first line in the text box, press Shift + Enter. This should take you to the next line.|||

Hi,

I am trying to create a report using reporting services. This report will be displayed to the user in Excel. All this works fine.

Now the report generated in excel needs to have some fields locked down while others will remain edittable. Is this possible?

Please let me know asap...

Thanks in advance.

SR

Sunday, March 11, 2012

Can text be included in full text

I have a text column which my users use extensively for like queries. The table has 1.3 Millon rows and has seen som eperformance issue ie it does a table scan and blocks other processes.

I was wondering if anyone how to handle this coulmn can I create indexes or better can text column support full text indexing.

Anyone who can shed any ideas as what might be the best possible solution will be great

AdAnup

If I understand you correctly, YES, Full Text indexing is especially well suited for fields with text/ntext datatypes.

Be aware that Full Text indexing is not dynamic, that is, the indexes will not be updated to reflect any inserts/updates/deletes to the data -UNTIL you specifically rebuild the Full Text indexes. You may wish to create a scheduled SQL Agent Job to rebuild the Full Text indexes during 'slack' times.

Read in Books Online about Full Text Indexing.

Can SSIS parse this text report without a lot of programming?

I've got some machines that output text files after each shot of parts. I'd like to take the data in those files and parse it and insert it into a SQL Server database for future massaging. The text files look like the example I've posted below. Can SSIS parse out the set points and actual values even though the file isn't CSV or tab delimited and the data is kind of 'strewn' all over the report? Each report does have the exact same format so the report format doesn't change from report to report, just the data. Thanks in advance.

Ernie

WP4.57 C Y C L E P R O T O C O L

Order data 18.05.06 11:27:57

Order number : 2006 Recipe no. : 15761

Machine number : 7 Recipe name : Stabilizer Bar Innsulator

Machine Operator: 1257 Art.descrip.: Stabilizer Bar Grommet

Shot Volume : 285.8

Part quantity : 100096 Type of mat.: M370-34

Shot quantity : 782 Batch number: 20124-125

-

Temperatures in ?C

Set Act Set Act

Fixed heat.platen right 182 182 Tempering screw 83 83

middle 180 180 Tempering inject.cylinder 85 85

left 182 182 Tempering circuit 3 90 91

Tempering circuit 4 0 39

Movab.heat.platen right 182 182 Tempering circuit 5 0 39

middle 180 180

left 182 182 Mould temperature 1 0 39

Mould temperature 2 0 39

Third heat.platen right 0 39 Mould temperature 3 0 39

middle 0 39 Mould temperature 4 0 39

left 0 39 Mould temperature 5 0 39

Mould heating circuit 6 0 39 Compound temp.after screw 104 104

Mould heating circuit 7 0 39 Compound temp.after nozzle 0 39

Mould heating circuit 8 0 39

Mould heating circuit 9 0 39

Mould heating circuit 10 0 39

Times in sec

Injection time 51.20 Transfer time 1 2.00

Internal mould press.time 0.00 Transfer time 2 2.00

Dwell pressure time 7.00 Transfer time 3 2.00

Controlled cure time 180.00 Transfer time 4 2.00

Calculated cure time 0.00 Transfer time 5 2.00

last cycle time 276

last opening time 25

Measure when injecting Measure at injection end

max. injection speed mm/s 11.9 Injection length mm 2.0

Injection energy kNm 247.2 Injection time sec 51.20

max. int.mould pres. bar 2 Hydraulic pressure bar 190

max. dwell pressure bar 192 Internal mould pressure bar 0

Pad mm 0.4

Stock Temperatures and Pressures During Metering

Stock Temperatures(C) Set Actual Metering Pressures(bar) Set Actual

Temperature 1st Step 105 106 Pressure 1st Step 135 131

Temperature 2nd Step 105 106 Pressure 2nd Step 135 129

Temperature 3rd Step 105 105 Pressure 3rd Step 135 122

Temperature 4th Step 105 106 Pressure 4th Step 135 135

Temperature 5th Step 105 109 Pressure 5th Step 135 137

Protocol Complete

Yes absolutely, SSIS can do this. Import it as a single, very wide, column and parse out the various sections in the pipeline. Given the complexity you're probably going to have to do this in an aysnchronous script component.

-Jamie

Thursday, March 8, 2012

Can SQL server return text in column instead of row?

Hi
Consider the query
"SELECT names FROM Table1"
It would return one column with some rows.
Abc
Xyz
Pqr
Mno
I want SQL server to return is in columns like
Abc Xyz Pqr Mno
Thank YouChakravarti Mukesh wrote:
> Hi
> Consider the query
> "SELECT names FROM Table1"
> It would return one column with some rows.
> Abc
> Xyz
> Pqr
> Mno
> I want SQL server to return is in columns like
> Abc Xyz Pqr Mno
> Thank You
That's just formatting a list, which something controlled by your
client application, not by SQL Server. Take a look at the ADO GetString
method for example.
http://msdn.microsoft.com/library/d...
etstringmethod(recordset)ado.asp
David Portas
SQL Server MVP
--

Sunday, February 19, 2012

Can ReportViewer save report to another format?

Now Report Viewer can save report to xml and pdf format.

Can it save report to another format? e.g word, text

This depends on availability of renderers.
Currently no, in future versions - yes, likely

|||

yes it's possible, however you have to write your own report renderer. Please read this link http://msdn.microsoft.com/msdnmag/issues/05/02/CustomRenderers/ for more info.