Friday, March 30, 2012
Link to Bring up email
contact and bring up my email program. I entered ="mailto:" & email variable
in the Jump to URL field. I get an error Invalid URI: the hostname could not
be parsed. Although it does work if I hard code the address like
=mailto:me@.microsoft.com
Thank you for any help.i tried to repro it..but couldnt replicate it.
i created a parameter as email id..it works fine.
can u specify the repro steps?
"SSVette@.Hotmail.com" <ssvette@.hotmail.com> wrote in message
news:e8qOXtFnEHA.2680@.TK2MSFTNGP15.phx.gbl...
>I have a column on a report listing a contact. I want to click on the
> contact and bring up my email program. I entered ="mailto:" & email
> variable
> in the Jump to URL field. I get an error Invalid URI: the hostname could
> not
> be parsed. Although it does work if I hard code the address like
> =mailto:me@.microsoft.com
> Thank you for any help.
>|||I have a data set that returns a contact name (contactname) and the contact
email address (email). The report displays the contact name and the
navigation is assigned a Jump to URL field as
="mailto:" & email
I get the message Invalid URI: the hostname could not be parsed.
If I assign the Jump to URL Field with a hardcoded email address it works
fine
=mailto:me@.microsoft.com
thank you
"avnrao" <avn@.newsgroups.com> wrote in message
news:%23jNzEAInEHA.3908@.TK2MSFTNGP09.phx.gbl...
> i tried to repro it..but couldnt replicate it.
> i created a parameter as email id..it works fine.
> can u specify the repro steps?
> "SSVette@.Hotmail.com" <ssvette@.hotmail.com> wrote in message
> news:e8qOXtFnEHA.2680@.TK2MSFTNGP15.phx.gbl...
> >I have a column on a report listing a contact. I want to click on the
> > contact and bring up my email program. I entered ="mailto:" & email
> > variable
> > in the Jump to URL field. I get an error Invalid URI: the hostname could
> > not
> > be parsed. Although it does work if I hard code the address like
> > =mailto:me@.microsoft.com
> >
> > Thank you for any help.
> >
> >
>sql
Wednesday, March 21, 2012
linear regression with nested explanation variable
We are trying to create a model of linear regression with nested table. We used the create mining model sintax as follow :
create mining model rate_plan3002_nested2
( CUST_cycle LONG KEY,
VOICE_CHARGES double CONTINUOUS predict,
DUR_PARTNER_GRP_1 double regressor CONTINUOUS ,
nested_taarif_time_3002 table
( CUST_cycle long CONTINUOUS,
TARIFF_TIME text key,
TARIFF_VOICE_DUR_ALL double regressor CONTINUOUS
)
) using microsoft_linear_regression
INSERT INTO MINING STRUCTURE [rate_plan3002_nested2_Structure]
(CUST_cycle ,
VOICE_CHARGES ,
DUR_PARTNER_GRP_1 ,
[nested_taarif_time_3002](SKIP,TARIFF_TIME ,TARIFF_VOICE_DUR_ALL)
)
SHAPE {
OPENQUERY([Cell],
'SELECT CUST_cycle ,
VOICE_CHARGES ,
DUR_PARTNER_GRP_1
FROM dbo.panel_anality_3002
order by CUST_cycle ')}
APPEND
({OPENQUERY([Cell],
'select CUST_cycle,
TARIFF_TIME,
CYCLE_DATE
from dbo.nested_taarif_time_3002
order by CUST_cycle,TARIFF_TIME')
}
relate CUST_cycle to CUST_cycle
) as nested_taarif_time_3002
The results we got are a model with intercept only. if we don't use the nested variable (the red line) we get a rigth model . (we had more variable ....)
Is there a way to do this regression correctly?
Thanks,
Dror
Hi Dror,
You could remove the "regressor" flag from the nested table column (in the create mining model statement) if this column is not indented to be part of the regression equation.
Thanks,
Dana Cristofor
|||Thanks Dana,
the problem is that ido want it to be part of the regression
otherwise i don't need the nested table
Thanks
|||I'm investigating an issue - let me work on this and get back to you.
Thanks
|||I think I may have found the problem. I created a simple model with processed and had expected regressions. I then created the same model using a nested table and processed and got a constant result back - very confusing. I then tried creating an additional model in the nested structure that would be identical to the first non-nested model I created, and again got no regressions - startling!
What I found out was that for some reason (possibly a bug) when I added a nested table, the wizard did not add the "regressor" flag to any of my continuous inputs. Once I manually added the regressor flag and reprocessed, I got the expected regressions in my output.
Please check the regressor flag on the model columns and let me know if this helps for you. To set the regressor flag, go to the Mining Models tab of the Data Mining designer, click the cell representing the input column under the mining model (not the mining structure) and view the properties. The regressor flag is a possible option for the mining model column.
Thanks
-Jamie
|||Thanks Jamie,
we added the regressor flag in the minig models tab, and the we got the same results:
when we add the regressor flag to the column in the nested table, we get an intercept only model.
if we put the regressor flag on the nested table only, and not on the column of the table, we get the same regression as if we didn't use the nested table.
is there a way to solve it?
we would also like to run the model from the DMXquery of the management studio, is there a way to get the script of the model from visual studio?
Thanks,
Dror
|||I wonder if it's possible that there's too much "noise" with the nested table? I've tried with a degenerate case to prove that there's no obvious bug in the software preventing nested regressors from working. Can you also try the same model with the decision tree algorithm and see what happens?
You can get the DMX form of the model by following the instructions at the tip and trick here: http://www.sqlserverdatamining.com/DMCommunity/TipsNTricks/3652.aspx
Line Number ?
SQL RS supplies the global variable "PageNumber" but is there a kind of
"LineNumber" variable or function available ? Or another way to get the
number of current line being printed ?
Thanks.
Jean-MarcLook up "RowNumber" and "RunningValue" functions in the RS Books
Online. In a simple table, RowNumber(scope) gives the current row
number. In some more complex scenarios (ex: numbering rows within a
matrix group), the RunningValue(Expression, Function, Scope) function
is the best option.|||Thanks I'm gonna try that !
Jean-Marc
Monday, March 19, 2012
Line Break in T-SQL
In a Stored Proc, I am building a string variable. I am getting outputs
from 4 different queries and would like the string to have line breaks
to display each entry in a different line in a text area. How can I do
this?
i.e
result = result1 + result2 + result3 + result4.
What characters can I enter so that the output is displayed in the
textarea as
result1
result2
result3
result4
Thanks,SELECT 'asdfasd'+char(13)+'ASDF ASF ASDF ASD'
maybe it's CHR not CHAR|||The line terminator on a Windows platform is carriage return/line feed
(ASCII 10 and 13). You can concatenate CHAR(13) + CHAR(10) where you want
line breaks.
--
Hope this helps.
Dan Guzman
SQL Server MVP
<nashak@.hotmail.comwrote in message
news:1158285904.128023.10670@.e3g2000cwe.googlegrou ps.com...
Quote:
Originally Posted by
Hello,
>
In a Stored Proc, I am building a string variable. I am getting outputs
from 4 different queries and would like the string to have line breaks
to display each entry in a different line in a text area. How can I do
this?
>
i.e
result = result1 + result2 + result3 + result4.
What characters can I enter so that the output is displayed in the
textarea as
result1
result2
result3
result4
>
Thanks,
>
Quote:
Originally Posted by
>Hello,
>
>In a Stored Proc, I am building a string variable. I am getting outputs
>from 4 different queries and would like the string to have line breaks
>to display each entry in a different line in a text area. How can I do
>this?
Hi Nashak,
In addition to the answers already given by Alexander and Dan, here's
another option - just use a newline character inside a string constant.
For example:
SELECT 'First line
Second line.'
This will show the output on two lines (make sure to select output to
text, not output to grid - the grid doesn't handle newlines too well).
If the data comes from columns, try
SELECT Column1 + '
' + Column2
FROM YourTable
WHERE ...
--
Hugo Kornelis, SQL Server MVP
Friday, February 24, 2012
Limit the number of records (with offset)
i want to have only a few rows in a table. eg, from row 20 to 50. The problem is, 20 is a variable and 30 is (50 - 20 = 30...) one too
i use this statement:
SELECT * FROM
(SELECT TOP @.MaxRecord * FROM
(SELECT TOP @.MaxRecord * FROM
(SELECT TOP @.Totals * FROM PL4 ORDER BY RailLocation ASC)
AS foo ORDER BY RailLocation DESC )
AS bar )
AS baz ORDER BY RailLocation ASC
Totals is 50 and
MaxRecord is 30 in this example
PL4 was declared before in this Stored Procedure
This aint allowed, only when i hardcoded top 30 and top 50 it works...
And i don't want it to be hardcoded, does someone have a solution for this problem?
ThnxTry this:
EXEC('SELECT * FROM
(SELECT TOP ' + @.MaxRecord + ' * FROM
(SELECT TOP ' + @.Totals + ' * FROM PL4 ORDER BY RailLocation ASC)
AS foo ORDER BY RailLocation DESC )
AS baz ORDER BY RailLocation ASC')|||Nice, it works, thanx