Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Monday, March 19, 2012

Can NEWLINE in FORMAT?

I have a date field and use the format: dd MM/dd/yy
The output is: Fri 10/15/04
I would like this instead:
Fri
10/15/04
Is there a way to add a line break using the simple format codes?
Thanks, JerryI have found that adding
... & chr(10) & chr(13) & ...
seems to do the trick.
"Jerry Nixon" wrote:
> I have a date field and use the format: dd MM/dd/yy
> The output is: Fri 10/15/04
> I would like this instead:
> Fri
> 10/15/04
> Is there a way to add a line break using the simple format codes?
> Thanks, Jerry
>|||I do not know of a way that you can add a line break when typing the format
code into the Format property. It can be done in several ways when using an
expression. For example:
=Format( Fields!YoureDate.Value, "ddd") + ControlChars.crlf + Format(
Fields!YourDate.Value, "MM/dd/yy")
"Jerry Nixon" wrote:
> I have a date field and use the format: dd MM/dd/yy
> The output is: Fri 10/15/04
> I would like this instead:
> Fri
> 10/15/04
> Is there a way to add a line break using the simple format codes?
> Thanks, Jerry
>

Wednesday, March 7, 2012

Can I use SQL Express database inside full blown SQL 2005?

This is a multi-part message in MIME format.
--=_NextPart_000_0039_01C61CD7.AAB6F060
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET = application, can I just deploy this to production (where SQL 2005) is = running and it'll still work?
--=_NextPart_000_0039_01C61CD7.AAB6F060
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,

I have SQLExpress database under = App_Data folder of my ASP.NET application, can I just deploy this to production (where SQL = 2005) is running and it'll still work?
--=_NextPart_000_0039_01C61CD7.AAB6F060--This is a multi-part message in MIME format.
--=_NextPart_000_01DC_01C61CE6.488EED20
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
Probably. You may have to deal with some user mapping and permissions =issue because your production system will have different logins than =your SQL Express instance.
-- This posting is provided "AS IS" with no warranties, and confers no =rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message =news:uLSg2nQHGHA.2948@.TK2MSFTNGP10.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET =application, can I just deploy this to production (where SQL 2005) is =running and it'll still work?
--=_NextPart_000_01DC_01C61CE6.488EED20
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Probably. You may have to deal =with some user mapping and permissions issue because your production system will have =different logins than your SQL Express instance.
-- This posting is provided "AS IS" with no warranties, and =confers no rights.Use of included script samples are subject to the terms =specified athttp://www.microsoft.com/info/cpyright.htm">http://www.microsoft.=com/info/cpyright.htm
"GS" wrote in message news:uLSg2nQHGHA.2948=@.TK2MSFTNGP10.phx.gbl...
Hi,

I have SQLExpress database under =App_Data folder of my ASP.NET application, can I just deploy this to production (where =SQL 2005) is running and it'll still =work?

--=_NextPart_000_01DC_01C61CE6.488EED20--|||This is a multi-part message in MIME format.
--=_NextPart_000_0065_01C61CFC.A6F072B0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
It does not work saying "The user instance login flag is not supported =on this version of SQL Server'
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message =news:eYNBXlSHGHA.3056@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal with some user mapping and permissions =issue because your production system will have different logins than =your SQL Express instance.
-- This posting is provided "AS IS" with no warranties, and confers no =rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message =news:uLSg2nQHGHA.2948@.TK2MSFTNGP10.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET =application, can I just deploy this to production (where SQL 2005) is =running and it'll still work?
--=_NextPart_000_0065_01C61CFC.A6F072B0
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

It does not work saying "The user =instance login flag is not supported on this version of SQL Server'
"Roger Wolter[MSFT]" wrote in message news:eYNBXlSHGHA.3056=@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal =with some user mapping and permissions issue because your production system will =have different logins than your SQL Express instance.
-- This posting is provided "AS IS" with no warranties, =and confers no rights.Use of included script samples are subject to =the terms specified athttp://www.microsoft.com/info/cpyright.htm">http://www.microsoft.=com/info/cpyright.htm
"GS" wrote in message news:uLSg2nQHGHA.2948=@.TK2MSFTNGP10.phx.gbl...
Hi,

I have SQLExpress database under =App_Data folder of my ASP.NET application, can I just deploy this to =production (where SQL 2005) is running and it'll still work?

--=_NextPart_000_0065_01C61CFC.A6F072B0--|||This is a multi-part message in MIME format.
--=_NextPart_000_0205_01C61CEE.968B17D0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
You will have to take the User Instance flag out of your connections =strings, attach the database to the production system and then establish =users and permissions in the production system.
There's some discussion of converting to User Instance to normal =connections here:
http://msdn.microsoft.com/sql/express/default.aspx?pull=3D/library/en-us/=
dnsse/html/sqlexpuserinst.asp
-- This posting is provided "AS IS" with no warranties, and confers no =rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message =news:ucH0y7SHGHA.3916@.TK2MSFTNGP10.phx.gbl...
It does not work saying "The user instance login flag is not supported =on this version of SQL Server'
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message =news:eYNBXlSHGHA.3056@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to deal with some user mapping and =permissions issue because your production system will have different =logins than your SQL Express instance.
-- This posting is provided "AS IS" with no warranties, and confers no =rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"GS" <nospam@.nowhere.com> wrote in message =news:uLSg2nQHGHA.2948@.TK2MSFTNGP10.phx.gbl...
Hi,
I have SQLExpress database under App_Data folder of my ASP.NET =application, can I just deploy this to production (where SQL 2005) is =running and it'll still work?
--=_NextPart_000_0205_01C61CEE.968B17D0
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

You will have to take the User Instance =flag out of your connections strings, attach the database to the production =system and then establish users and permissions in the production =system.
There's some discussion of converting =to User Instance to normal connections here:
http://msdn.microsoft.com/sql/expr=ess/default.aspx?pull=3D/library/en-us/dnsse/html/sqlexpuserinst.asp
-- This posting is provided "AS IS" with no warranties, and =confers no rights.Use of included script samples are subject to the terms =specified athttp://www.microsoft.com/info/cpyright.htm">http://www.microsoft.=com/info/cpyright.htm
"GS" wrote in message news:ucH0y7SHGHA.3916=@.TK2MSFTNGP10.phx.gbl...
It does not work saying "The user =instance login flag is not supported on this version of SQL Server'
"Roger Wolter[MSFT]" wrote in message news:eYNBXlSHGHA.3056=@.TK2MSFTNGP09.phx.gbl...
Probably. You may have to =deal with some user mapping and permissions issue because your production system =will have different logins than your SQL Express instance.
-- This posting is provided "AS IS" with no warranties, =and confers no rights.Use of included script samples are subject to =the terms specified athttp://www.microsoft.com/info/cpyright.htm">http://www.microsoft.=com/info/cpyright.htm
"GS" =wrote in message news:uLSg2nQHGHA.2948=@.TK2MSFTNGP10.phx.gbl...
Hi,

I have SQLExpress database under =App_Data folder of my ASP.NET application, can I just deploy this to =production (where SQL 2005) is running and it'll still =work?

--=_NextPart_000_0205_01C61CEE.968B17D0--

Saturday, February 25, 2012

Can I use a variable to hold the target table name.

We need to pull from a table that is named tablename_mmddyy and populate a table with the same format tablename_mmddyy. The date will be different every month so I want to be able to build the tablenames every month. Is there a way to do this in SSIS? Thank you.Yes, using expressions in your variables, you can do what you want.

Create a variable and then for its properties, set EvaluateAsExpression to True and then build your expression accordingly in the Expression box.

Then in your OLE DB source/destination, you can use that variable as the table. Just know that you'll want to probably set DelayValidation to True on your connection managers when you do this.

There are plenty of examples in this forum if you search for them on how to build expressions, if you need.|||I found the option for this under Data Access Mode but we need to do the same thing for the database name which will be in a similar format e.g. databasename_mmddyy and the source db name will change every month.|||Same thing. You can use expressions on your connection managers to dynamically create the current connection string.|||The same principals can be applied to a connection manager (i.e. database name of database server). You can use an expression to build the connection string from a variable in the properties window of the connection manager.|||Any examples of this?|||

agentf1 wrote:

Any examples of this?

In the ConnectionString expression box for a connection manager. Also it can't hurt to set DelayValidation to True.

"Data Source=" + @.[User::YourDatabaseNameVariable] +";Initial Catalog=Report;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"|||What goes in the database name field? I am assuming that it gets overridden by the expression.|||

agentf1 wrote:

What goes in the database name field? I am assuming that it gets overridden by the expression.

The ConnectionString will override any other parameters.|||

agentf1 wrote:

Any examples of this?

http://search.live.com/results.aspx?FORM=QBJK&q1=macro%3Ajamiet.ssis&q=expressions

-JT

|||This seems to be changing both of my OLE DB Connections. Is there a way one can be static and the other updated by the variable? It also appears that Data Source controls the server and Catalog is the database name.|||

agentf1 wrote:

This seems to be changing both of my OLE DB Connections. Is there a way one can be static and the other updated by the variable?

That's impossible (unless one of us has misunderstood). An expression on the ConnectionString property of a connection manager only changes that connection manager.

agentf1 wrote:

It also appears that Data Source controls the server and Catalog is the database name.

Correct.

-Jamie

|||

Jamie Thomson wrote:

agentf1 wrote:

This seems to be changing both of my OLE DB Connections. Is there a way one can be static and the other updated by the variable?

That's impossible (unless one of us has misunderstood). An expression on the ConnectionString property of a connection manager only changes that connection manager.

agentf1 wrote:

It also appears that Data Source controls the server and Catalog is the database name.

Correct.

-Jamie

My bad, I had the expression on both connections. I am OK, thanks for all the help, worked beautifully.