Multi Value Values In Varchar Field, To Show Each Value Separately In A View

Jul 20, 2005

Hi there

Got a interesting problem (depends on a point of view.....).

Background :-
Agent (within Domino) is run daily basis which extracts data from
Domino Notes application to SQL Server 2000 database. Agent first
removes ALL contents and then appends ALL data.

Reporting Tool is SQL Reporting Services (very cool !!).

Problem :-
Within Domino Notes, it can have a field which is mult-value field
i.e. contain multi values
e.g.

(from Helpdesk application)

!HowTo!!Access Email;
!HowTo!!Access the Web;
etc..

Need to create a view, then use sql to create stored proc, to be used
as the dataset for report within SQL Reporting services.

Format. (using above as data as example)

!HowTo!!Access Email; (1 row) WWL/SDR/04023/010 (
DocID)

!HowTo!!Access the Web; (2 row) WWL/SDR/04023/010 (
DocID)

I have a unique KEY within table called DocID. The report will have 8
separate datasets (i.e. using subreports), all linked back to Unique
Key. That's easy.

The dataset causing me hassle is the 1 above. How do u split out
values as separate rows ?

Name of field called --> "ImpFunctionsImpacted".

Also, notes expert, who's working on the agent, tell's me the data can
be split either as a comma or semi-colon.

Any suggestions most welcome.

View 2 Replies


ADVERTISEMENT

Dropdown - Multi-select Won't Show Values If Only One Item Is Available

Dec 13, 2006

I have a report that has 2 dropdowns, selecting from the first dropdown populates the second one. This works fine in the BI Studio.

When I deploy this report to the 'Report Manager' and make a selection from the first dropdown, the second dropdown loads (as expected). I tried to select from the second dropdown (which has only 1 item - which is correct), the dropdown does not appear correctly - as in, I can't see that item.

Since we can't attach anything here, below is the link to a screenshot of my issue:
http://docs.google.com/View?docid=ddd6j2xn_52c5qd5

If you look closely at the screenshot from the link above, you'll see that there is a value in the second dropdown - it just won't show completely - as if the dropdown is not rendering correctly. I can view source on the page and see that the dropdown has a value.

What appears to be happening is the if only 1 item is in the second dropdown and that item is longer than the size of the dropdown, the dropdown won't render.

Here is my value for the second dropdown '012 Candy Gadler David Thapero'. This is the only value in the second dropdown. - You can try 35 chars or more in the dropdown to confirm.

Notes:
+ No special chars are in either dropdown
+ I am using IE 7 (Also had someone test this on IE 6 - same problem)
+ Using Visual Studio 2005 to build report - where this works fine

Work around:
+ If I add another item to the dropdown via a UNION query, I see the original value + the new item in the dropdown #2


Please share your thoughts
Thanks,
h.


 

View 9 Replies View Related

Show 0 Values If The Field Is NULL

Apr 22, 2008



Hi All,

I want to show 0, if the field contains NULL values.
I use the following expression.


=IIf(Fields!MTD_TotGrossBKCOAmt.Value = "NULL" , SUM(Fields!MTD_TotGrossBKCOAmt.Value), 0 )


But this works if the field contains only NULL values.
If it has a value, then it shows as #Error

Can anyone tell me how to make this work?

Thanks

View 7 Replies View Related

How To Check Numeric Values In A Varchar Field

Feb 11, 2003

Hi all,

I have a field defined as varchar(8) but this field should not contain any letters, needs to be only numbers. How can I validate the data if it contains only numbers? Any ideas?

Thanks,
Jannat.

View 5 Replies View Related

T-SQL (SS2K8) :: Using Not Like To Filter Out Non-numeric Values From Varchar Field

Mar 26, 2014

I am putting a SELECT statement together where I need to evaluate a results field, to determine how the color indicator will show on a SSRS report. I am running into a problem when I try to filter out any non-numeric values from a varchar field, using a nested CASE statement.

For example, this results field may contain values of '<1', '>=1', '1', '100', '500', '5000', etc. For one type of test, I need a value of 500 or less to be shown as a green indicator in a report, and any value over that would be flagged as a red. Another test might only allow a value of 10 or less before being flagged with a red.

This is why I setup a CASE statement for an IndicatorValue that will pass over to the report to determine the indicator color. Using CASE statements for this is easier to work with, and less taxing on the report server, if done in SQL Server instead of nested SSRS expressions, especially since a variety of tests have different result values that would be flagged as green or red.

I have a separate nested CASE statement that will handle any of the values that contain ">" or "<", so I am using the following to filter those out, and then convert it to an int value, to determine what the indicator value should be. Here is the line of the script that is erring out"

case when (RESULT not like '%<%') or (RESULT not like '%>%') then
CASE WHEN (CONVERT(int, RESULT) between 0 and 500) THEN '2'
ELSE '0'

The message I am getting is: Conversion failed when converting the varchar value '<1' to data type int.

I thought a "not like" statement would not include those values for converting to an int, but that does not seem to be working correctly. I did also try moving the not to show as "not RESULT like", and that did not change the message.

How I can filter out non-numeric values before converting the rest of the varchar field (RESULT) to int, so that it is only converting actual numbers?

View 6 Replies View Related

How Do I Enter In A Default Values For A Report Parameter That Accepts Multi Values

Apr 11, 2008



I have my stored procedure set to
Territory_code IN (@Territory)

, now , how do i enter in more then one value. When i select the multi value check box, it gives me more spaces. But then doesnt recognize the values when i put in more then one. am i doing something wrong?

The field is a Varchar 20

View 1 Replies View Related

How To Show Field Name Or Field Title In Matrix

Nov 19, 2007



Hi,

A very simple question but I cannot find how, please share with me if you know how to display Field Name or Field Title in Matrix at Rows ?

Thanks
best regards,
Tanipar

View 1 Replies View Related

Analysis :: MDX To Show Top Ten Values And One Last Row With Sum Of Resting Values

Dec 14, 2011

I have to show 11 rows:

The first 10 rows would be the top ten values for a Measure and a Dimension that has 20 members. I can get it with the following MDX expresion:

SELECT
TopCount(EXCEPT([Dim Category].[Dim Category].AllMembers,[Dim Category].[Dim Category].[All]),10,[Measures].[Value]) ON ROWS,
[Measures].[Value] ON COLUMNS
FROM [My Cube]

View 4 Replies View Related

Importing Of Varchar Field Data In Number Field

Dec 5, 2007

i want to import/copy a varchar field numeric data in to number field pls suggest the solution
one thing more can i convert field type of a table how?


jto it

View 5 Replies View Related

Convert Field From VarChar To Int With Speical Characters In Field

Aug 29, 2007

Hello,

I have a table with a column that is currently a varchar(50), but I want to convert it into an int. When I try to just change the type in design mode I get an error that conversion cannot proceed. When I look at the field it appears some of the entries have special characters appended at the end, I see a box after the value.

How can I remove all speical characters and then convert that field to an int?

Also I tried the following query which did not work as well, same error about conversion.

UPDATE myTable SET field = CAST(field AS int)

View 2 Replies View Related

CONVERT DATETIME To VARCHAR With Code 106 Does Not Show Long Month

Oct 26, 2007

I am having a problem while converting datetime to varchar with code 106. Here is the code and result I get:

TSQL Code:
SELECT CONVERT(VARCHAR(100), GETDATE(), 106)

Result:
"26 10 2007"

My expected result:
"26 Oct 2007" or "26 October 2007"

Have you encountered this problem before? Is it related to the SQL server setting? Please help and thank you in advance.

View 6 Replies View Related

Conditionalize Field Values Based On Other Field Values

Apr 17, 2007

Here's a portion of the current statement.

UPDATE EngagementAuditAreas

SET numDeterminationLevelTypeId = parent.numDeterminationLevelTypeId,

numInherentRiskID = parent.numInherentRiskID,

numControlRiskID = parent.numControlRiskID,

numCombinedRiskID = parent.numCombinedRiskID,

numApproachTypeId = parent.numApproachTypeId,

bInherentRiskIsAffirmed = 0,

bControlRiskIsAffirmed = 0,

bCombinedRiskIsAffirmed = 0,

bApproachTypeIsAffirmed = 0,

bCommentsIsAffirmed = 0

FROM EngagementAuditAreas WITH(NOLOCK) ...

And what I need is to conditionalize the values of the "IsAffirmed" fields by looking at their corresponding "num" fields. Something like this (which doesn't work).

UPDATE EngagementAuditAreas

SET numDeterminationLevelTypeId = parent.numDeterminationLevelTypeId,

numInherentRiskID = parent.numInherentRiskID,

numControlRiskID = parent.numControlRiskID,

numCombinedRiskID = parent.numCombinedRiskID,

numApproachTypeId = parent.numApproachTypeId,

bInherentRiskIsAffirmed = (numInherentRiskID IS NULL),

bControlRiskIsAffirmed = (numControlRiskID IS NULL),

bCombinedRiskIsAffirmed = (numCombinedRiskID IS NULL),

bApproachTypeIsAffirmed = (numApproachTypeID IS NULL),

bCommentsIsAffirmed = (parent.txtComments IS NULL)

FROM EngagementAuditAreas WITH(NOLOCK)

Thanks.

View 1 Replies View Related

Creating Index On A View To Prevent Multiple Not Null Values - Indexed View?

Jul 23, 2005

I am looking to create a constraint on a table that allows multiplenulls but all non-nulls must be unique.I found the following scripthttp://www.windowsitpro.com/Files/0.../Listing_01.txtthat works fine, but the following lineCREATE UNIQUE CLUSTERED INDEX idx1 ON v_multinulls(a)appears to use indexed views. I have run this on a version of SQLStandard edition and this line works fine. I was of the understandingthat you could only create indexed views on SQL Enterprise Edition?

View 3 Replies View Related

View Won't Show In Object Explorer

Jul 18, 2007

A view I created won't show up in "views' in Object Explorer, but will only show up when I script for it (Select * from blah). It also won't go into the ODBC. why?

View 8 Replies View Related

Create DB View To Show Results

Sep 10, 2007

I have 2 Table
Authors
ID Name
1 Clint
2 Voke

Books
BookID ID BookName Price
1 1 Book1 10
2 1 Boo21 12
3 2 Book3 6
4 1 Book4 13
5 1 Book5 2

Now I want to List All Authors and only show Most Expensive book Name of each Author.
So I need this Fields :ID,Name,BookName,BookID,Price.

How could I Write SQL query For It (I want to show results in DB Without Using SP).
I want to Create NEw Views Which Shows my required Results.

thanks,

View 15 Replies View Related

SQL 2000 View VS. Sproc Show Different Results

May 9, 2005

I have a sproc in my database that when editing in VS 2003 shows different results.
The sproc code is:
ALTER PROCEDURE dbo.VMUsage_GetRaw
@VMBox nvarchar,@StartDate datetime,@EndDate datetime
AS
SET NOCOUNT ON
SELECT      *FROM          VMRawUsageWHERE      (ACCOUNT = @VMBox) AND  (CONVERT(datetime, DATE + ' ' + TIME) > @StartDate) AND  (CONVERT(datetime, DATE + ' ' + TIME) < @EndDate)
When I open the SQL statement in the designer and run (and enter my parameters) I get a recordset returned, but when I just "Run Stored Procedure" and enter the same parameters I get no results.  The same occurs when I run the sproc from my website (no results).
Any ideas what is happening between the two?

View 1 Replies View Related

Rotate View - Show Result With 3 Columns In 1 Row

Jan 19, 2012

I have a view with 2 columns and 2 rows(No 1). I want to show the result with 3 columns in 1 row(No 2).

No1:
The view result :
ID | SubjectID
-- ---------
13279 | 900
13279 | 910

No2:
I want to show that result in this structure :
ID | SubjectID | SubjectID2
-- --------- ----------
13279 | 900 | 910

View 1 Replies View Related

Creating A View By Using Multi Tables

Jun 12, 2007

Here I need to create a view by using following criteria, there is 3 tables which are Tbl.adminCategory, tbl_adminuser, tbl_outbox respectively. I am working on 2000SQL server

I am treing to create view as following but getting some error.

SELECT tbl_adminuser.adminUserName, tbl_AdminCategory.Name,
COUNT(tbl_outbox.msgUserID),
FROM tbl_adminuser INNER JOIN
tbl_AdminCategory ON
tbl_adminuser.adminUserID = tbl_AdminCategory.CatID INNER JOIN
tbl_outbox ON tbl_AdminCategory.CatID = tbl_outbox.msgUserID
AND tbl_outbox.msgUserID <> 0
GROUP BY tbl_outbox.msgUserID
But I am getting error pls correct the view,

thanks to all

View 4 Replies View Related

Write Query To Show Results In DB View -Advanced-

Sep 10, 2007

I have 2 TableAuthorsID Name1 Clint2 Voke
BooksBookID ID BookName Price1           1        Book1  10 2           1        Boo21  12 3           2        Book3  6 4           1        Book4  13 5           1        Book5  2
Now I want to List All Authors and only show Most Expensive book Name of each Author.So I need this Fields :ID,Name,BookName,BookID,Price.
How could I Write SQL query For It (I want to show results in DB Without Using SP).I want to Create NEw Views Which Shows my required Results.
thanks,
 
 

View 2 Replies View Related

Only Show Field On Last Page

Nov 27, 2006

Hallo,
i would like to show some fields only on the last page on the report. How can i achieve this?
(The field is in the body area)

King regards,
Christian Niehaves

View 9 Replies View Related

Getting Textbox To Show All Values

Apr 15, 2007

Is there a way in rs to have a textbox more than the first value when it is dragged on the rs form when creating a report? currently when I drag a text box on the rs form, it only shows the first record on a page/form. There are twenty records on the table where the first value came from. How can I make so that twenty text boxes representing twenty records appear on twenty different pages. In other words, I am trying to build a report with a non - tabular structure that can repeat on different pages.

View 4 Replies View Related

All Measures Show No Values

May 29, 2008



I made a number of dimension and calculated member mods and notice that all now no base or calculated measures display values, they just show blanks in the browser and query window. To try to isolate, I've
(1) removed every dimension and calculated member
(2) verified there are no defaultmembers for dimensions
(3) verified there are no dimension attributes set to IsAggregatable = False

(4) verified there are no deploy or script errors
(5) fully processed every dm and fact
(6) verified there are dim and claim records loaded with values in all appropriate columns

When I process the cube, it shows that rows are read, etc... All that looks normal. Just when I browse or query, all measures display as blanks or nulls.

What could cause this behavior? Any ideas on how to futher isolate? I can go to a backup but very concerned that this can happen with no error messages or warnings, so I want to find the cause.

View 4 Replies View Related

Avoid Table Scan Using Multi Union View

May 26, 2008

Anyone see a way to trick the optimizer into not scanning all tables involved in the view?


-- create two test tables
create table dbo.test1
(testID int, TestName varchar(10))

create table dbo.test2
(testID int, TestName varchar(10))

-- populate
declare @i int
set @i = 1000
while @i > 0
begin
insert into dbo.test1
select @i, '1.' + cast(@i as varchar(5))
set @i = @i - 1
end

insert into dbo.test2
select 1, '2.1' union all
select 2, '2.2'
go

-- create view
create view dbo.vw_Test
as
select1 as QueryID,
TestName
fromdbo.Test1
union all
select2 as QueryID,
TestName
fromdbo.Test2;
go


-- this works as i want, only scans table dbo.Test2
select *
fromdbo.vw_Test
whereQueryId = 2

-- joining to a table triggers scan of both tables in view:
declare @table table (QueryID int)
insert into @table
select 2;

selectvt.TestName
fromdbo.vw_Test vt
join@table t on
vt.QueryID = t.QueryID



Using the showplan I can see why the optimizer ends up scanning all tables, but maybe there is a way to force it to use the QueryID param evaluation earlier in the filtering.

Nathan Skerl

View 6 Replies View Related

Multi-value Selection Blanks Out On View Report Click

Aug 13, 2007

I have a report that I am building that consist of 4 multi-value selections from four different queries. When I choose "Select All" from all the drop downs and click on "View Reports", it blanks out all the selections from one of the drop downs.

Can someone please point me in the right direction on this problem. The report will run sometimes, but most of the time it will not.

Thanks

View 3 Replies View Related

Show Field Names/Schema

Jan 15, 2004

I can't seem to find a sample code, either here or on the net - - so I'll go ahead and ask...

What I'm looking for is a sample of how to query a database, so that I can populate a listbox with the table names from a database - - and then, populate another listobx with the field names from the database, in order to build a user-driven sql statement builder....

either of the above (at least the field name part) - either a code sample, or a link, will be greatly appreciated) - -

Thanks

View 1 Replies View Related

How To Make NULL Values Show Last

Jun 23, 2014

I have the following table records structure:

Code:
drop table ##t1
create table ##t1(col1 int, col2 int, col3 int, col4 int)
insert into ##t1(col1 , col2, col3, col4)
values (1,2,3,4),
(5,6,7,8)

[Code] .....

I can't figure out how to put all nulls at the bottom and have all of my records on the top.

View 11 Replies View Related

How To Show Variance In Column Values

Feb 19, 2014

This is my table structure

--=====
create table calculate(
ID int identity (1,1),
PreviousYear_Profit float not null,
)

insert into calculate values (12500)
insert into calculate values (22700)
insert into calculate values (18500)
insert into calculate values (25800)
--======

I want to calculate variance and expected output is

ID PreviousYear PriorVersion Variance
1 12500 sum(PreviousYear) PreviousYear-PriorVersion
2 22700 sum(PreviousYear) PreviousYear-PriorVersion
3 18500 sum(PreviousYear) PreviousYear-PriorVersion
4 25800 sum(PreviousYear) PreviousYear-PriorVersion

I don't have PriorVersion and Variance columns.

PriorVersion will be like sum(PreviousYear)
Variance will be (PreviousYear - PriorVersion)

I can query if I have column, since I don't have these two column how could I possibly achieve the output using my existing table schema.

View 1 Replies View Related

Show Variable Values At Runtime

Nov 14, 2007

Is there a quick and easy way, other than scripting a MsgBox(), to show the value of a package variable while the package is running?

View 3 Replies View Related

Help With Joining/selecting Values To Show

Nov 7, 2006

I am editing a pre-existing view.This view is already bringing data from 40+ tables so I am to modify itwithout screwing with anything else that is already in there.I need to (left) join it with a new table that lists deposits and thedates they are due. What I need is to print, for each record in theview, the due date for the next deposit due and the total of allpayments that they will have made by the next due date.So this is how things are. I join the table and it obviously bringsmultiple records for each record (one for each matching one in the newtable). I need, instead, to be able to make out what due date I shouldprint (the first one that is GETDATE()?) and the total of deposits upto that date.Now, payments can be either dollar amounts or percentages of anotheramount in the view. So if it's an amount I add it, if it's a % Icalculate the amount and add it.Example:for group X of clients...Deposit 1 due on oct 1: $20Deposit 2 due on oct 15: $30Deposit 3 due on nov 15: $40Deposit 4 due on nov 30: $50for group Y of clients...Deposit 1 due on Oct 30: $200Deposit 2 due on Nov 30: $300Deposit 3 due on Dec 30: $400So when if I execute the view today (Nov 7th) each client from group Xshould have:Next Due Date: nov 15. Total: $90 (deposit 1 + deposit 2 + deposit 3)Group Y should have:Next Due Date: Nov 30, total: $500 (Deposit 1 + deposit 2)And so on.

View 4 Replies View Related

Report Doesn't Show Up Any Values

Jan 28, 2008

Hi,

I've designed a report and assigned it a datasource that binds with a SP with a parameter. In the XML code of the dataset I can see the input parameter has been recognised by the wizard. Then, I built a report with that Dataset as the source. Everything is fine till this time. Now through my aspx code I pass on the value of the parameter to the report. But the report doesn't show any values at all. The aspx code is like



Code Snippet
Dim reportParameter As New ReportParameter("@UserID", Convert.ToInt32(TextBox1.Text), True)
Dim test() As ReportParameter = {reportParameter}
ReportViewer1.LocalReport.SetParameters(test)

Any ideas what I could be doing wrong?
VS 2005 & SSRS 2005.
TIA.

View 2 Replies View Related

Show All Sales Reps Even If There Are No Values

Dec 3, 2007



I know this is an easy one, but for some reason i keep gettin the wrong results.
This displays something like this :
Question_description Visit_Activity_Id SR_Name
Vacation 5 Judy Smith
Sick 2 Judy Smith
Visit 1 Tom Mathews
Training 3 Karen Williams


But i want it to show all the SR_Name's ..like this:
Question_description Visit_Activity_Id SR_Name
Vacation 5 Judy Smith
Sick 2 Judy Smith
Visit 1 Tom Mathews
Training 3 Karen Williams
NULL null Tom Jones
NULL null Kim Jones
NULL null Jon Travis


Any help will be grately appreciated! thanks!



Code Block
ALTER PROCEDURE [dbo].[PROC_RPT_SR_DAILY_ACTIVITIES]
(@Region_Key int=null, @Daily_activity_statistics_datetime datetime )
AS
BEGIN

SELECT Customer.Name as Store_Name,
Tbl_Daily_Activity_Statistics.SR_Code,
Tbl_Daily_Activity_Statistics.Territory_Code,
Tbl_Daily_Activity_Statistics.Customer_code,
Tbl_Daily_Activity_Statistics.in_progress_time,
Tbl_Daily_Activity_Statistics.completed_time,
Tbl_Daily_Activity_Statistics.Visit_Activity_Id,
Tbl_Daily_Activity_Statistics.dial_in_datetime,
Tbl_Daily_Activity_Statistics.question_code,
tbl_Questions_to_RC_Question.RC_Question_description,
Qry_Sales_Group.SR_Name, dbo.Qry_Sales_Group.Region,
Qry_Sales_Group.Region_Key,
Tbl_Daily_Activity_Statistics.Daily_activity_statistics_datetime

FROM Tbl_Daily_Activity_Statistics
INNER JOIN tbl_Questions_to_RC_Question
ON Tbl_Daily_Activity_Statistics.question_code = tbl_Questions_to_RC_Question.question_code
INNER JOIN Qry_Sales_Group
ON Tbl_Daily_Activity_Statistics.SR_Code = Qry_Sales_Group.SalesPerson_Purchaser_Code COLLATE Latin1_General_CI_AS
LEFT OUTER JOIN customer
ON dbo.Tbl_Daily_Activity_Statistics.Customer_code = dbo.customer.customer_code

WHERE Region_key=@Region_key AND Daily_activity_statistics_datetime = @Daily_activity_statistics_datetime






END

View 3 Replies View Related

Multi Field Select Using IN...

Oct 27, 2006

here is what i am wanting to do but is it possible to use multi fields with an IN statement?

SELECT *
FROM usmastf
WHERE usm_book, usm_acct IN
(SELECT usac_book, usac_acct
FROM uscommf
WHERE usac_code = 'O/W')

View 14 Replies View Related

DLookUp With Multi-value Field

May 13, 2014

I have a multi value field into which I have placed several different values. I wish to compare a value that is entered by the user with the multi value field, to find if the value entered is there. I am assuming ( and also hoping) that I can use DLookUp to do this. At the moment I get all of the multi values returned by DlookUp and they are separated by commas and the value that I want to find is in there. However this is giving me an error because of the separating commas. How can I isolate/extract the value that I want so that I can make a comparison ? Is it something like MyFieldName.Value?

View 12 Replies View Related







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