Unable To Execute DTSLookup

Feb 22, 2006

I have a pretty simple lookup query that returns an error that I can't figure out. It states that the query has too few parameters (2), but only 1 is required. I've investigated every component and everything seems correct. I have another lookup just like this and it works fine. Here is a simple description:

I have an Access table with values that have to be loaded into a SQL Server table. I defined a Row Transform task with an ActiveX script.

My lookup query is called Test1 and looks like this:

SELECT ConveyanceInstrumentId
FROM ConveyanceInstrumentMapping
WHERE (conveyanceinstrument = ?)

Here is the transform script:

'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************

' Copy each source column to the destination column
Function Main()
dtsdestination("ConveyanceInstrumentId") = DTSLookups("test1").Execute(1)
Main = DTSTransformStat_OK
End Function

The Execute(1) is just there for testing purposes, but returns the same error as when I reference the field I want to look up.

When I test this, an error is returned: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2

Any suggestions or ideas are appreciated.

View 2 Replies


ADVERTISEMENT

Dtslookup

Jan 15, 2001

I'm having a hard time trying to get my text file import to work. I have a DTS job setup that maps fields etc. I'm having trouble with a field in my destination. This is just a counter field where it just number's the record. I tried doing a DTSLookup to find the max number and add 1 to it for the next record but I'm getting a DTSLookup "Type mismatch" when I run.

Is there an easier way to do this (maybe the property of the destination field) or what am I doing wrong in the DTSLookup.

View 1 Replies View Related

DTSLookup Error Handling

Apr 18, 2006

Hello all,
Does any one know how I can capture the sql error message when the sql statement in DTSLookup step fails?
e.g.
I have this sql statement in a DTSLookup task:
insert into table1 (col1) values (?); select @@ERROR

Let's say for some reason (bad data), my insert statement fails and I want to know why. So I added "select @@ERROR" to capture the error. However, from the Lookup window, I cannot save the result of @@ERROR to a global variable or to an output parameter. I want to log this error in the next step that handles the OnFailure workflow, but I don't know how.

Can someone help please?

Thanks,
K.

View 1 Replies View Related

Need Help Unable To Execute A DTS With SA Privilages

Aug 10, 2006

Hi

I fighting with a strange problem with a DTS package, we had a DTS package under a name of user who left the company and his account was deactivated, i openned that DTS package and saved it under my name and my user is part of sysadmin role, when i am trying to execute the DTS i gets the error message permission denied unable to create table (database name)
while i can crete/delete tables in that particular database manualy via query analyser as well as through enterprise manager but when i am trying to do that through a DTS as mentioned above i always gets the permission denied message
any help will be highly appreciated
thanks

Ramis

View 3 Replies View Related

Unable To Execute Package In SQLAgent

Sep 26, 2007

I have created a logging test package that I am attempting to execute in SQLAgent.
It uses an environment variable in Package Configurations to set a variable which is the expression value for the ConnectionManager's 'ole_src_Admin' ConnectionString.
The next three Package Configurations use that connection to retrieve SQL Server configuration types/

Using the same account I can execute the package succesfully from cmd line
The execution string is
dtexec /SQL "Parent Package" /SERVER "BLAHSQL-DEV" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V

Attempting to execute this via SQLAgent (type CmdExec) I receive the following error:
Date 9/26/2007 9:47:45 AM
Log Job History (Logging Test)
Step ID 3
Server QRISQL-DEV
Job Name Logging Test
Step Name Execute 2005 Package
Duration 00:00:01
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.3042.00 for 64-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 9:47:45 AM
Info: 2007-09-26 09:47:46.28
Code: 0x40016038
Source: Parent Package
Description: The package is attempting to configure from the environment variable "SQL_Parameter_Connect_String".
End Info
Info: 2007-09-26 09:47:46.28
Code: 0x40016040
Source: Parent Package
Description: The package is attempting to configure from SQL Server using the configuration string ""ole_src_Admin";"[dbo].[Parameter]";"sv_ssis_package_store_connectionstring";".
End Info
Error: 2007-09-26 09:47:46.30
Code: 0xC0202009
Source: Parent Package Connection manager "ole_src_Admin"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
End Error
Info: 2007-09-26 09:47:46.30
Code: 0x40016040
Source: Parent Package
Description: The package is attempting to configure from SQL

I have also succeffuly executed this package in the same manner locally using both the cmd line and SQLAgent.

Any clues would be appreciated.

View 1 Replies View Related

Unable To Get Return Value Of Execute Sp_executeSql @sqlString

Aug 21, 2006

Hi All,

Create proc sproc_Insert
@TableName varchar(50),
@InsertColumns varchar(1000),
@InsertValues varchar(2000),
@WhereCondition varchar(200)
as
Begin
Declare @CheckStr nVarchar(2000)
Declare @RetVal int
Set @checkStr = 'Select * from '+ @TableName + ' '+ @WhereCondition
execute sp_executesql @checkStr,@RetVal output
print @RetVal
End

I am not able to retrieve the return value in the above procedure. For example if data exists then 1 else o



Thanks & Regards

Bijay

View 3 Replies View Related

Unable To Execute Below Mentioned Queries Against SqlCe 3.1

Apr 10, 2007

Hi,
When I run the following queries they are working fine with MS Access but not working with SqlCe 3.1 on my desk top.

I am using Sql Server 2005 management studio to connect to SqlCe (.sdf) file and running the queries with in that.

Please guide me what is wrong here:

1)
select count(*) FROM (SELECT DISTINCT TIDVALUE FROM cdirmen)
Error Message:
Major Error 0x80040E14, Minor Error 25501
> select count(*) FROM (SELECT DISTINCT TIDVALUE FROM cdirmen)
There was an error parsing the query. [ Token line number = 1,Token line offset = 23,Token in error = SELECT ]

2)
SELECT distinct tidvalue FROM cdirmen WHERE objname='I_MAP' AND menuid<>0
AND 0<(SELECT COUNT(*) FROM cmenu WHERE cmenu.menuid=cdirmen.menuid)
AND 0=(SELECT COUNT(*) FROM cmenu WHERE cmenu.menuid=cdirmen.menuid AND cmenu.item like 'CL%')

Error Message:
Major Error 0x80040E14, Minor Error 25501
> SELECT distinct tidvalue FROM cdirmen WHERE objname='I_MAP' AND menuid<>0
AND 0<(SELECT COUNT(*) FROM cmenu WHERE cmenu.menuid=cdirmen.menuid)
AND 0=(SELECT COUNT(*) FROM cmenu WHERE cmenu.menuid=cdirmen.menuid AND cmenu.item like 'CL%')
There was an error parsing the query. [ Token line number = 2,Token line offset = 8,Token in error = SELECT ]

View 5 Replies View Related

SQL Server 2008 :: Unable To Run Procedures With Execute As Owner

Jun 19, 2015

I have a periodic backup task, and when I need a development copy on which to test code, I restore my most recent backup to a different name, switch the ODBC link to that name on my development machine and have a current copy of the database to play with.

I've been doing this for years, and it works great. Just now I did it, and suddenly my development machine is unable to run any stored procedures that have the 'Execute as owner' clause in their definition. I'm using domain accounts, my personal account is the owner of the database, and everything works on the production copy, which is in the same instance on the same machine.

The test copy is identical to the production copy, which continues to work fine - it was just created using by restoring the backup of the production copy, but I can't run anything with this clause. As soon as I delete the 'Execute as owner' line, the procedure is suddenly available. If I put it back, I'm locked out again.

The error message is: The server principal “sa” is not able to access the database “WhateverDB” under the current security context

View 5 Replies View Related

Unable To Execute Job Inside Sproc From Reporting Services

Mar 21, 2008

We have a request to build a report based on user input from an excel spreadsheet. We have a SSIS package that imports the data from Excel. This is run by a sql server agent job. Our stored procedure executes this job and runs this whole process just fine but when we execute the stored procedure from reporting services we get errors. Has anyone done this type of thing before and do you have any working solutions for how to get this reporting methodology to function?

Thanks!

View 4 Replies View Related

Unable To Execute Stored Procedure When New Item Is Selected In Dropdown.

Mar 30, 2006

I'm using a form that has a dropdown control.  This dropdown control has items that can be selected that serves as a filter for displaying results on the page that is returned from a stored procedure call.  I'm having trouble finding a way to execute the stored procedure to display the filtered results everytime a different item in the dropdown gets selected.  Currently, the form does get submitted and the selected item does get saved, but the stored procedure never gets executed on a postback.  Any ideas on resolving this issure?  Your help is much appreciated.

View 1 Replies View Related

Unable To Execute Package Programmatically With Expression Based Tasks

Dec 8, 2006

Hi,

I am trying to programmatically execute a package that contains an Execute SQL Task component bound to a variable for its "SqlStatementSource" property (via an expression). The variable is of type String and contains a simple value of "SELECT 1". The Execute SQL Task contains an expression that sets the SqlStatementSource property to the value of this variable.

The package runs fine when I execute it via dtexec or BIDS, but when I attempt to run it via the object model, I receive the following error message:

The result of the expression ""@[User::Sql]"" on property "SqlStatementSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

I did a search on this forum and noticed quite a few threads about this same issue, but no explanation/solution. We have quite a few packages that have dynamically constructed SQL statements for Execute SQL Tasks, and they are all failing to run via the object model. Is there something that I am missing?

Thanks,

Vitaly

View 1 Replies View Related

Unable To Execute Multiple SSIS Packages From Windows Service

Aug 28, 2007

Need some help...
When we tried to run mulitple packages one after the other from a windows service, first one succeeds but later ones are throwing below error :
"The script threw an exception: The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.
A deadlock was detected while trying to lock variable "System:ackageName, User::BusinessDate, User::Environment, User:ortfolioName" for read access. A lock could not be acquired after 16 attempts and timed out."

Later, we tried to create separate AppDomains for each package and execute via console application, but ended up with below error (The below expressions were defined in OnError Event) :
"The result of the expression "@[User::ReportErrorFrom]" on property "FromLine" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
The result of the expression ""Error At :" + @[System:ourceName] + "" +
"Error Description : "+ @[System::ErrorDescription] + "" " on property "MessageSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property."

At last, we tried to span a separate process (System.Diagnostics.Process) for each package. this seems working but taking very long time:
A package that normally takes 2 min, is taking 60 min.

We also tried creating an SSIS Package that executes mulitple packages. But only first package is getting executed, and second one is throwing below error (Here the variable it is trying to lock is of first package):
"Failed to lock variable "UniqueInstrumentsQuery1" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".

Please help us with some work around for this. Thanking you in advance,

View 17 Replies View Related

Help! The Transaction Log Is Full Error In SSIS Execute SQL Task When I Execute A DELETE SQL Query

Dec 6, 2006

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

View 5 Replies View Related

Looking For A Way To Refer To A Package Variable Within Any Transact-SQL Code Included In Execute SQL Or Execute T-SQL Task

Apr 19, 2007

I'm looking for a way to refer to a package variable within any
Transact-SQL code included in either an Execute SQL or Execute T-SQL
task. If this can be done, I need to know the technique to use -
whether it's something similar to a parameter placeholder question
mark or something else.


FYI - I've been able to successfully execute Transact-SQL statements
within the Execute SQL task, so I don't think the Execute T-SQL task
is even necessary for this purpose.

View 5 Replies View Related

SSIS Execute Package With Execute Out Of Process = True Causes ProductLevelToLow Error

Mar 6, 2008



Hi.

I have a master package, which executes child packages that are located on a SQL Server. The Child packages execute other child packages which are also located on the SQL server.

Everything works fine when I execute in process. But when I set the parameter in the mater package ExecutePackageTask to ExecuteOutOfProcess = True, I get the following error


Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "Row Count" (5349).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Custom Split" (6399).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Data Source" (5100).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "DST_SCR Load Data" (6149).

The child packages all run fine when executed directly, and the master package runs fine if Execute Out of Process is False.

Any help would be greatly appreciated.

Thanks

Geoff.

View 7 Replies View Related

Conditional Execute By Execute SQL Task Return Value?

Jun 25, 2007

I have a SSIS package contains an "Execute SQL Task". The SQL will raise error or succeed. However, it sounds the package won't pick up the raised error?

Or is it possible to conditional run other control flow items according the the status of SQL task execution?

View 1 Replies View Related

Execute A SP In The Execute SQL Task

Jan 25, 2007

I am trying to execute a SP in the execute SQL task in SSIS 2005..

but I keep getting an error:

SSIS package "Package.dtsx" starting.
Error: 0xC002F210 at Load_Gs_Modifier_1, Execute SQL Task: Executing the query "exec Load_GS_Modifier_1 ?, ?" failed with the following error: "Could not find stored procedure 'exec Load_GS_Modifier_1 ?, ?'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Load_Gs_Modifier_1
SSIS package "Package.dtsx" finis


I have set up two user parameters: startdate and enddate.. I am not sure what I am doing wrong????

View 3 Replies View Related

Trigger Not Execute Some Data Or Insert Not Execute A Trigger For Some Data

Mar 3, 2008

I have trigger, but not execute somedata because insert few row in every second. I use java to insert data to SQL server 2005. Data inserted to a table but not executing trigger for some data.
For example 100 data every second inserted to a table.

If insert data one by one to a table trigger fires success.
Please Help me.

View 1 Replies View Related

Unable To Connect To DB

Nov 27, 2006

Hello everybody
I wrote a vb.net win app that uses a mssql 2005 express DB.
On my localcomputer everything worked without a problem.
Now I wish to deploy my app on a remote computer (that has mssql 2005 express installed), so. I added an app setup project to my project using the vs2005 setup tool, installed the app on the remote computer, and copied the mdf file to the remote computer.
I'm able to see the DB through the remote computer mssql manager, But when I try to start the app on the remote computer I get this error massage :
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. error: 0 - No process is on the other end of the pipe.)
my connectionstring (in the config file) looks like that :
    <connectionStrings>        <add name="Info_Manager.My.MySettings.MaxinetConnectionString"            connectionString="Data Source=DOTAN-XPSQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataMaxinet.mdf;Integrated Security=True;User Instance=True"            providerName="System.Data.SqlClient" />        <add name="Info_Manager.My.MySettings.MaxinetConnectionString1"            connectionString="Data Source=DOTAN-XPSQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataMaxinet.mdf;Integrated Security=True;User Instance=True"            providerName="System.Data.SqlClient" />    </connectionStrings>
by the way changing the user instance attribute to "false" didn't help.
Does anybody know how to fix this problem.
 
 

View 2 Replies View Related

Unable To Use SQL Profiler

Aug 8, 2000

I am using SQL7. On the client network utility, I am using name pipe and have 4 entries and they are in the same format (ie. server name, named pipes and ip address). I have problem to connect to some of them and getting
[microsoft][ODBC SQL Server Driver]Client unable to establish connection
and [microsoft][ODBC SQL Server Driver][Named Pipes]ConnectionOpen(CreateFile())
Any idea?

View 1 Replies View Related

Unable To Register

Jan 30, 2001

Hi,
I am trying to register one server and I get the following message -
"Client unable to establish connection Connection OpenCreatefile()"
Any advice highly appreciated.
Thanks
PD

View 1 Replies View Related

Unable To Connect

Aug 14, 1998

Howdy

Every time i reboot my NT Server and the SQL server service starts up. It logs this message to the event Viewer

Severity: 9 Error:10004, OS: 11001 Unable to connect: SQL Server is unavailable or does not exist. General network error. Check your documentation.ConnectionOpen (gethostbyname()()).

I don`t have any problem with the databases, all the users are able to connect to server and database without any problems, looks like everything is working at its best. But i am little concerned about this error message.

Please help

Thanks
vIVEk

View 1 Replies View Related

Unable To Restore To Other DB ?

Jul 22, 2004

Hi,

I have every nights a backup script that is running using the following command on my sql server 2000 :

backup database MYDB to disk="d:mssql2000MSSQLBACKUPdb_MYSERVER_MYDB.bak" with init

Now, i need to restore one of these files to a new Database with another name...in order to look at certain table and its content

I'm unable to find the correct RESTORE command and didn't find how to do it using enterprise Manager..

Any help would be VERY welcome ;-))

Florent -- Near the whole

View 6 Replies View Related

Unable To Connect

Apr 1, 2002

Everything has been working fine our SQL Server (lets call it Server A) (v2000 under NT 4), however sometime over the weekend it is unable to connect to one of our other SQL Servers (Server B).

In the Event Viewer I found this error:
SuperSocket info: Failed to get Exclusive port use(MSAFD Tcpip (TCP/IP)): Error 10013.

Everything on this server appears to be working fine, as in everything can connect to Sever A that needs to, but Server B can't connect to A, nor is it working the other way.

Also, Server A SQL Services run on port 2006, and B is on the standard 1433. Everything has been working with this up until today?

Any ideas?
Thanks!

Keith

View 1 Replies View Related

Unable To Backup All The Dbs

Apr 24, 2008

i am using sql 2005,i want to backup all the databases when i try to schedule a maintenance plan , i dont get all the databases listed event though i authenticate as SA.

View 6 Replies View Related

Unable To Complie

Jan 26, 2007

hi
i WAS ABLE TO COMPLIE this proc in the morning but droped unknowningly now iam unable to complie
all the column 'empr_id' exists when i run this speratly the select statement it works


CREATE PROCEDURE search_trans
(
@tpa_idvarchar(6),
@empr_idvarchar(18) = NULL,
@empe_keyint = NULL,
@service_start_dtedatetime= NULL,
@user_id_keyint,
@acct_type_cdevarchar(4) = NULL,
@batch_countint = 20
)
AS
BEGIN

SET NOCOUNT ON

DECLARE@total_errorstinyint,
@TXN_PROCESS_CDE_VALIDsmallint,
@DuplicateFlagint,
@user_type_cdesmallint,
@USER_TYPE_MBIsmallint,
@USER_TYPE_SYSTEMsmallint

SELECT@total_errors = 0,
@TXN_PROCESS_CDE_VALID= 1,
@DuplicateFlag=16,
@user_type_cde= dbo.udf_GetUserTypeCode(@user_id_key),
@USER_TYPE_MBI= 1,
@USER_TYPE_SYSTEM= 16,
@tpa_id = dbo.udf_IsDefaultString(@tpa_id, NULL),
@empr_id = dbo.udf_IsDefaultString(@empr_id, NULL),
@empe_key = dbo.udf_IsDefaultInt32(@empe_key, NULL),
@acct_type_cde = dbo.udf_IsDefaultString(@acct_type_cde, NULL),
@service_start_dte = dbo.udf_IsDefaultDateTime(@service_start_dte, NULL)


IF @tpa_id IS NULL
BEGIN
EXECUTE @total_errors = dbo.usp_ERR_InsertUserError @error_cde = 18015, -- TODO error code
@error_cnt = @total_errors
END

IF @total_errors > 0
BEGIN
GOTO EXITSP
END

DECLARE@TEMP_DUPLICATES TABLE
(
tpa_id VARCHAR(6) NOT NULL,
empr_id VARCHAR(18) NOT NULL,
empe_key INT NOT NULL,
service_start_dte datetime, -- TODO finish this declaration,
service_end_dte datetime,
cardholder_name VARCHAR(2000),
txn_amt_orig decimal(19,4),
approved_amt int,
denied_amt int,
merchant_name VARCHAR(50),
MTC char(4),
notes varchar(255),
txn_options smallint
)
INSERT INTO @TEMP_DUPLICATES
(
tpa_id,
empr_id,
empe_key,
service_start_dte,
service_end_dte,
cardholder_name,
txn_amt_orig,
--approved_amt
denied_amt,
merchant_name,
MTC,
notes,
is_dup
)
SELECT TOP 20 -- TODO latest entered @batch_count value duplicate records
FT.tpa_id,
FT.empr_id,
FT.empe_key,
FT.service_start_dte,
FT.service_end_dte,
(e.first_name+ ', '+ e.last_name ) AS cardholder_name, -- TODO: construct name with

firstname,lastname with joining with employee/dep tables if needed should decrypt the data
--E.first_name if cardholder_name is accessed by employee then these two column can be ignored,
--E.last_name,
FT.txn_amt_orig,
--approved_amt, -- --Need to to put condition to how to get approved amt,
FT.denied_fee, -- This column considered for denied_amt as this column doesnot exists
FT.merch_name,
FT.merch_id, -- MTC column on UI
FT.notes,
is_dup = '1'
FROM dbo.[vw_PDB_FLEX_TXN] FT (NOLOCK) INNER JOIN
dbo.[EMPLOYEE] E ON (E.[tpa_id] = FT.[tpa_id] AND E.[empr_id] = FT.[empr_id] AND E.[empe_key] =

FT.[empe_key])
inner join dbo.[TPA] T ON (E.[tpa_id] = T.[tpa_id]) INNER JOIN
dbo.[EMPLOYER] ER on (E.[tpa_id] = ER.[tpa_id] and E.[empr_id] = ER.[empr_id])
WHERE -- Duplicate records
FT.origin_cde >= 50 -- manual transactions
AND FT.txn_adjud_cde = 1 -- approved transactions
AND FT.txn_cde in ('10')
AND FT.txn_process_cde = @TXN_PROCESS_CDE_VALID -- valid
AND FT.[tpa_id] = @tpa_id
AND FT.[service_start_dte] = @service_start_dte
ANDFT.[etxn_seq_num] = 1
AND ((@acct_type_cde IS NULL) OR (@acct_type_cde IS NOT NULL AND FT.[acct_type_cde] =

@acct_type_cde))
AND (FT.txn_options & @DuplicateFlag = @DuplicateFlag)
AND FT.reimb_key is null -- not reimbused yet
-- Employer Id optional
AND ((@empr_id IS NULL) OR (@empr_id IS NOT NULL AND T.[empr_id] = @empr_id))
-- User has access to employer
AND(@user_type_cde IN (@USER_TYPE_MBI, @USER_TYPE_SYSTEM)
OR (@user_type_cde NOT IN (@USER_TYPE_MBI, @USER_TYPE_SYSTEM)
AND T.[empr_id] IN (SELECT[empr_id]
FROMdbo.[USER_EMPLOYER]
WHERE[tpa_id] = @tpa_id
ANDuser_id_key = @user_id_key)))
AND ((@empe_key IS NULL) OR (@empe_key IS NOT NULL AND FT.empe_key = @empe_key))
-- TPA is not active (All Status Except Perm Inactive)
AND T.[tpa_status_cde] < 4
-- Employer is active (All Status Except Perm Inactive)
AND ER.[empr_status_cde] < 4
ORDER BY FT.txn_dte DESC
--UNION ALL

-- join @TEMP_DUPLICATES table with dbo.[vw_PDB_FLEX_TXN]
-- to find out for each of above 20 records, possible duplicate claims
-- investigate more to make join/union/insert into -- the final goal is this SP should return all 'y' and 'n' data

EFFICIENTLY (NO CURSORS IN SP)


INSERT INTO @TEMP_DUPLICATES
(
tpa_id,
empr_id,
empe_key,
service_start_dte,
service_end_dte,
cardholder_name,
txn_amt_orig,
--approved_amt,
denied_amt,
merchant_name,
MTC,
notes,
is_dup
)
SELECT t.tpa_id,
t.empr_id,
t.empe_key,
t.service_start_dte,
t.service_end_dte,
(e.first_name+ ', '+ e.last_name ) AS cardholder_name, -- TODO: construct name with firstname,

lastname with joining with employee/dep tables
t.txn_amt_orig,
--t.approved_amt,
t.denied_fee,-- This column considered for denied_amt as this column doesnot exists
t.merch_name,
t.MTC,
t.notes ,
is_dup = '0'
FROM dbo.[vw_PDB_FLEX_TXN] T (NOLOCK) INNER JOIN @TEMP_DUPLICATES TP ON
(TP.tpa_id = T.tpa_id
AND TP.empr_id = T.empr_id
AND TP.empe_key = T.empe_key
AND TP.service_start_dte = T.service_start_dte
AND TP.[txn_amt_orig] = T.[txn_amt_orig]
)
INNER JOIN dbo.[EMPLOYEE] E ON E.empr_id = T.empr_id

WHERE (T.txn_options & @DuplicateFlag != @DuplicateFlag)
AND T.[tpa_id] = @tpa_id
AND T.[service_start_dte] = @service_start_dte
AND T.txn_cde in ('10','11','12')
ANDT.[etxn_seq_num] = 1
AND T.txn_process_cde = @TXN_PROCESS_CDE_VALID -- valid



-- NEED TO RETURN @TEMP_DUPLICATES ROWS
RETURN(0)

EXITSP:

IF @total_errors > 0
BEGIN
EXECUTE dbo.usp_ERR_GetUserErrors
END

RETURN (@total_errors)

END

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

error:
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 70
Invalid column name 'is_dup'.
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 70
Invalid column name 'empr_id'.
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 70
Invalid column name 'empr_id'.
Server: Msg 207, Level 16, State 1, Procedure usp_TXN_SearchDupFlexTxn, Line 139
Invalid column name 'is_dup'.

krmm

View 7 Replies View Related

Unable To Take Backup

Jun 19, 2007

Hi
I have Database in SQL-Server2000 size is 1.37 GB i am tryn to take backup followin are the problems:-
1. Maintainence Plan for Backup Fails for DB
2. Jobs fails for Backup

--> I goto SQL Server Logs Error message is Operating system error 23(Data error (cyclic redundancy check).)

--> Now i am tryin Backup using command :-
Backup Database 'DB1' To Disk ='Path' followin error occurs:-
"Nonrecoverable I/O error occurred on file"

--> Now i am doing back-up directly from Enterprise Manager following error message occurs same error comes

Whats surprising Jobs, maintainence plan, Backup for other database is working perfectly, i checked HDD doesnt have any bad blocks etc. i have even changed path for Backups but still only for these database it gives problem

With Regards

View 2 Replies View Related

Unable To Remove SQL

Mar 10, 2008

I'm stuck. I'm a noob when it comes to SQL (learning as I go, reading books, etc). I've been trying to setup SQL on a Windows 2003 server, and there is a bit of an issue.

There is already an instance of SQL on the server. Someone before me tried to install SQL, and for some reason removed it. However, the default instance still exists on the machine, and I am unable to install SQL 2005 on it now. Setup keeps throwing back errors. There is nothing listed in the Add/Remove programs to remove the old Default Instance. Is there some way I can completely strip SQL off this machine so I can do a fresh install?

I googled a few articles about using the SQL tools to do a forced remove, but it did not work in this situation.

View 8 Replies View Related

MS SQL 6.5 Unable To Connect.

Jul 23, 2005

Let me start by saying that, yes we know v6.5 is no longer supported byMicrosoft and that moving to SQL2000 might resolve our problem.Actually the migration to SQL2000 is 1 to 2 months out and in the QAphase now. Unfortunately we need to resolve the current 6.5 issue nowas it heavily impacts a major revenue stream for the company with everyoutage we encounter.The Problem:At least once every 24 hours the SQL Server begins disallowing new userconnections. When this happens the 2 CPUs begin to thrash. About 5minutes later the error log begins to print out the following errormessage: "Unable to connect. The maximum number of '500' configured userconnections are already connected. System Administrator can configure toa higher value with sp_configure." No new connections can be made to theserver; however, the existing connections continue to function normally.We never see anywhere near 500 user connections in the system (it tendsto average around 350 connections). If we begin to disconnect users theserver continues reporting that the maximum number of users isconnected. Eventually running queries thru an open connection will hangand we have to resort to a hard reboot of the server as neither SQLServer will not shutdown nor will the operating system.The Server:Compaq Proliant DL380 with dual 863 MHz. processors (x86 Family 6 Model8 Stepping 3 GenuineIntel), 917,020 KB of physical memory, MicrosoftWindows 2000 Server (Version 5.0.2195 Service Pack 4 Build 2195), TotalVirtual Memory 3,138,688 KB, Page File Space 2,221,668 KBSQL Server:Microsoft SQL Server 6.50 - 6.50.479 (Intel X86). Some pertinentconfiguration settings: memory - 244100 (in 2K units), user connections 500, RA worker threads 3, max worker threads 255We found one reference to the above error message in the MicrosoftKnowledge Base and that refers to a condition where the server has 2GBor more of physical memory with 1.5GB assigned to SQL Server. This doesnot pertain to our situation. Have any of you ever encountered thisproblem?I appreciate your insights.*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 12 Replies View Related

Unable To Schedule DTS

Jun 7, 2007

Unable to schedule DTS for picking up file in shared drive. It createstable but fails to copy. But if run in em it will execute fine (sqlserver 2000)

View 3 Replies View Related

Unable To Set Identity_Insert Off?

Jan 24, 2007

Hi i am unable to set Identity_insert off in sql server compact? Can you please tell me if sqlce supports or not?

If it does not support what is the work around that can be done?

Please tell the workaround in detail i mean altering table for identity key e.g. Because i have seen some posts that talk about alter table but i am unable to understand how that can done?

Thanks

View 7 Replies View Related

Unable To Configure Add-in

Feb 22, 2007

I have installed SP2 on my SQL 2005 instance which also houses RS of course. Additionally I installed WSS3.0 without configuring it so it has the Object Model installed (should be enough?)

I am running WSS 3.0 on a seperate Server and have the Add-in installed on there.

Following the installation instructions I am going to Application Management to configure WSS, but there is no section called "Reporting Services". Looking on the Report Server, in the Configuration I see the following error under the SharePoint Integration Setting:


The report server cannot access settings in the SharePoint configuration database. Most likely, the Windows SharePoint Services object model is not installed or the Report Server Web Service and Windows service accounts do not have access to SharePoint databases. To configure service account access, use SharePoint Central Administration.

In my SharePoint Site I do see a SharePoint section under the "Site Settings" for managing shared schedules but I think the main issue is, that I don't see that section in Central Administration.

Any help is greatly appreciated.

View 3 Replies View Related

Unable To Get Field Value

May 8, 2008



hi all I am using Local reports(.rdlc files).
I have created one Dataset with following Query.


SELECT COUNT(O.ORDERNO),D.DEPARTMENTNAME FROM TFMS_ORDER_REQUESTS O LEFT JOIN TFMS_DEPARTMENT_MASTER D ON D.DEPARTMENTID=O.DEPARTMENTID

GROUP BY D.DEPARTMENTNAME

I have two fields one is COUNT(O.ORDERNO) AND other one is Department name.
I have placed these two fields in Report(.rdlc file).
When i preview this report i am able to see only Departmentname fields value.
But at Count column no data is displaying.
I am getting 2 records when i execute this query in Toad.
What is the problem.
Pls help me.

View 1 Replies View Related







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