Showing posts with label named. Show all posts
Showing posts with label named. Show all posts

Wednesday, March 7, 2012

DTS - Send records to different text file - DTS

Hi all,

I am designing a DTS package instead of SSIS.

I have a text file and already uploaded to tableA, there is a field named NameID in tableA. The field NameID should match the NameID in tableB and update other fields of tableA, the non-match records will generate another exception text file.

How can i implatement this in DTS? Which task or tech?

thanks

Micror

You'll need to ask this in the DTS forum. http://groups.google.com/group/microsoft.public.sqlserver.dts?lnk=srg

Tuesday, February 14, 2012

DT_GUID to DT_WSTR yields braces around uniqueidentifier

I'm using a Lookup component to add a DT_GUID column named cat_id to a data flow, which is used in a downstream Derived Column component to add a DT_WSTR column named value. The DC expression simply casts the uniqueidentifier to the desired type: (DT_WSTR, 434)cat_id

But when the values are persisted in the destination table's nvarchar(434) column, they have braces around them, e.g. {F475DB7F-5CB0-4EE1-9BF2-758C77D7A6D7}

What is introducing those braces, and what do I need to do to prevent it?

You may remove the braces by using SUBSTRING function in the DC expression:
http://msdn2.microsoft.com/en-us/library/ms137541.aspx
SUBSTRING((DT_WSTR, 434)cat_id, 1, 40)

(if I remember GUID length, maybe the last param should be 39 or something like this).

|||

Michael Entin - MSFT wrote:

You may remove the braces by using SUBSTRING function in the DC expression:
http://msdn2.microsoft.com/en-us/library/ms137541.aspx

SUBSTRING((DT_WSTR, 434)cat_id, 1, 40)

(if I remember GUID length, maybe the last param should be 39 or something like this).

Thanks, but why is that even necesssary? In Transact SQL, when a uniqueidentifier is cast to a varchar/nvarchar the result doesn't have braces around the value.

|||It is very common to add braces around GUID representation, although it is of course unfortunate that SSIS implemented it differently than T-SQL.|||

Michael Entin - MSFT wrote:

It is very common to add braces around GUID representation, although it is of course unfortunate that SSIS implemented it differently than T-SQL.

Thanks for following up.

BTW, GUIDs are 36 characters and strings are 1-indexed, so the expression I'm using is:

SUBSTRING((DT_WSTR,434)cat_id,2,36)

dt_addtosourcecontrol

In the master database is a stored procedure named dt_addtosourcecontrol.
Does this imply that if you have Visual Source Safe, there is a slick way of
quickly checking files in and out or similar without using VSS? Thanks in
advance.
Mark--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
These are created by the Visual Studio tools but yes I have seen some
scripts that allow you to use them from QA, try searching google.
I'd suggest you take a look at mssqlXpress from
http://www.xpressapps.com/ a nice QA replacement with VSS
integration.
"Mark" <mfield@.idonotlikespam.cce.umn.edu> wrote in message
news:ePeHGAokDHA.2432@.TK2MSFTNGP10.phx.gbl...
> In the master database is a stored procedure named
> dt_addtosourcecontrol. Does this imply that if you have Visual
> Source Safe, there is a slick way of quickly checking files in and
> out or similar without using VSS? Thanks in advance.
> Mark
>
--BEGIN PGP SIGNATURE--
Version: PGP 8.0
iQA/AwUBP40IFlOULLw5tFTpEQIfWgCgppxFmwNPI3a7iFGZHkeYd9mTQvEAoIQl
MSRdisM+fik3DPtKwYVBWLYt
=GZKR
--END PGP SIGNATURE--

dt_ procs and the public role

In a SQL 2k instance (latest SP) some of my user databases show the public role with execute on a variety of stored procs named dt_* (i.e. dt_addtosourcecontrol). However, not all the user databases do this, some do not grant the public role execute on these procs .

So, can someone explain what generates these permissions and is it acceptable to remove them? If I have a database that does not grant public access, should I be concerned? I don't see any reference to these procs in BOL.

TIA,

Moblex

This seems to be a Visual Studio generated procedure, so you should ask this question on a Visual Studio forum. Here's a related thread

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=562892&SiteID=17

that I found with the following search query:

http://search.live.com/results.aspx?q=dt_addtosourcecontrol&mkt=en-us&FORM=LVSP&go.x=10&go.y=13

Thanks
Laurentiu