Division In A Precedence Constraint Expression Does Not Work Properly - Huh?

Dec 13, 2006

Greetings,

I have an expression in a precedence constraint that is returning false when it should return true. This is the expression that returns false:

((5500 / 9990) * 100) > 10

The following expression returns true. I did the division (5500 / 9990) myself and substituted the resulting value:

((0.55055055055055055055055055055055) * 100) > 10

Why is the first expression returning false? I'm stuck in the mud up to my axles on this and I know I'll probably feel like a fool when I learn the answer...

Thanks,

BCB

View 3 Replies


ADVERTISEMENT

Integration Services :: Send Mail Task Not Working Properly When Configured In Precedence Constraint (Failure)

Jul 29, 2015

Send Mail task not working properly when it configured in Precedence Constraint (Failure)...

Scenario:

I'm using multiple containers in my ssis package. Also I have configured mail task for capturing error.

I'm getting mail only when error occurs in foreach loop container. If error occurs in other containers it doesn't works.

Actually I would like to receive mail notification on error when it occurs in any of the containers or DFT.

View 9 Replies View Related

Precedence Constraint In SSIS Didn't Work

Aug 27, 2007

Dear all,
I've been searching the article for error handling in SSIS but seems no article have same problem exactly as mine. In my package there's container, it contains Data Flow task and some of Script tasks. I put an error precedence from Data Flow task into Script task that contains script for log an error that might be occured. The Data Flow task imports data from flat file into SQL Server 2005 and I've set a semicolon as the column delimiter. Unfortunately there is a data in flat file that had one column contain semicolon as its value.
This would trigger an error and I hope the error would be logged into a table as I wrote inside Script task. But it didn't work. The error precedence won't work, the package stop in flat file source instead. I've been trying the event handler but it didn't work either. Maybe I got wrong implementation, anybody can help me explain the error handler and solve the problem ?
Here is the capture of my package, since I didn't know how to attach the picture in this forum.
Thanks in advance.


Best regards,

Hery

View 12 Replies View Related

Precedence Constraint Being Ignored?

May 22, 2008

hi all - this is the first time i've worked with SSIS / Business Intelligence, and I'm having an issue with a piece of basic functinoality.

I'm working with some dtsx jobs which were all conversions from Sql Server 2000 DTS jobs. The conversion process "seemed" to go smoothly. I used the Migration Wizard, and it successfully converted my outputted DTS job files into DTSX files.

In the Business Intelligence design environment (Control Flow) for a specific dtsx package, I have two tasks that are linked together by a Precedence Constraint.

* Task A Truncates all data in Database B --> Table A
* the precedence constraint says that if Task A is successful, then go on to Task B (or at least i think it does)
* Task B copies the newest data from Database A --> Table A over to Database B --> Table A

Everything appears to be correct, but if i right-click Task A and perform an "Execute Task" command, Task A will run successfully, but then stops short without running Task B.

Are there any common "gotchas" or issues that I might be missing which would cause this behavior? I deleted the existing precedence constraint, and added back a new one with the same settings, but Task B still will not run.

thanks for any help on this

View 9 Replies View Related

Precedence Constraint Problem

Dec 20, 2007

I have two packages - one works, the other doesn't. Both have two tasks: an Execute SQL Task and a dependent Send Mail Task. I am using a precedence constraint where the evaluation operation is an expression evaluating a variable created by a select count(*) as variable in the query. Both variables are defined as int32, initial value of 0 with a scope for the entire package.

The expression that works tests for an error_counts > 0 condition; the one that doesn't tests for load_counts < 24. The > 0 sends mail when the error_count is greater than 0 but doesn't send mail when it is 0, which is as I intended. The less than 24 package always sends mail even though the variable resultset_singlerow is usually 24. When I look at both properties for the Execute SQL Task steps side by side, they have no differences. When I look at the properties for the constraint, the only difference is in the EvaluatesTrue, which is set to False for the one that works and True for the one that doesn't. Unfortunately, that property is grayed out (not modifiable) and doesn't seem to be an option when I edit via the Precedence Constraint Editor.

I've looked a Books Online & Google with no references to a similar situation. Does anyone have a solution? Is the EvaluatesTrue the problem? And if it is, how can I change the setting? If not, what is the problem?

Thanks in advance for any help.

View 1 Replies View Related

Precedence Constraint Problem

Dec 20, 2007

I have two packages - one works, the other doesn't. Both have two tasks: an Execute SQL Task and a dependent Send Mail Task. I am using a precedence constraint where the evaluation operation is an expression evaluating a variable created by a select count(*) as variable in the query. Both variables are defined as int32, initial value of 0 with a scope for the entire package. The expression that works tests for an error_counts > 0 condition; the one that doesn't tests for load_counts < 24. The > 0 sends mail when the error_count is greater than 0 but doesn't send mail when it is 0, which is as I intended. The less than 24 package always sends mail even though the variable resultset_singlerow is usually 24.

When I look at both properties for the Execute SQL Task steps side by side, they have no differences. When I look at the properties for the constraint, the only difference is in the EvaluatesTrue, which is set to False for the one that works and True for the one that doesn't. Unfortunately, that property is greyed out (not modifiable) and doesn't seem to be an option when I edit via the Precedence Constraint Editor.

I've looked a Books Online & Google with no references to a similar situation. Does anyone have a solution? Is the EvaluatesTrue the problem? And if it is, how can I change the setting?

Thanks in advance for any help.

View 3 Replies View Related

Workflow - Precedence Constraint

May 1, 2008



Hi,

I have 3 data flows connected sequentially on my workflow before processing dimensions and facts which checks data from different databases and if conditions does not meet then writes to log table. So if it writes to log table , I have to quit and finish the workflow.
How can I do that?


thanks,
J

View 3 Replies View Related

Precedence Constraint Expressions

Jul 30, 2007



Hi all
I've got a package that checks the length of chars in a flatfile and if it's correct it executes the dataflow task.

How can i write an expression in the precedense constraint editor to skip the dataflow task if there is an error in the script task?


Thank you

View 5 Replies View Related

Precedence Constraint Issue

Mar 5, 2008



I am struggling here with precendece constraints and variables.

I have the following scenario:







Task A





Task B





Task C





@var1!=0





@var1==0
Task A, Task B and TaskC

Task A (Execute SQL Task which assigns a value to a variable say, var1) determines if TaskB will execute i.e.

IF var1 !=0 Execute Task B and then Execute Task C

IF var1== Execute Task C

Is this possible in SSIS?

Problem:
Each time I try to do this, the package never executes Task C. It always either Executes Task A or Task A and Task B.


For example if var1 !=0 it executes Task A and Task B

but if var1 == 0 it executes only Task A.

View 5 Replies View Related

Qestion On Precedence Constraint Editor

Jan 5, 2008

I am confused with Precedence constraint editor regarding Evaluation Operation and Multiple Constraints options. In the Evaluation Operation dropdown list, there are: Expression and Constraint and Expression OR Constraint. Why it still needs LOGICAL AND and LOGICAL OR in the multiple constraints options? Is it clear that Expression and Constraint is "LOGICAL AND" and "Expression OR Constraint" is "LOGICAL OR"?

View 1 Replies View Related

SSIS - Precedence Constraint Editor

Aug 31, 2007



Dear Friends,
In my controlFlow I have 2 sequence container... Sequence1 goes to Sequence2 if an expression valuate to TRUE.
If the expression value is true, than there isn's any problem and sequence2 runs, but if the expression is FALSE the sequence2 container doesn't run.

OK?
In the case of expression valueate to FALSE I need to generate an error or an information in order to get it in the eventhandler automatic...
I can add a script task to make the package failure... but what I insert in the precedence constraint editor from Sequence1 to the scripttask?

Imagine... the expression from Sequence1 to Sequence2 is a>=b
The expression from Sequence1 to ScriotTask os a<b? (How can I define this only to run when the expression (seq1 to Seq2) is false??



Someone know how?
Regards!

View 8 Replies View Related

Problem With Precedence Expression

Aug 21, 2007

Hello,
I have a SQL Task the executes the following statement;

SELECT COUNT(SettleDate) AS CountResult
FROM SettleDateCount

I have the SQL Task Editor configured for a Single Row result set. The Result Name is CountResult, and the variable it populates is RowCountRes. RowCountRes is Int32 with EvaluateAsExpression set to False.

I have a boolean variable called RowCountStatus. It evaluates as the following expression;

@[User::RowCountRes] > 1

From the SQL Task, I have two different constraints, both of which evaluate with an expression. One constraint evaluates this way; @[User::RowCountStatus] = True
The other evaluates this way; @[User::RowCountStatus] = False

The idea is that if the count comes back from the sql statement greater than 1 then execution continues down one path, else it goes down the other path. Currently, the result comes back = 1. I expect that the 'False' path will execute, but the 'True' path executes instead.

What am I doing wrong?

Thank you for your help!

cdun2

View 5 Replies View Related

Maintenance Place Precedence Constraint Editor

Feb 28, 2007

SQL Server 2005 now provides the ability to use expressions in the plans instead of just the Failed/Success/Completed constraints.

Can anyone tell me what language is used for these expressions. Where can I find a guide on this?



Thanks


Drew

View 1 Replies View Related

How To Avoid Precedence Constraint Lines From Getting Distorted

Feb 5, 2008

Hi,

Whenever I open my package, the Precedence Constraint lines get distorted. This makes my package look messy. Is there any way to stop this from happening?

Thanks for your help!
Subha

View 1 Replies View Related

Integration Services :: Precedence Constraint For Sequence Container

May 16, 2015

I have (6) sequence containers, each with a data flow task and script task. The script task renames the file and the data flow uses an OLE DB Source connection to export to a flat file using the Flat File Destination connection.For sI have been unable to move from the 1st sequence container to the 2nd (and the next and so on...). I am trying to do this "on success" (on failure I generate an email notification within each container), but am apparently missing a piece to this because after the sequence container executes, which it does successfully, nothing happens.

View 4 Replies View Related

Enforcing Precedence Constraint While NOT Failing Package(On Failure Logic Ignored)

Aug 1, 2007

I have designed an SSIS package that :

(1) contains a for loop task (in which all the logic is contained) that loops through a particular folder for excel files
WITHIN THE FOR LOOP:
(2) pulls data from an excel file into SQL Tables(Data Transformation Task)
(3) run stored proc to validate data (Execute SQL TASK)
(4)ON SUCCESS of executing the SQL Task (Script Task - move file to success or reject folder based on value returned from sproc)
(5)ON FAILURE of executing the stored proc (Script Task - move file to bad format failure)

NOTE:
I have modified the MaximumErrorcount property of (1 FOR LOOP) and (3 EXECUTE SQL TASK) and the package itself to 0.
In order to deal with badly formatted excel files...I do not want the package to stop for every missing tab in excel file or data entry error. I simply want the badly formatted file to be moved to a special folder

PROBLEM:
on failure logic is never executed (I have 2 options after step (3)) on success do step (4) on failure do step (5)
step (3) fails...then it simply iterates to the next file
step 5 is never executed

Is this because I changed the maximumerrorcount property?
What am I doing wrong witht he Precendence Logic?

View 4 Replies View Related

SQL Server 2014 :: Overriding Data Precedence In COALESCE Expression

Aug 5, 2015

I want to return a BIT from an outer join. I want the result type to be BIT. However, the usage of ISNULL is forbidden by code standards. The first expression returns an INT. Which of the bottom expressions do you think would work best in a query?

And why would ISNULL be absolutely forbidden? I was told that Microsoft deprecated it along with TINYINT, which I'm often prevented from using even when it's the appropriate data type.

DECLARE @x BIT;
DECLARE @default BIT = 1;
DECLARE @something sql_variant;

SELECT @something = COALESCE(@x, 1);
SELECT SQL_VARIANT_PROPERTY(@something, 'BaseType');

SELECT @something = COALESCE(@x, @default);
SELECT SQL_VARIANT_PROPERTY(@something, 'BaseType');

SELECT @something = COALESCE(@x, CAST(1 AS BIT));
SELECT SQL_VARIANT_PROPERTY(@something, 'BaseType');

View 4 Replies View Related

Integration Services :: Comparing Variable Value With Flat File Column In Precedence Constraint

Aug 4, 2015

I am creating one SSIS package where my source is oracle. I have transferred the data from Oracle to flat file as per client requirement.I have to create single package for 2 country 1 is US and another is CANADA Columns are below

ZONE_ID,
ZONE_NAME
Zone Id having data like 10001,10002,10003,20001,2002,2003

Where zone_id start with 1000 is US Zone and Zone_Id start with 2000 is Canada Zone.

For US:
1. Load geography data from DB tables into flat files
2. Load geography data from flat files to Spectrum DB tables

For Canada:
1. Load geography data from DB tables into flat files
2. Load geography data from flat files to Spectrum DB tables

Now I want to look from flat file if Zone_id start with 1000 then it must go to US_DFT and if Zone_id start with 2000 then it must go to CANADA_DFT.

View 2 Replies View Related

SQL Configuration Does Not Work Properly

Jul 17, 2007

Hi,



I've my SSIS Packages, having multiple Configuration stored in SQL Server Table named [SSIS Configurations].

And it's devloped on BHUDEV Server ON Devlopmentdb Database. So durring development Default Cofigurations are set for BHUDEV Server.



Problem is that when I install my Package on SQL Server on different Server for example JOHN, and now my database is ProductionDB and [SSIS Configurations] table will be on ProductionDB database. And I've made required changes in [SSIS Configurations] table. So when I run the Package even then it picks configuration information from BHUDEV.Developmentdb.dbo.[SSIS Configurations] table. That's my problem.



But If when during execution time, I change the connection information then it works fine.



Please Help!



Bhudev

View 6 Replies View Related

Does SQL 2000 Clustering Work Properly??

Jan 11, 2004

Howdy,

Is SQL 2000 clustering on windows 2000 any good ??

We are looking at spending *quite* a bit of money to implement it, but I need opinions of what its like from the people that actually use it & look after it.

e.g.

DOES IT WORK LIKE IT SHOULD????????
Is it reliable?
Is it resource hungry?
Are there lots of bugs?

All repsonses very welcome. No response too small.

Thanks for your help.

Cheers,

SG.

View 6 Replies View Related

Group By Doesn't Work Properly

Apr 3, 2008



hi guyz i am trying to trap the duplicate records . cannot trap the below dupes any idea. i also used ltrim and rtrim it still thinking it is a duplicate but it is not. what is the best way doing it.


select count(*) , muzenbr from muzealbums_1 where muzenbr = '1000082' group by MuzeNbr, PNOTES, CNOTES, CAT3, Performer having count(*) > 1


MuzeNbr nvarchar no 14 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
PNOTES nvarchar no -1 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
CNOTES nvarchar no -1 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
CAT3 nvarchar no -1 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
Performer nvarchar no 510 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS


1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL
1000082 NULL NULL Classical NULL

View 6 Replies View Related

Does Sseutil Work Properly On Vista?

Mar 10, 2008

Does sseutil work properly on vista? I need a way to programmatically detach a user instance on Vista.
The following launches and runs ok on XP.
Doesn't run on Vista? Is there some problem with Process on Vista? sseutil runs ok from the command line in Vista.

public void DetachDatabase(string filePath)
{
ProcessStartInfo startInfo = new ProcessStartInfo("SSEUtil.exe");
startInfo.WindowStyle = ProcessWindowStyle.Normal; //.Hidden;
startInfo.Arguments = "-d "" + filePath + """;
Process detachProcess = Process.Start(startInfo);
while(!detachProcess.HasExited)
{
Thread.Sleep(1000);
}

}

View 5 Replies View Related

Does The Function SQLGetDiagRec Work Properly For Unicode

Aug 29, 2007



Hi
I am writing a application using the ODBC Calls to connect to MSSQL Database 2005 SP2.
I am using the Microsoft Visual Studio 6.0 for compilation

I have defined the UNICODE macro in the project settings.
Now when i am trying to connect to MSSQL Database using this call below

retcode = SQLConnect(dbc, (SQLTCHAR*) dsn, SQL_NTS,
(SQLTCHAR*) loginname, SQL_NTS,
(SQLTCHAR*) password, SQL_NTS);

I give a wrong username .
Then i use the function
SQLGetDiagRec to collect the error

void extract_error(char *fn,SQLHANDLE handle, SQLSMALLINT type)
{
SQLINTEGER i = 0;
SQLINTEGER native;
SQLTCHAR state[ 100 ] ;
SQLTCHAR text[256];
SQLSMALLINT len;
SQLRETURN ret;
memset(state,0,sizeof(state));
memset(text,0,sizeof(text));
fprintf(stderr,
""
"The driver reported the following diagnostics whilst running "
"%s",
fn);
do
{
ret = SQLGetDiagRec(type,
handle,
++i,
state,
&native,
text,
sizeof(text),
&len );



if (SQL_SUCCEEDED(ret))
_stprintf(_T("%s:%ld:%ld:%s"), (const TCHAR *)state, i, native, text);
_stprintf(_T("Error code %s "),(const TCHAR *)state);
}
while( ret == SQL_SUCCESS );
}



Now if i check the values of "state" and "native" i get it as 0.

If i use non unicode (i.e. remove the UNICODE macro) it works fine.

Best Regards
Manoj

View 1 Replies View Related

ProcessStartInfo.Atributes Doesn't Work Properly

Jul 23, 2007

Hello,



I'm writing a program which runs SQL express installer






Code Snippet

public bool InstalSQLExpress()

{

//creating new process for setup

Process setupProcess = new Process();

//start information for setup process

ProcessStartInfo startInfo = new ProcessStartInfo();

//filename location

startInfo.FileName = sqlExpressSetupFileLocation;



//commandline arguments ("/qb" - only basic UI during the setup, "/qn" - setup with no UI)

//startInfo.Arguments = BuildCommandLine(); // <- make it work



// startInfo.Arguments = "/qb INSTANCENAME=SQLEXPRESS ADDLOCAL=All SECURITYMODE=SQL" +

// "SQLACCOUNT=konrad SQLPASSWORD=****** " +

// "AGTACCOUNT=konrad AGTPASSWORD=******" +

// "ASACCOUNT=konrad ASPASSWORD=******" +

// "SAPWD=*****";

startInfo.Arguments = BuildCommandLine();



//we're not using system shell to process execution

startInfo.UseShellExecute = false;

//adding start info

setupProcess.StartInfo = startInfo;



setupProcess.EnableRaisingEvents = true;

setupProcess.OutputDataReceived += new DataReceivedEventHandler(setupProcess_OutputDataReceived);

setupProcess.ErrorDataReceived += new DataReceivedEventHandler(setupProcess_ErrorDataReceived);

setupProcess.Exited += new EventHandler(setupProcess_Exited);



//running the process

return (setupProcess.Start());

}

private string BuildCommandLine()

{

string strCommandLine = null;

MessageBox.Show("SQL");

if (this.sqlSecurityMode)

{

strCommandLine = "/qb";

strCommandLine += " INSTANCENAME=SQLEXPRESS";

strCommandLine += " ADDLOCAL=All";

strCommandLine += " SECURITYMODE=SQL";

strCommandLine += " SQLACCOUNT=" + sqlAccount;

strCommandLine += " SQLPASSWORD=" + sqlPassword;

strCommandLine += " AGTACCOUNT=" + sqlAccount;

strCommandLine += " AGTPASSWORD=" + sqlPassword;

strCommandLine += " ASACCOUNT=" + sqlAccount;

strCommandLine += " ASPASSWORD=" + sqlPassword;

strCommandLine += " SAPWD=" + SysadminPassword;

return strCommandLine;

}

else

{

return strCommandLine;

}

}



When I specify command with literal value it works fine but when I try to use function or variable installer prompt error message:



SQL Server Setup could not validate the service accounts. Either the service accounts have not been provided for all of the services being installed, or the specified username or password is incorrect. For each service, specify a valid username, password, and domain, or specify a built-in system account.



I don't know why it's wrong and be gracefull for help

View 2 Replies View Related

Unable To Get SQLCMD Utility To Work Properly.

Nov 27, 2006

I try to go to a command prompt to get this to run right with no luck. Is there something that I am not doing right? It gives me the help library, but thats about it. Also, I have dealt with Oracle in the past. And was wondering is there a way to access the SQLCMD utility on a workstation with a login of some kind?

--David

View 1 Replies View Related

Order By Doesn't Work Properly When There Are Null Values?

Mar 5, 2008

Hello all,The followinq qurey returns sometimes values of null to some of this columns, byK,byT,byD. the column F wil not contains any nulls, and 0 will be populated in it at any case of .Now, the problem is that when sorting out F the sort will not work when there is null parameters in byK because teh fact that a 0 values is greater then NULL value, and the sort of F will not take in considiration. So I guess the question is how can I sort NULL values and 0 values to be the same weight in the sort by command? SELECT A.gym_id as gym,s_id, week, gym_name, boxer, league, sum(points)
points,sum(byK)as byK, sum(byT) as byT,sum(byPoints) as byPoints ,
sum(byD) as byD, count(C.gym) as F
FROM A inner JOIN B ON A.gym_id = B.gym_id
left JOIN C ON A.gym_id = C.gym
WHERE (B.l_id = ?text
group by A.gym_id
order by points DESC,byK DESC,byT DESC, byPoints DESC, byD DESC,F ASC   

View 3 Replies View Related

Enabling And Disabling Tasks At Run Time Using Expressions Does Not Work Properly

Jul 28, 2007

Hi Friends
"I wonder why the boolean values Set to "Disable Property" using expressions does not work as expected (though Precedence constraints work fine). I find no way to disable individual task. "

I have a boolen variable V, (False) enabled by default at design time for a task T, I disable T based on a condition (if A ! = 'a') during runtime.

Now first time when I run the Package, Task gets disabled (works fine on the condition given). However T gets permanently disabled even after we stop debug mode, which is not the expected behavior. Further on when you run, it wont work at all.

Is it true that a task disabled at design time cannot be enabled during runtime via expressions ?

If things are working fine in your case, pls let me know what settings are required.

Thanks
Subhash Subramanyam

View 5 Replies View Related

MovePrev After MoveToBookmark In OLEDB Consumer Templates Doesn't Work Properly

Mar 3, 2008

Hello,
I tried to use bookmarks in OLEDB consumer templates and I have problems with using MoveToBookmark. This method sets cursor position correctly on bookmarked row, but it seems to me it doesn't set the right cursor position in DB. When I call MovePrev after MoveToBookmark, I will not get previous row of the bookmarked row.
Simplified Example - I get bookmark of the first row, then move to the 3th row. Call MoveToBookmark (current row is no the first row). But when I call MovePrev I'will not get DB_S_ENDOFROWSET but the second row:


MoveFirst()
bk = GetBookmark()
MoveNext()
MoveNext() // Now I'm on third row
MoveToBookmark(bk)
GetData() - Now I get data from 1st row
MovePrev()
GetData() - Now I get data from the second row!!


All calls to OLEDB returs S_OK.
Does somebody now, whats wrong?

Thanks

View 1 Replies View Related

Constraint Expression In SQL Server 2005 IDE

Mar 20, 2007

I was trying to enter a constraint expression into the dialog box. I have three fields of the data type "bit". I want to make sure that of the three, only one equals "1". Using the documentation I found in Books Online, I attempted to use the following expression, but it would not validate.

(expert == 1 && supplier == 0 && employee == 0) || (expert == 0 && supplier == 1 && employee == 0) || (expert == 0 && supplier == 0 && employee == 1)

Can someone please assist me in getting this corrected?

- - - -
- Will -
- - - -
http://www.strohlsitedesign.com
http://www.servicerank.com/

View 4 Replies View Related

Constraint Expression For Unique Keys

Jun 28, 2006

if i have a table which defines a rule as "combination of two fieldmust be unique", how can I write this in a constraint expressionsection?i started learning more about ms sql side to handle all the necessaryrules in back-end instead of front-end.also any good learning links, references, or book recommandations?thanks

View 5 Replies View Related

Problem In Expression Of A Check Constraint

Aug 15, 2006

Hi all,

I wrote the expression below in a table's check constraint

(CustomerTypeID = 0 and ContentSiteID is null and ResellerID is null and AffiliateID is null and WhiteLabeLID is null ) or

( CustomerTypeID = 1 and ContentSiteID is not null and ResellerID is null and AffiliateID is null and WhiteLabeLID is null )

It saved it ok, but when I re-opened and viewed the expression again it was converted to:

([CustomerTypeID] = 0 and [ContentSiteID] is null and [ResellerID] is null and [AffiliateID] is null and [WhiteLabeLID] is null

[CustomerTypeID] = 1 and [ContentSiteID] is not null and [ResellerID] is null and [AffiliateID] is null and [WhiteLabeLID] is null )

This is a different logic because the OR is not prioritised above the AND.

Any solution or should I move my condition to the table's Update and Insert triggers?

Thanks!

Ofer

View 5 Replies View Related

Check Constraint Does Not Work (compare With Null)

Mar 20, 2006

Hi!I have a table with a check constraint. But unfortunately it does notwork like I wanted.CREATE TABLE MAP([R_ID] [T_D_ID] NOT NULL,[R_ID1] [T_D_ID] NULL,CONSTRAINT CHECK_ID1 CHECK (R_ID1 = R_ID OR R_ID1 = NULL),CONSTRAINT [PK_MAP] PRIMARY KEY ([R_ID]))R_ID1 should always have the value of R_ID or NullThe following statements should cause errors:insert into map (R_ID, R_ID1)values(1,2);update map set R_ID1=3 where R_ID=1;But there occur no errors. Does anyone have an idea? It is an SQL Server2000.TIASusanne

View 6 Replies View Related

Group Expression Does Not Work

Dec 10, 2007

HI,

I tried to run the following query.






Code Block
WITH YesterdayCTE AS
(
SELECT type = 'Members Joined Yesterday'
, Borrowers = (select count(*)
from LoanApplication INNER JOIN
Member ON LoanApplication.MemberFK = Member.Id AND LoanApplication.Id = Member.LastLoanApplicationFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id
where (LoanApplication.SubmittedOn >= GETDATE()-1) AND (Member.CuStatus = 'Approved')
GROUP BY CreditUnion.Name )
, Depositors = (select count(*)
from CDOrder INNER JOIN
Member ON CDOrder.MemberFK = Member.Id AND CDOrder.Id = Member.LastCDOrderFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id
where (CDOrder.SubmittedOn >= GETDATE()-1) AND (Member.CuStatus = 'Approved')
GROUP BY CreditUnion.Name )

),

MonthlyCTE AS

(
SELECT type = 'Members Joined Last Month'
, Borrowers = (select count(*)
from LoanApplication INNER JOIN
Member ON LoanApplication.MemberFK = Member.Id AND LoanApplication.Id = Member.LastLoanApplicationFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id
where (LoanApplication.SubmittedOn >= GETDATE()-30) AND (Member.CuStatus = 'Approved')
GROUP BY CreditUnion.Name )

, Depositors = (select count(*)
from CDOrder INNER JOIN
Member ON CDOrder.MemberFK = Member.Id AND CDOrder.Id = Member.LastCDOrderFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id
where (CDOrder.SubmittedOn >= GETDATE()-30) AND (Member.CuStatus = 'Approved')
GROUP BY CreditUnion.Name )

),

YearlyCTE AS

(
SELECT type = 'Members Joined Last year'
, Borrowers = (select count(*)
from LoanApplication INNER JOIN
Member ON LoanApplication.MemberFK = Member.Id AND LoanApplication.Id = Member.LastLoanApplicationFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id
where (LoanApplication.SubmittedOn >= GETDATE()-360) AND (Member.CuStatus = 'Approved')
GROUP BY CreditUnion.Name )
, Depositors = (select count(*)
from CDOrder INNER JOIN
Member ON CDOrder.MemberFK = Member.Id AND CDOrder.Id = Member.LastCDOrderFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id
where (CDOrder.SubmittedOn >= GETDATE()-360) AND (Member.CuStatus = 'Approved')
GROUP BY CreditUnion.Name )


),

combinedCTE AS

(
SELECT * FROM YesterdayCTE
UNION ALL
SELECT * FROM MonthlyCTE
UNION ALL
SELECT * FROM YearlyCTE


)

SELECT *
, Members = Borrowers + Depositors
FROM combinedCTE






But I get the following error message.


An error occurred while reading data from the query result set.
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. (Microsoft Report Designer)
===================================
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. (.Net SqlClient Data Provider)

Please can anyone help me to make this work?

Thanks

View 7 Replies View Related







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