Assigning Passwords To Connection Managers Using Expressions

May 2, 2007

Hi Experts here,

Sorry if this query had been raised earlier. While In DTS Packages we retrieve connection details for all Connections in a Package from a table and then assign them to the following global Variables

gv_Source_User, gv_Source_Pwd, gv_Source_DataSource, gv_Source_InitialCatalog



Finally we reassign these variables to repective Connection Properties using Dynamic Properties Task. After Migrating to SSIS though we are able to assign almost all variables to Properties of Connection Managers via Expression except the Password which we donot find in the drop down list in order to assign gv_Source_Pwd.



Is there any work around to assign passwords dynamically?



Many Thanks

Subhash Subramanyam

View 4 Replies


ADVERTISEMENT

Connection Managers

Jan 18, 2008

Hello Experts,

I€™m new at SSIS and would like to try the follow easy function.
Just get some data from my database und put into a text-file.
All function going well.
Right now I€™ve got just one problem I can€™t resolve.
At the window €œConnection Managers€? are the connections I used in my project. But how can I make this connection more dynamical? E.g. I have a connection.txt file and the Connection Manager should set his properties after read this txt-file.
Have someone an idea?

Best regards,
Alex

View 3 Replies View Related

List All Your Connection Managers

Oct 23, 2005

Hello,

View 20 Replies View Related

Connection Managers Not Installed?

Apr 4, 2006

apologies if this is the wrong group ..

whenever I create an Integrated Services project and attempt to add a Connection Manager I get the error

Connection Manager 'blah' is not properly installed on this computer.

(Microsoft.DataTransformationServices.Design)

This happens with all menu options except New Connection..

I have uninstalled and reinstalled both Visual Studio 2005 and SQL Server 2005 and made sure I have selected everything in each case

what am I missing?

Thanks

Chris

View 1 Replies View Related

Unused Connection Managers

Sep 7, 2007

Hi,

I am unsure if i am managing my connections in the correct way... but as it stands we have them in a .dtsConfig file that each package references in order to get the relevant details..

This is working fine, except that in total our ETL project uses 6 different connections, and none of the packages utilise all 6.

This leads to an error message upon opening up EVERY package stating that there are connection strings in the .dtsConfig that are unused, yeah, thats the idea!

The way i have gotten around this, is to just include all 6 connection managers in every package, but my question is, is there a better way to achieve this same result??

are we going about this in a bit of a cackhanded way?

any incite would be useful..

Best Regards

Chris

View 9 Replies View Related

SSIS Connection Managers Error

Feb 6, 2008

I'm trying to create a new package and keep getting different errors. The package uses the same .NET ODBC provider as another package.

I can test the connection fine.


When I add a DataReader Source and select my connection I get the following warning:

Not all connection managers have been set. Set all connection managers.



If I click the refresh button I get this warning message:

Error at Data Flow Task [DataReader Source [6338]]: The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID.


All my collections have ID's and they are all read only.


If I ignore those warning I can enter my SQL command and go to the column mappings tab and see all the columns I selected but I then see several warnings all saying the same thing.

Driver does not support this function

I'm not able to close the Advanced Editor at this point.


Any ideas?

View 2 Replies View Related

Questions On Custom Connection Managers

Feb 18, 2008

I'm trying to create a custom connection manager and I have ConnectionType in the DtsConnection attribute set to "MSMDM". When I tried to create one in a package I got:



The connection type "MSMDM" specified for connection manager "{A8543B4B-41D9-4E69-9580-3D1A491AD719}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.
(TestHarness1)


So, a few questions:


What are the valid connection manager types?

Why can I not create a new connection manager type of my own?

If I cant create new connection manager types then the purpose of being able to build custom connecton managers is defeated. Hence, what's the point in giving us the ability to create custom connection managers?
-Jamie

View 7 Replies View Related

Data Sources And Connection Managers

Jun 6, 2006

Greetings my SSIS friends

This is probably a silly question but what exactly is the purpose of creating Data Sources when it is possible to set up individual connection managers?



Thanks for your help in advance.



View 1 Replies View Related

Oracle Drivers In Connection Managers

Feb 15, 2006

I am not seeing an option to use the OraOLEDB.Oracle driver when defining connections in ssis. This driver shows up in management studio when trying to create linked servers so I don't know why it wouldn't show up here. All the client tools are installed fine and the linked server works. Any ideas?

View 4 Replies View Related

Connection Managers Area Not Coming Up

Oct 4, 2007



When I brought up the BI DEV studio first tiem the Connection Managers area showed up, but after I closed it by mistake from next time on wards it is not coming up.



Can some one from this form help me how to get the Connection Managers area(pane) back?

Thanks in advance.

Regards
Mamidi

View 3 Replies View Related

Integration Services :: DSSIS Connection Managers

Oct 22, 2015

I am working on some SSIS packages [ deployed in MSDB , Integration services] ,

I need to list down the dataconnections , particularly the database names and servers.

View 2 Replies View Related

Connection Managers Are NOT Recognized After Migrating To Another Server

Mar 8, 2007

Hi,

My database admin just migrated my packages from development to user testing server.

My packages configured to read the connection manager properties from the .dtsconfig.

But I am getting "The connection "CRPRDNMSQEZ.CIReporting2" is not found"

CRPRDNMSQEZ.CIReporting2 is being my connection manager.

I did find and replace server name in the dtsconfig but I guess it didn't work.

Any help is appreciated.

View 3 Replies View Related

Dynamically Create Connection Managers @ Run Time

Jan 28, 2006

Is there a way to dynamically create a connection manager @ run time? I would like to do this from a data set of connection strings so I can link them into a union all component.

View 1 Replies View Related

Problem With SSIS Package Connection Managers

Jul 19, 2007

Hi,

We are using a €œFlat File Connection Manager€? in our SSIS package.

The package fails occasionally while loading in the validation phase with the error


€œ-1073659899,0x,The connection type "FLATFILE" specified for connection manager "<some name>" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.


This error is not returned always.
Also I feel €œFLATFILE€? is a valid type of connection manager. This value €œFLATFILE€? is inserted by the editor and not manually typed. This is a weird behavior of SSIS.
Sometimes I get this error with respect to some other connection manager used in the package as well. €œOLEDB€? is the type of that other connection manager.

Has anybody faced similar issue earlier?

Please let me know some thoughts, suggestions, and possible work-arounds to avoid this error as this is very critical for us.

Regards
Madhavan.TR

View 2 Replies View Related

Extended Connection Managers For Data Flow Destinations?

Mar 13, 2006

It looks like you can only extended connection managers for data flow sources.

Is there anyway to develop a custom connection manager for the SQL destination in the data flow destinations?

I can€™t use hardcoded connection strings. I can€™t use configurations because they are not encrypted. I already have managed code that will give the corrected connection string. I already have a custom connection manager that I use from the data flow sources. I just need one for data flow destinations but I can€™t see a way to extend into the OLE DB?



View 5 Replies View Related

Using Connection Managers Inside Custom Log Provider Failing!

Apr 3, 2006

Hi,

I'm trying to use an OLE DB connection manager from inside a custom log provider, but can't get the code to work - I get an exception "A first chance exception of type 'System.InvalidCastException' occurred in SSEALogProvider.dll" on the last line of the code below.

I know the connection is OLE DB from looking at .CreationName.

I've tried both with & without ToConnectionManager90(), but appearently not in the right way, both cases gives the same exception.

Any tips on what I'm missing? All the examples I've seen are either creating (instead of using) connection managers, or are file based connection managers. Any and all help much appreciated!



Thanks/Kristian



if (this.ConfigString.Length == 0 || connections.Contains(ConfigString) == false ||

connections[ConfigString].CreationName != "OLEDB")

{

infoEvents.FireError(0, "SSEALogProvider", "The ConnectionManager " + ConfigString + " specified in the ConfigString property cannot be found in the collection, or is of the wrong type (expected CreationName='OLEDB'.)", "", 0);

return Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure;

}

else

[...]



public override void OpenLog()

{

if (!connections.Contains(this.ConfigString))

throw new Exception("The ConnectionManager " + this.ConfigString + " does not exist in the Connections collection.");

ConnectionManager connectionManager = connections[ConfigString];

IDTSConnectionManager90 connectionManager90 = DtsConvert.ToConnectionManager90(connectionManager);

object connObj = connectionManager90.AcquireConnection(null);

//ConnectionManagerOleDb connectionManagerOleDb = (ConnectionManagerOleDb)(connectionManager.InnerObject);

//object connObj = connectionManagerOleDb.AcquireConnection(null);

if (connObj == null)

{

events.FireError(0, "SSEALogProvider", "Could not connect to the log database with connection string " + ConfigString + ".", "", 0);

return;

}

// Exception on next line: "A first chance exception of type 'System.InvalidCastException' occurred in SSEALogProvider.dll"

OleDbConnection oledbConnection = (OleDbConnection)connObj;

View 3 Replies View Related

Query About Impact Of No. Of Connection Managers On SSIS Execution Time

Jun 15, 2007





If I have 6-8 queries running in parallel, Whether having a Single connection Manager (for the same source) for all the Extract performs faster or having Distinct Connection Manager for each of the extract performs faster ?



Regards

Subhash Subramanyam

View 1 Replies View Related

SSIS Connection Passwords

Jul 16, 2007

I created my SSIS package with connections to server databases. When I move the SSIS file to another machine it loses the password that is save in the connection. Is this a security feature? Is there a way to make it keep the passwords?

View 1 Replies View Related

SSIS Connection Manager Passwords

Mar 12, 2007

I am having a strange problem in that when ever I create a connection to an OLE db source and use SQL Server authorization and save the password, the connection manager seems to "forget" the password. That is, when I click the 'save password' check box, and do a test connection, it connects fine. But as soon as I close that connection window, and reopen it, the password box is empty, and the 'save password' box is still checked. Even if I do a test connection at this point, it wont connect because it does not have the password.

Is this some sort of bug? Is there a workaround?

View 25 Replies View Related

Saving SSIS Package Connection Passwords

Jul 11, 2007

Hello All,



I'm new to SQL 2005. I am setting up some SSIS packages which will connect to an Oracle database and copy some tables from it. These packages will then be scheduled to run on a daily basis. Because they will run automatically, it is required that passwords be saved along with the connection string. However, even though the password is saved (and encrypted, I checked the .dtsx in notepad), when I run the package, the connection to Oracle fails. Only if I respecify the password does it run correctly. How can I correctly save this password so that I can schedule automatic execution? Thanks for any info.

View 5 Replies View Related

SQL Server 2008 :: VB Script / Connection Strings And Passwords

Nov 2, 2015

We run some VB scripts to extract data from our SQL server. Within these scripts we reference a 'read only' SQL userid and it's password in the connection string.

What I want to do is remove the references to the 'read only' user and it's password from the scripts.

Could we add the user that is running the script as a SQL authenticated user (that has read only access) thereby not have to reference any passwords in our script ?

View 3 Replies View Related

Error Assigning Connection Mgr To Datareader Source Component

Jan 13, 2006

Synopsis:

Attempting to create a data flow task to copy data from AS/400 (DB2) to SQL2005, using an existing System DSN ODBC connection defined on the SQL2005 host.

Problem:

When adding the DataReader Source component to the package, I cannot assign the Connection Manager. Designer issues the error message:

"The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID."

Editing the DataReaderSrc component shows only one row under the Connection Managers tab:

Name=IDbConnection
Connection Manager=blank
Description=Managed connection manager

The datareadersrc component editor displays the warning message: "Not all connection managers have been set. Set all connection managers.". Clicking the Refresh button causes the error message to be displayed "The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID."

I am prevented from assigning my Connection Manager object the DataReaderSrc.


The package already contains one Connect Manager object:

Provider: .Net Providers/Odbc Data Provider
System DSN


Test Connection operation succeeds

Any help would be appreciated.

Fraser.

 

 

View 3 Replies View Related

SQL 2005 Passwords, Can It Be Configured To Accept Case-insensitive Passwords???

Jul 7, 2006

Users were able tolog on to our SQL 2000 servers with their passwords being case-insensitive.

Now with SQL 2005 some users can't logon because SQL 2005 passwords are case-sensitive.

Can SQL 2005 be configured so that passwords are NOT case sensitive???

Thanks!

View 6 Replies View Related

Connection Passwords With And Without SSIS Package Configurations - Password Not Sticking

May 8, 2008

I'm learning SSIS, and just started to use SSIS Package Configurations. I want to be able to switch between a dev and prod instance of our database.

I did not specify the password in the Configuration file (XML), figuring it would get it from the package itself. (That will be the same between dev and prod). But once I set up to use the Configuration, I started to get a "Login failed..." message. I added the password to the configuration, and it's the same. I quit using the configuration file at all, and then it works again.

This may be related, but when I show the properties on my connection, it shows stars for the password. When I go to the editor, the password field is blank, and if I test the connection, it fails. I type in the password, and then the connection works. I have the "Save my password" checked, but every time I go back, the password is blank. In fact, if I type in the password for the connection in the editor, and then go to the "All" page, the password is blank. It may be a red herring, but it sure looks like it's not really storing the password, and thus the Configuration file can't connect when it tries to get it. I can type in the password, test the connection (it works), close the editor dialog, open the editor dialog, test the connection again, and since the password is now blank, the connection fails.

What do I have to do to make that password actually stick!?

Without the Configuration file, when I save the package to SQLServer, it will run as a job, in spite of the password appearing to not stick. With the configuration file, it's not even running while still in Studio.

Here are at least some of the version information, which may or may not be useful.

Microsoft Visual Studio 2005
Version 8.0.50727.42
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft SQL Server Analysis Services Designer
Version 9.00.3042.00

Microsoft SQL Server Integration Services Designer
Version 9.00.3042.00

Microsoft SQL Server Reporting Services Designers
Version 9.00.3042.00

SQL Prompt 3.5

Thank you for any help you can provide.
-thursday's geek

View 12 Replies View Related

Excel Connection Manager And Expressions

Feb 1, 2007

Hello,

I have a question regarding which expressions need to be set to have the excel connection manager be able to create/update a file dynamically. I'm reading a path in from a database and storing it in a variable. The path is just the location of an excel file. What I would like to have happen is that the excel connection manager be dynamic so that if I wanted to change where this file went or the name I could simply change the value in the database.



I've tried setting the expressions, in the Excel connection Manager: ConnectionString,ExcelFilePath, and Servername to the variable \pathfolderfile.xls with no luck. The ConnectionString seems to be a little funny because it contains Provider=Microsoft.Jet.OLEDB.4.0;Data source = ; Extended Properties =; HDR=YES", so I don't know if I can just use that expression and ignore the others or what.



Any help would appreciated,

Phil

View 3 Replies View Related

SSIS Connection Object And Expressions

Feb 23, 2006

I have been writing a custom source adapter that uses a file connection within the connection manager. If I hard-code a specific file then the component works. However if I use a file connection that has an expression defined which updates the connection, for example when you have a for-each loop looping over a set files. The file connection doesn€™t seem to re-evaluate expression each time you access the file connection via the code. Is there something that I am missing or is there a bug?

View 10 Replies View Related

Connection Manager Ignores Expressions With Script Component

Mar 16, 2006

I have written a script source component and attached a flat file connection. The connection string of which is defined by an expression.

However when I get the connectionstring from the connection in the script it has the default filename value of flat file not the value of the expression. This is proved by passing in the filename variable, and comparing the 2.

The flat file has an expression on the ConnectionString of @[User::filename]

Can someone confirm this is a bug.

View 3 Replies View Related

File Connection Act Differently Than Flat File Connection For Expressions?

Jun 26, 2007

I am thinking I must be doing something wrong..



I have dozens of packages that work as follows (high level... not listing all the steps just those relevant to this question)



- Get list of files in directory

- Join list to list of already imported files

- Those not imported put into an ADO.Net object

- Loop through ADO.Net record (which contains the filename) and import each file.



I just set the connection string of the flat file to be the variable in the loop (expressions.. connection string). Pretty standard stuff. Now I tried to do the same with a file connection (not a flat file) becuase I have a source that is from a mainframe and I had to write a custom source script and its not working. Basically the source script uses

oRead = oFile.OpenText(Me.Connections.FileConnection.ConnectionString)

And it opens the same file over and over (not ever changing as the ConnectionString expression changes like it does for flat files) and imports it even though I have verified the loop is correctly looping through all the different files.



Any thoughts as to what I am doing wrong?

View 3 Replies View Related

Valid Expressions Are Constants, Constant Expressions, And (in Some Contexts) Variables. Column Names Are Not Permitted.

Dec 11, 2007

I want to have this query insert a bunch of XML but i get this error...


Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 117

The name "ExpenseRptID" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 151

The name "DateWorked" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

What am i doing wrong...Can anyone help me out!! Thanks!!

p.s I know this query looks crazy...


Code Block

IF EXISTS (SELECT NAME FROM sysobjects WHERE NAME = 'InsertTimeCard' AND type = 'P' AND uid=(Select uid from sysusers where name=current_user))
BEGIN
DROP PROCEDURE InsertTimeCard
END
go
/*********************************************************************************************************
** PROC NAME : InsertTimeCardHoursWorked
**
** AUTHOR : Demetrius Powers
**
** TODO/ISSUES
** ------------------------------------------------------------------------------------
**
**
** MODIFICATIONS
** ------------------------------------------------------------------------------------
** Name Date Comment
** ------------------------------------------------------------------------------------
** Powers 12/11/2007 -Initial Creation
*********************************************************************************************************/
CREATE PROCEDURE InsertTimeCard
@DateCreated DateTime,
@EmployeeID int,
@DateEntered DateTime,
@SerializedXML text,
@Result int output
as
declare @NewTimeCardID int
select @NewTimeCardID = max(TimeCardID) from OPS_TimeCards
-- proc settings
SET NOCOUNT ON

-- local variables
DECLARE @intDoc int
DECLARE @bolOpen bit
SET @bolOpen = 0
--Prepare the XML document to be loaded
EXEC sp_xml_preparedocument @intDoc OUTPUT, @SerializedXML
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler
--The document was prepared so set the boolean indicator so we know to close it if an error occurs.
SET @bolOpen = 1


--Create temp variable to store values inthe XML document
DECLARE @tempXMLTimeCardExpense TABLE
(
TimeCardExpenseID int not null identity(1,1),
TimeCardID int,
ExpenseRptID int,
ExpenseDate datetime,
ProjectID int,
ExpenseDescription nvarchar(510),
ExpenseAmount money,
ExpenseCodeID int,
AttachedRct bit,
SubmittoExpRep bit
)
DECLARE @tempXMLTimeCardWorked TABLE
(
TimeCardDetailID int not null identity(1,1),
TimeCardID int,
DateWorked DateTime,
ProjectID int,
WorkDescription nvarchar(510),
BillableHours float,
BillingRate money,
WorkCodeID int,
Location nvarchar(50)
)
-- begin trans
BEGIN TRANSACTION
insert OPS_TimeCards(NewTimeCardID, DateCreated, EmployeeID, DateEntered, Paid)
values (@NewTimeCardID, @DateCreated, @EmployeeID, @DateEntered, 0)
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler


--Now use @intDoc with XPATH style queries on the XML
INSERT @tempXMLTimeCardExpense (TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
SELECT @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep
FROM OPENXML(@intDoc, '/ArrayOfTimeCardExpense/TimeCardExpense', 2)
WITH ( ExpenseRptID int 'ExpenseRptID',
ExpenseDate datetime 'ExpenseDate',
ProjectID int 'ProjectID',
ExpenseDescription nvarchar(510) 'ExpenseDescription',
ExpenseAmount money 'ExpenseAmount',
ExpenseCodeID int 'ExpenseCodeID',
AttachedRct bit 'AttachedRct',
SubmittoExpRep bit 'SubmittoExpRep')
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- remove XML doc from memory
EXEC sp_xml_removedocument @intDoc
SET @bolOpen = 0


INSERT OPS_TimeCardExpenses(TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
Values(@NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
select @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep
from @tempXMLTimeCardExpense
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- For time worked...
INSERT @tempXMLTimeCardWorked(TimeCardID, DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
SELECT @NewTimeCardID, DateWorked, ProjectID, WorkDescription, BilliableHours, BillingRate, WorkCodeID, Location
FROM OPENXML(@intDoc, '/ArrayOfTimeCardWorked/TimeCardWorked', 2)
WITH ( DateWorked DateTime 'DateWorked',
ProjectID datetime 'ProjectID',
WorkDescription nvarchar(max) 'WorkDescription',
BilliableHours float 'BilliableHours',
BillingRate money 'BillingRate',
WorkCodeID int 'WorkCodeID',
Location nvarchar(50)'Location')
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- remove XML doc from memory
EXEC sp_xml_removedocument @intDoc
SET @bolOpen = 0


INSERT OPS_TimeCardHours(TimeCardID, DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
Values(@NewTimeCardID,DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
select @NewTimeCardID ,DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location
from @tempXMLTimeCardWorked


-- commit transaction, and exit
COMMIT TRANSACTION
set @Result = @NewTimeCardID
RETURN 0

-- Error Handler
ErrorHandler:
-- see if transaction is open
IF @@TRANCOUNT > 0
BEGIN
-- rollback tran
ROLLBACK TRANSACTION
END
-- set failure values
SET @Result = -1
RETURN -1

go

View 1 Replies View Related

Problem Assigning SQL Task Result To A Variable - Select Count(*) Result From Oracle Connection

Dec 26, 2007



I have an Execute SQL Task that executes "select count(*) as Row_Count from xyztable" from an Oracle Server. I'm trying to assign the result to a variable. However when I try to execute I get an error:
[Execute SQL Task] Error: An error occurred while assigning a value to variable "RowCount": "Unsupported data type on result set binding Row_Count.".

Which data type should I use for the variable, RowCount? I've tried Int16, Int32, Int64.

Thanks!

View 5 Replies View Related

Visio: Employees And Managers

Nov 15, 2007

Ok, I have the following table

CREATE TABLE employees (
employee_number char(6) NOT NULL
, known_as char(20)
, surname char(20)
, job_title char(20)
, manager_number char(6) NULL
, unique_identifier char(6) NOT NULL PRIMARY KEY
)
--unique_identifier is in the format 000123456789

Now I have a conundrum when trying to create organization charts in Visio, so I figured I'd try reproduce the format that a bunch of walkthroughs suggest, which is with the first column being an int identity(1,1) column as the employeeID with the managerID being an int column also, referencing the employeeID.
Hope I've not lost you just yet ;)
So here's what I figured - create a new table with the new integer columns, slap my current data into it and then update the managerID as necessary...

Except I can't work out the update statement for this!

CREATE TABLE gvVisioTest (
employeeID int identity(1,1)
, employee_number char(6)
, job_title char(40)
, department_reference char(10)
, managerID int
, manager_number char(6)
)
GO

INSERT INTO gvVisioTest(employee_number, job_title, department_reference, manager_number)
SELECT employee_number, job_title, department_reference, manager_number
FROM employees
GO

--Update managerID with relevant employeeID
GO

DROP TABLE gvVisioTest

Any ideas?

Oh and this is legacy so the design is flawed, modified over time (the manager field is a bodge put in 5 years ago), so yeah unfortunately I have to work with what I've got :(

View 14 Replies View Related

Display (field) But Only Count Managers

May 8, 2007

I need to figure out the number of managers without listing them. Label the column Number of Managers.

any help is appricated.


Number of Managers
-------------------------
6

View 3 Replies View Related

How To Display The Managers And The Employees Working Under That Manager

Sep 8, 2006

Hello,I'm facing with a problem though it may look very simple for many ofu it is a bit complicated for me So kindly please help me outi have a table emp with employee id,name and mgridI need to display the managers and the employee working under thatmanager . How should this be done.Thanking uBroken Arrow

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved