Reporting Services :: SSRS IIF One Condition Or IIF Another Condition

Jun 22, 2015

I  am trying to write an visibility function to have message shown based on two different IIF  conditions:

If behavior is to Add a customer ( if message =NAME ALREADY EXISTS, return " NAME ALREADY EXISTS",    otherwize return " NAME CREATED")If behavior is to  Delete a customer (( if message =NAME DOES NOT EXIST, return "NAME DOES NOT EXIST",    otherwize return "NAME SUCCESSFULLY DELETED")
I tried the following which doesn't work:
=IIF((UCase(First(Fields!Message.Value, "DataSetName")) = "NAME ALREADY EXISTS"), "WARNING: NAME ALREADY EXIST", "NAME  CREATED"),
IIF((UCase(First(Fields!Message.Value,  "DataSetName")) = " NAME DOES NOT EXIST"), "WARNING: NAME DOES NOT EXIST", " NAME DELETED")

View 6 Replies


ADVERTISEMENT

Reporting Services :: In SSRS Report IIF Condition With Value 0 Was Displaying As Error

Sep 22, 2015

I am having 3 columns like A,B,C. In the C column I am having calculations like 

=CInt(IIf(B=0,100,((A-B)/B)*100))

After this calculation if the column B is 0(zero) corresponding C column get display as "#Error",  if B is not having 0 every thing is working fine.

In the calculation if I remove the " /B" it is working fine. So, how to display the value 100 in C if B=0.

View 5 Replies View Related

Reporting Services :: Using Exists Condition In WHERE Clause While Passing Values From SSRS Parameter

Sep 10, 2015

Table : incident
----------------
incident_id usr_id item_id Inc_Date
10059926 191 61006 8-22-2015
10054444 222 3232 6-7-2015

Table: act_reg
--------------
act_reg_id act_type_id incident_id usr_id act_type_sc
454244 1 10059926 191 ASSIGN
471938 115 10059926 191 TRAVEL TIME
473379 40 10059926 191 FOLLOW UP
477652 115 10059926 191 TRAVEL TIME
489091 504 10059926 191 ADD_ATTCHMNTS
477653 504 10054444 222 ADD_ATTCHMNTSParameter: @attach (value=1, Label=Yes & Value=0, Label=No)

Result (While I am selecting 'Yes' in dropdown)
----------------------------------------------
incident_id usr_id item_id
10059926 191 61006
10054444 222 3232

SELECT incident.incident_id,incident.usr_id,incident.item_id
FROM incident
where exists (How i can write query here to check the act_type_sc=ADD_ATTCHMNTS is exists)

View 7 Replies View Related

Reporting Services :: Sum Values Based On IIF Condition

Oct 9, 2015

I am using SQL server 2012 and Report builder 3.0 to build my report. I have build a  report which product the following table

What I try to achieve is to add 2 calculated field at the bottom of the table which will represent 2 Total value based on a condition

OutTotal field should show the SUM of the Quantity only for ItemStatus=0
InTotal field should show the SUM of the Quantity only for ItemStatus=1

IMPORTANT : I cannot group my data because I need to shown them in a time Wise flow

I have try to insert the first field and define an expression but it gives an #Error. The expression I used is as below

=SUM(IIF(Fields!ItemStatus.Value = 0, Fields!ItemQuantity.Value*Fields!ItemUnitWeight.Value,0))
 
The Quantity filed in my table is calculated from expression Fields!ItemQuantity.Value*Fields!ItemUnitWeight.Value

View 2 Replies View Related

Reporting Services :: Use IIF IsNothing Expression And Check Another Condition?

Jul 29, 2015

Is it possible to use a IIF IsNothing expression and check another condition? For all the values that are blank, I want it to check another column if  "Disposition" = 2 then I want to show "Inactive"

=iif(isnothing(Fields!Value)," ","MS " & Fields!Value)

View 3 Replies View Related

Reporting Services :: Find Items With Type Name Search Condition

May 17, 2012

The following 

SearchCondition[] sc = {new SearchCondition() {                                               
Name = "TypeName"
,Values = new string[] {"Report"}         
,Condition = ConditionEnum.Equals
,ConditionSpecified = true
}};
catalogItems = ReportService2010.FindItems("/"
,BooleanOperatorEnum.And
,new Property[] {new Property(){Name = "Recursive",Value="True"}}
,sc
);

Returns the following error

System.Web.Services.Protocols.SoapException: The TypeName field has a value that is not valid. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidElementException: The TypeName field has a value that is not valid.
at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.FindItems(String Folder, BooleanOperatorEnum BooleanOperator, Property[] SearchOptions, SearchCondition[] SearchConditions, CatalogItem[]& Items)
   at Microsoft.ReportingServices.WebServer.ReportingService2010.FindItems(String Folder, BooleanOperatorEnum BooleanOperator, Property[] SearchOptions, SearchCondition[] SearchConditions, CatalogItem[]& Items)

The type appears to be correct. I've tried type of "Folder" and receive the same error.

View 5 Replies View Related

Reporting Services :: How To Create Multi-valued Parameter For Only One Specific Condition

Jul 21, 2015

I have report where i should create a report which is multivalued parametr report,but here my condition is i want to see only one county name  in my output that is Ex: Asia Specific (CountryName),I dnt want to see the other Country names,So how should we create for this condition .

View 5 Replies View Related

Reporting Services :: Connection Failure / Timeout Or Low Disk Condition Within Database

Dec 3, 2010

I have started getting this error since a week now when I try to schedule a report or change a schedule of a report. An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. (rsReportServerDatabaseError) Get Online support For more information about this error navigate to the report server on the local server machine, or enable remote errors..

We have SQL Server 2008 installed along with SSRS running on the server. I have never seen this happening before for almost a year now but suddenly it appeared.  Along with this, report subscription is also messed up and some report are not been emailed as they have a error like..Failure sending mail: An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.Mail will not be resent. 

View 19 Replies View Related

Can I Print The Results Of A Condition Based On The Condition?

Feb 9, 2006

For example..

select * from mytable where MyNum = 7

If this brings back more than 1 row, I want to display a message that says,

Print 'There is more than one row returned'

Else (If only 1 row returned), I don't want to print anything.

Can I do this? Thx!

View 1 Replies View Related

COndition Spli - Error Date Condition

Apr 19, 2007

Dear friends,

I'm having a problem... maybe it's very simple, but with soo many work, right now I can't think well...



I need to filter rows in a dataflow...

I created a condition spli to that... maybe there is a better solution...

And the condition is: Datex != NULL(DT_DATE)

(Some DATE != NULL)





[Eliminar Datex NULL [17090]] Error: The expression "Datex != NULL(DT_DATE)" on "output "Case 1" (17123)" evaluated to NULL, but the "component "Eliminar Datex NULL" (17090)" requires a Boolean results. Modify the error row disposition on the output to treat this result as False (Ignore Failure) or to redirect this row to the error output (Redirect Row). The expression results must be Boolean for a Conditional Split. A NULL expression result is an error.



What is wrong??

Regards,

Pedro

View 4 Replies View Related

Transact SQL :: How To Add Condition In Where Clause According To Another Condition

Oct 17, 2015

I write a query to get some data as the following. but i need when a user check specified condition a query parameter change to specified condition :

create proc proc_ReservationDetails
(
@status nvarchar(50) = null
)
as
begin
select reservationId, reservationStatus, reservationDesc

[Code] .....

View 3 Replies View Related

SSRS 2005 - Not Equal Condition

Feb 28, 2008



I have created and deployed a report model by using BI development Studio. When trying to build a tabular report with Report Buider I have to use the "not equal" condition as a filter. The query does not give the expected results.

let's suppose the values for a filed I want to filter on are: 1,2,3,4,5

If i run the filter as: field NotEqual to 6 then the results are not correct


But if instead of using the NotEqual condition I use
field equals to 1
or
field equals to 2
or
field equals to 3
or
field equals to 4
or
field equals to 5




Then it gives the correct results. Ok I now it sounds weird but anyone with similar experience using ther NotEqual condition in a filter?

Thanks,

Alberto

View 1 Replies View Related

Integration Services :: If Condition In SSIS

Apr 30, 2015

How to achieve the below condition in ssis

if person_id  is like '123%' or '124%'
then details='xyz'
else details='yxz'

View 7 Replies View Related

Integration Services :: Setting A Condition Inside For Each Container

May 15, 2015

I am having a sql query task to fetch a maximun number. Example output : 102. After that I have a for each container to return files from a particular location. Files in the location are for example KAS.JN.101, KAS.JN:102, KAS.JN.103, KAS.JN.104. I want to lpop over only the files which have the ending greater than the maximum number returned from the sql query. In this case, the for each container must only loop over 103, 104. Chow to pass this condition to the container ?

View 6 Replies View Related

Integration Services :: Creating SSIS Packages With Condition Split

May 18, 2015

i am creating ssis packages  with condition split . condition is SUBSTRING(EnglishProductName,1,1) == "A".  pacakge is successfully  executived  but data is not  move to condition split  transformer to  oldeb destinations. it not showing any error.

View 3 Replies View Related

Integration Services :: Inserting Data Into Tables From Text File By Having Certain Condition

Nov 8, 2015

I have a text file which has rows 7 rows.I want to insert the data into SQL table using ssis In text file we have a  column which has values as Y or N...I wanted to take only those rows which are Y...But we have only 6 rows in SQL table.It does not have the column with Y or N.

View 2 Replies View Related

An Easy Way To Reference The Nth Row From A Table Meeting A Condition X, And The Mth Row From The Same Table Meeting Condition Y

May 10, 2006

Hi

I am developing a scientific application (demographic forecasting) and have a situation where I need to update a variety of rows, say the ith, jth and kth row that meets a particular condition, say, x.

I also need to adjust rows, say mth and nth that meet condition , say y.

My current solution is laborious and has to be coded for each condition and has been set up below (If you select this entire piece of code it will create 2 databases, each with a table initialised to change the 2nd,4th,8th and 16th rows, with the first database ignoring the condition and with the second applying the change only to rows with 'type1=1' as the condition.)

This is an adequate solution, but if I want to change the second row meeting a second condition, say 'type1=2', I would need to have another WITH...SELECT...INNER JOIN...UPDATE and I'm sure this would be inefficient.

Would there possibly be a way to introduce a rank by type into the table, something like this added column which increments for each type:







ID
Int1
Type1
Ideal Rank by Type

1
1
1
1

2
1
1
2

3
2
1
3

4
3
1
4

5
5
1
5

6
8
2
1

7
13
1
6

8
21
1
7

9
34
1
8

10
55
2
2

11
89
1
9

12
144
1
10

13
233
1
11

14
377
1
12

15
610
1
13

16
987
2
3

17
1597
1
14

18
2584
1
15

19
4181
1
16

20
6765
1
17

The solution would then be a simple update based on an innerjoin reflecting the condition and rank by type...

I hope this posting is clear, albeit long.

Thanks in advance

Greg

PS The code:

USE

master

GO

CREATE DATABASE CertainRowsToChange

GO

USE CertainRowsToChange

GO

CREATE TABLE InitialisedValues

(

InitialisedValuesID int identity(1 ,1) NOT NULL PRIMARY KEY,

Int1 int NOT NULL

)

GO

CREATE PROCEDURE Initialise

AS

BEGIN

INSERT INTO InitialisedValues (Int1 )

SELECT 2

INSERT INTO InitialisedValues (Int1 )

SELECT 4

INSERT INTO InitialisedValues (Int1 )

SELECT 8

INSERT INTO InitialisedValues (Int1 )

SELECT 16

END

GO

EXEC Initialise

/*=======================================================*/

CREATE TABLE AllRows

(

AllRowsID int identity(1 ,1) NOT NULL PRIMARY KEY,

Int1 int NOT NULL

)

GO

CREATE TABLE RowsToChange

(

RowsToChangeID int identity(1 ,1) NOT NULL PRIMARY KEY,

Int1 int NOT NULL

)

GO

CREATE PROCEDURE InitialiseRowsToChange

AS

BEGIN

INSERT INTO RowsToChange (Int1 )

SELECT 2

INSERT INTO RowsToChange (Int1 )

SELECT 4

INSERT INTO RowsToChange (Int1 )

SELECT 8

INSERT INTO RowsToChange (Int1 )

SELECT 16

END

GO

EXEC InitialiseRowsToChange

GO

CREATE PROCEDURE PopulateAllRows

AS

BEGIN

INSERT INTO AllRows (Int1 )

SELECT 1

INSERT INTO AllRows (Int1 )

SELECT 1

INSERT INTO AllRows (Int1 )

SELECT 2

INSERT INTO AllRows (Int1 )

SELECT 3

INSERT INTO AllRows (Int1 )

SELECT 5

INSERT INTO AllRows (Int1 )

SELECT 8

INSERT INTO AllRows (Int1 )

SELECT 13

INSERT INTO AllRows (Int1 )

SELECT 21

INSERT INTO AllRows (Int1 )

SELECT 34

INSERT INTO AllRows (Int1 )

SELECT 55

INSERT INTO AllRows (Int1 )

SELECT 89

INSERT INTO AllRows (Int1 )

SELECT 144

INSERT INTO AllRows (Int1 )

SELECT 233

INSERT INTO AllRows (Int1 )

SELECT 377

INSERT INTO AllRows (Int1 )

SELECT 610

INSERT INTO AllRows (Int1 )

SELECT 987

INSERT INTO AllRows (Int1 )

SELECT 1597

INSERT INTO AllRows (Int1 )

SELECT 2584

INSERT INTO AllRows (Int1 )

SELECT 4181

INSERT INTO AllRows (Int1 )

SELECT 6765

END

GO

EXEC PopulateAllRows

GO

SELECT * FROM AllRows

GO

WITH Temp(OrigID)

AS

(

SELECT OrigID FROM

(SELECT Row_Number() OVER (ORDER BY AllRowsID Asc ) AS RowScore, AllRowsID AS OrigID, Int1 AS OrigValue FROM Allrows) AS FromTable

INNER JOIN

RowsToChange AS ToTable

ON FromTable.RowScore = ToTable.Int1

)

UPDATE AllRows

SET Int1=1000

FROM

Temp as InTable

JOIN Allrows as OutTable

ON Intable.OrigID = OutTable.AllRowsID

GO

SELECT * FROM AllRows

GO

USE

master

GO

CREATE DATABASE ComplexCertainRowsToChange

GO

USE ComplexCertainRowsToChange

GO

CREATE TABLE InitialisedValues

(

InitialisedValuesID int identity(1 ,1) NOT NULL PRIMARY KEY,

Int1 int NOT NULL

)

GO

CREATE PROCEDURE Initialise

AS

BEGIN

INSERT INTO InitialisedValues (Int1 )

SELECT 2

INSERT INTO InitialisedValues (Int1 )

SELECT 4

INSERT INTO InitialisedValues (Int1 )

SELECT 8

INSERT INTO InitialisedValues (Int1 )

SELECT 16

END

GO

EXEC Initialise

/*=======================================================*/

CREATE TABLE AllRows

(

AllRowsID int identity(1 ,1) NOT NULL PRIMARY KEY,

Int1 int NOT NULL,

Type1 int NOT NULL

)

GO

CREATE TABLE RowsToChange

(

RowsToChangeID int identity(1 ,1) NOT NULL PRIMARY KEY,

Int1 int NOT NULL,

Type1 int NOT NULL

)

GO

CREATE PROCEDURE InitialiseRowsToChange

AS

BEGIN

INSERT INTO RowsToChange (Int1,Type1 )

SELECT 2, 1

INSERT INTO RowsToChange (Int1,Type1 )

SELECT 4, 1

INSERT INTO RowsToChange (Int1,Type1 )

SELECT 8, 1

INSERT INTO RowsToChange (Int1,Type1 )

SELECT 16, 1

END

GO

EXEC InitialiseRowsToChange

GO

CREATE PROCEDURE PopulateAllRows

AS

BEGIN

INSERT INTO AllRows (Int1, Type1 )

SELECT 1, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 1, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 2, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 3, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 5, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 8, 2

INSERT INTO AllRows (Int1, Type1 )

SELECT 13, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 21, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 34, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 55, 2

INSERT INTO AllRows (Int1, Type1 )

SELECT 89, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 144, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 233, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 377, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 610, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 987, 2

INSERT INTO AllRows (Int1, Type1 )

SELECT 1597, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 2584, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 4181, 1

INSERT INTO AllRows (Int1, Type1 )

SELECT 6765, 1

END

GO

EXEC PopulateAllRows

GO

SELECT * FROM AllRows

GO

WITH Temp(OrigID)

AS

(

SELECT OrigID FROM

(SELECT Row_Number() OVER (ORDER BY AllRowsID Asc ) AS RowScore, AllRowsID AS OrigID, Int1 AS OrigValue FROM Allrows WHERE Type1=1) AS FromTable

INNER JOIN

RowsToChange AS ToTable

ON FromTable.RowScore = ToTable.Int1

)

UPDATE AllRows

SET Int1=1000

FROM

Temp as InTable

JOIN Allrows as OutTable

ON Intable.OrigID = OutTable.AllRowsID

GO

SELECT * FROM AllRows

GO

View 3 Replies View Related

Reporting Services :: Interface Code Compatibility Between Custom Delivery Extension Of SSRS 2008R2 And SSRS 2012?

Sep 3, 2015

Currently we are using Custom Delivery Extension for SSRS 2008R2 We are planning to move it SSRS2012

My Question is: Whether we can use the same Code used for SSRS2008R2 to SSRS2012?

if not what code changes we should do?

View 3 Replies View Related

Reporting Services :: Get Report Toolbar Using SOAP API In SSRS Reporting?

Nov 3, 2015

Is there any way to get the report toolbar using SOAP Api  in SSRS reporting.

View 6 Replies View Related

Reporting Services :: Real Time Reporting In SSRS?

Jun 19, 2015

We've got a requirement to build the real time report. user can browse report at any point of time and need to see the latest data(stock market) in the report.

I've few options down...

1. Directly point to OLTP database as source and write stored procedure to show result set.

2. Replicate the database and write the SP's to reports. To avoid pointing directly to OLTP db.

3. To build the datawarehouse with dim & facts to show it in reports. I prefer this as a standard method, but this would have some latency depending on trasaction load which will differ from the requirement.

View 3 Replies View Related

Where Condition

May 5, 2007

 da = New Data.SqlClient.SqlDataAdapter("SELECT [Products].[Names], Count([ProductList].[Products]) AS [Total]  FROM [Products]     LEFT JOIN [ProductList]     ON [ProductList].[Names] = [Products].[Names]       GROUP BY [Products].[Names] ", strConnection)
can we use a where condition in the statement.If so how can we use it.

View 10 Replies View Related

Condition (if / Else) In SQL?

Aug 4, 2007

Hi all,I'm building a DataSet on Visual Studio and don't know how to do a condition (if/else) with SQL... I have a search form, with a DropDownList and have 2 options in it: Search by Title or Search by Author. If the "Title" is selected, then the value is "title and if "Author" is selected, then the value is "author".Here is what I have right now for the DataSet, as seperated queries but I think I can combine them to be one single query 1.This will returns the songs that matches the title:SELECT     LYRICS_PK, LYRICS_TITLE, LYRICS_TITLE2, LYRICS_WRITER, LYRICS_WRITER2, LYRICS_COWRITER, LYRICS_DATE_ADDED, UserId_FK,                       LYRICS_APPROVED, LYRICS_TYPE, LYRICS_VIEWS, LYRICS_ADDED_BYFROM         t_lyricsWHERE ((@LYRICS_TITLE IS NULL) OR (LYRICS_TITLE LIKE '%' + @LYRICS_TITLE + '%') OR (LYRICS_TITLE2 LIKE '%' + @LYRICS_TITLE + '%')) AND (@LYRICS_TYPE = 'title') 2. This returns the songs that matches the author: SELECT     LYRICS_PK, LYRICS_TITLE, LYRICS_TITLE2, LYRICS_WRITER,
LYRICS_WRITER2, LYRICS_COWRITER, LYRICS_DATE_ADDED, UserId_FK,
                      LYRICS_APPROVED, LYRICS_TYPE, LYRICS_VIEWS, LYRICS_ADDED_BY
FROM         t_lyrics

WHERE ((@LYRICS_AUTHOR IS NULL) OR (LYRICS_AUTHOR LIKE '%' +
@LYRICS_AUTHOR + '%') OR (LYRICS_AUTHOR2 LIKE '%' + @LYRICS_AUTHOR + '%'))
AND (@LYRICS_TYPE = 'author') This is very inefficient because I have 2 queries, and I need to build 2 ObjectDataSources as well as 2 different GridViews to display the results. I think we can do something likeSELECT .... ... FROM t_lyricsif (@LYRICS_TYPE = 'title')     DO THE WHERE CLAUSE THAT RETURNS MATCHES WITH TITLEelse if (@LYRICS_TYPE = 'author')    DO THE WHERE CLAUSE THAT RETURNS MATCHES WITH AUTHOR But I don't know how to write that in T-SQL.Any help would be greatly appreciated,Thank you very much,Kenny. 

View 4 Replies View Related

Where Condition

Sep 13, 2004

hi

i want to give .text filed of a TextBox to where condition but the result is not correct.

The SQL is like following:

selStr = "SELECT COUNT(*) FROM Users WHERE (Name = usernameTextBox.Text) and (Password = passwdTextBox.Text)"

View 2 Replies View Related

Using Max With Where Condition?

Jun 15, 2012

i have a table like this

ID DATE time status

01 11/11/2011 10.23 Entry
02 11/11/2011 11 .47 Exit
03 11/11/2011 12.54 Entry
04 11/11/2011 2.54 Exit

i want to select the minimum time from entry and maximum time in exit.

the status should be checked when taking the max and min values .

how to do this.

View 1 Replies View Related

CONDITION

Apr 25, 2007

Hi,I want to write a SQL stmt.(condition) that checks the following @ActionPLanID > 0 and ActionPlanID exists in table A simultaneously?

I was thinking of using IF NOT exists but don't know how to write it. Am I going in the right direction?

Thanks,
VBJP

View 2 Replies View Related

And / Or Condition

Sep 28, 2007

hi,

i'm working on a query and have discovered something fairly simple regarding "and" / "or" condition.

if I use e.g.

id_product in ('1111','2222')

as a result i should get all products that match id = 1111 and id = 2222.

But if I do it like

id_product in ('1111')
and id_product in ('2222')

as a result i get 0 rows returned, where as i want to find invoices that have both products, and not those which have either product 1111 or 2222 or even both :)

thank you for any suggestions!

View 9 Replies View Related

No/any Condition

Nov 5, 2007

I have a query something like

select a, b, c from mytable where a=@prmA

If prmA is something like generic all, any, I want this query return value without condition. Is there a way to do this with sql or I should write stored procedure that checks @prmA and all other condition parameters and generate new SQL statement?


Regards,
Hakan

View 7 Replies View Related

Only NOT Condition In CONTAINS

Mar 11, 2008



Hi All,

I have stored Candidates Resume in binary(Image) format in database.
I have a search feature to search resume.
For Example:

with all these words: ASP.Net, SQL Server, 2 Years
without these words: Java

Here I get Candidate which CONTAINS("ASP.Net" AND "SQL Server" AND "2 Years" AND NOT "Java")

Now I want to search candidates only
without these words: Java

it means the condition is CONTAINS(NOT Java)

is this possible?
if yes, how?

Thanks in advance.



View 1 Replies View Related

WHERE Condition

Dec 20, 2007

Hi,

In following query, I use three conditions in WHERE caluse. When I use only CreditUnion.Id=@CreditUnionID
Then I get the right value set. But when I join other two conditions , i get all the values instead of relevant data for that parameter.

Can anyone say why it happenes?




Code Block
SELECT
Member.LastName + ' ' + Member.FirstName AS MemberName, CASE WHEN CuStatus = 'Existing' THEN 'Existing' ELSE 'New' END AS MemberType, EnumCUMembershipStatus.UIText AS Status, CDOrder.DecidedOnCU, SysUserLogon.LastName + ' ' + SysUserLogon.FirstName AS CUDecisionOfficer, 'CD' AS ProductType, CreditUnion.Name

FROM
Member INNER JOIN
CDOrder ON Member.LastCDOrderFK = CDOrder.Id AND Member.Id = CDOrder.MemberFK INNER JOIN
CreditUnion ON Member.CreditUnionFK = CreditUnion.Id INNER JOIN
EnumCUMembershipStatus ON Member.CuStatus = EnumCUMembershipStatus.Name INNER JOIN
SysUserLogon ON CreditUnion.Id = SysUserLogon.CreditUnionFK

WHERE (CreditUnion.Id = @CreditUnionID) AND (Member.CuStatus = 'Approved') OR (Member.CuStatus = 'Declined')

UNION

SELECT
Member_1.LastName + ' ' + Member_1.FirstName AS MemberName,
CASE WHEN CuStatus = 'Existing' THEN 'Existing' ELSE 'New' END AS MemberType, EnumCUMembershipStatus_1.UIText AS Status, LoanApplication.DecidedOnCU, SysUserLogon_1.LastName + ' ' + SysUserLogon_1.FirstName AS CUDecisionOfficer, 'Loan' AS ProductType,
CreditUnion_1.Name

FROM
Member AS Member_1 INNER JOIN
LoanApplication ON Member_1.LastLoanApplicationFK = LoanApplication.Id AND Member_1.Id = LoanApplication.MemberFK LEFT OUTER JOIN CreditUnion AS CreditUnion_1 ON Member_1.CreditUnionFK = CreditUnion_1.Id LEFT OUTER JOIN EnumCUMembershipStatus AS EnumCUMembershipStatus_1 ON Member_1.CuStatus = EnumCUMembershipStatus_1.Name LEFT OUTER JOIN SysUserLogon AS SysUserLogon_1 ON LoanApplication.SysUserLogonFK = SysUserLogon_1.Id AND LoanApplication.SysUserLogonCUFK = SysUserLogon_1.Id AND CreditUnion_1.Id = SysUserLogon_1.CreditUnionFK

WHERE (CreditUnion_1.Id = @CreditUnionID) AND
Member_1.CuStatus = 'Approved' OR Member_1.CuStatus = 'Declined'


View 4 Replies View Related

Reporting Services :: SSRS 2008 R2 - HTTP Error 503 - The Services Is Unavailable

Jul 23, 2010

We built our prod server [vm] with SQL Server 2008 R2 on Server 2008 R2.  It works nicely.  Then we made a copy of the VM and renamed it (so our test environment would be IDENTICAL to production).  After that, SSRS was broken: I get "HTTP Error 503. The service is unavailable."  I can't connect via http, or SSMS.

We have tried:

* Running SSRS config tool (several times)

* Running with/without the IIS Server Role

* Dropping & recreating the SSRS keys

* Recreating the ReportServer database, etc

* Checking all of the accounts, permissions, etc

* Running SQL Repair

* Going through the registry to fix any references to the machine's old name

* Uninstalling, reinstalling SSRS

* Completely uninstalling ALL of the parts of SQL Server 2008 R2, deleting all directories, removing references to SQL Server from the registry, rebooting, reinstalling everything.

None of this has worked.  SSRS [R2] is still 503 on our test box.

the SSRS [NT] service seems to run, without error.  The Event Viewer doesn't seem to be recording any errors.  The SSRS logs say that the default URL is wrong, but we get the same error in Prod, and Prod works fine.  The other SQL Logs say something about not being able to contact the service.  However, as I said, the [NT] service seems to be working fine.

View 4 Replies View Related

IN CONDITION QUESTION

Aug 11, 2006

I am an ASP.NET Developer I am using two SQL Server databases, 2005 and sql express.I am using a select statement on an IN CONDITION
One table, Table name = SOP10100 resides in a SQL Server 2005 DatabaseThe other table,  Table name = ORDER resides on a SQL server express Database
I am writing the following sql statement
SELECT ORDERNO, CARRIER FROM SOP10100WHERE ORDERNO IN ('ORD000234','ORD000384',....)
My question is how many values can I fit on this IN conditionI mean the maximum number of values (upperlimit)
Is there a better way to do this Using ASP.NET ?

View 3 Replies View Related

Search Condition

Feb 18, 2008

Hi This is madhavi
am working with a project with ASP.NET Using VB.NET..
i have requirement that i have to provide the result based on search condition....
First : For Serach i have to search based on given CITY and CATEGORY....
 
      For this i have written a StoredProcedure like:
******************************************************************************************************************
         Create PROCEDURE YellowPages_Search(@city nvarchar(50),@SearchWord nvarchar(200),@Name varchar(50) OUTPUT,@CompanyName varchar(50) OUTPUT,@Address varchar(1000) OUTPUT,@PhoneNo varchar(50) OUTPUT,@MobileNo varchar(50) OUTPUT,@Fax varchar(50) OUTPUT,@Email varchar(50) OUTPUT,@WebSite varchar(50) OUTPUT)AS
declare @sql nvarchar(1000)set @sql='select * from YellowPages_Userdetails where city='''+@city + '''and (category like ''%' + @SearchWord + '%'' or subcategory  like ''%' + @SearchWord + '%'') '
exec(@sql)
GO
*************************************************************************************************************************************************************************
Now  i want to extend this search condition for LOCATION and SUBCATEGORY
 means my search condition should include CITY , LOCATION , CATEGORY and SUBCATEGORY
(here the location and subcategory may be given or may not be given)
so please help me out
Thanks in Advance,
Madhavi
 

View 3 Replies View Related

Exclude Condition

Jul 26, 2005

i have two tables: "Person" and "Year". "Person" can have many "Year"
(one to many relation). i want a query which returns all the records
from "Person" where "Year" is 2005 but exclude if there is any "Year"
with 2004. how can i write that query? any help will be appreciated.
i did try
<code>
SELECT * FROM Person JOIN Year ON Person.Id = Year.PersonID WHERE Year.Year = 2005 AND Year.Year <> 2004
</code>
but it doesn't seem to work. i want this query to return records from
Person where there is no any year with 2004 but only 2005. If a person
has both 2004 and 2005 exclude that person.

View 1 Replies View Related







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