SQL Server 2012 :: Store Multi Values In One Parameter?

Sep 29, 2015

i design SP for insert data in 2 tables i need to store list of array in one parameter to complete my query i try the table value but it`s not good for me because table value is readonly and i need to insert data with list of array .....

View 5 Replies


ADVERTISEMENT

Reporting Services :: SSRS 2012 Multi Value Parameter Value To Be Hidden When Other Values Are Selected From Preview Of Report

Jul 7, 2015

There is a multi value parameter called  "include" in the report where "Allow Multiple Values" is checked and it has 4 Available values as shown in the attached screen shots and preview of the report is also shown .There is no data set for this parameter and the values  will get displayed on the report based on the visibility condition set in the report.Example : If first value  is selected  then 1 is passed and based on the visibility condition set in the report - the report output is displayed.None is default value and has value 4  and when the report is run with this option i.e. "None" then rest three parameter values are not applicable .

Requirement :
-When the end user selects (Select All) Check box then (None)
-check box must be disabled or must not appear for selection for the end user
-When the end user selects check boxes either of the first three except None then also None check box must be disabled or must not appear for -selection for the end user
-when the end user selects a combination of first three then also None check box must be disabled or must not appear for selection for the end user
-The None is set as default with a value as 4 and is applicable only when the user does not select either of the first three values and the report will run.

View 3 Replies View Related

SQL Server 2008 :: Handle Space Between Multi-value Parameter Values In SSRS?

Jul 8, 2015

how to handle space between multi-value parameter values in SSRS. For e.g. if the values are as follows -'KLO LUG', 'HGY KIU', 'LOT JUY', I know I can use the split function for the commas but its the space between the value which is the problem.

View 3 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

SQL Server 2012 :: Input Parameter For Store Procedure Like In Statement Value 1 / Value 2

Jun 20, 2014

How can I input parameter for Store Procedure like In ('Value1','Value2')

Example :
Create procedure GetUsers
@Users nvarchar(200)
as
Select * from Users where UserID in (@Users)

View 6 Replies View Related

Store Multi-Select Values In An Image Data Type?

Dec 20, 2005

I was working on figuring out where a certain application wasstoring the multiple selection choices I was doing through the app.I finally figured out that they were being store in an IMAGEdata type colum with the variable length of 26 bytes.This is the first time I ran into such way of storing multipleselections in a single Image data type.Is this a better alternative than to store into a One-to-Manytables? If so then I'll have to consider using the Image datatype approach next time I have to do something like storing1 to thousands of selections.Thank you

View 4 Replies View Related

Displaying Values For Multi-value Parameter

Dec 15, 2007

At the top of my report, if I want to display the selected value for a given
parameter, I can put this expression in a text box:

="The xyz param's value is: " & Parameters!paramXYZ.Label(0).ToString

How do I go about displaying all the selected values for a multi-value
parameter (one that has mulitple checkboxes in the drop-down list)? Is it
possible to do a for loop and iterate through the values of the param within
an expression? Something like

for i = 0 to Parameters!paramXYZ.Count - 1
mystring = mystring & ", " & Parameters!paramXYZ.Label(i).ToString

And then display mystring in the textbox? Or can I use a list control on the
report?


Thank you,

View 4 Replies View Related

Select Values From Multi-value Parameter

Oct 16, 2006

Is it possible to pass values from UI to a multi-value parameter in a report and from this report, select values from this multi-value parameter to finally display data?

Thanks!

View 5 Replies View Related

Multi-value Parameter Default Values Not Working

Jul 12, 2007



I have a parameter that gets it's available values from a dataset.



I use this exact same data to populate the default values.



When I run the report, the available values get populated; however the default values are not being selected.



This works on other parameters on the same report. However, on this parameter, it is not working.



I have tried ltrim/rtrim (Been burned with that before when the field type is a char)

I change the data field in the query, without changing the parameter setup, and it works...



Here is my query:




Code Snippet

Select distinct
CityName

from dimHotel dH (NOLOCK)
Inner join factHotel fH (NOLOCK)
on dh.HotelKey = fH.HotelKey

Where dH.CityName <> ''
and dH.CityName is not null
and fH.ClientKey in (@ClientID)

Order by CityName





The parameter is setup correctly, and matches the setup of another parameter on the same report that is working fine.



I have tried deleting the parameter and re-adding it. This did not work.

I also deleted and re-added the query. No luck.



Any ideas??

Thanks!!



Thanks

View 3 Replies View Related

Returning All Selected Values In Multi-valued Parameter

Feb 15, 2007

How does one return all selected values in a multi-valued parameter? Right now i have a filter on the dataset where

(Expression)

=Fields!LOCATION_ID.Value

(Operator)

=

(Value)

=Parameters!Loc.Value(0)

This is just giving me data from the first value that is selected in the multi-valued dropdown. I need all returned from the parameter. Any ideas.

View 4 Replies View Related

Pass Multi-values In A Single Parameter For Stored Procedure

Apr 16, 2013

I got issue when passing multiple values to a single parameter. Here is my stored procedure as following:

CREATE PROCEDURE [dbo].[School]
@Grade AS varchar(50),
@Class As varchar(50)
AS
BEGIN
SELECT Name, Grade, Class
FROM School
WHERE Grade = (IsNull(@Grade, Grade)) AND Class IN (IsNull(@Class, Class ))
END

In the front end, I got multiple values for Subject parameters such as Math, English, Reading, etc... in a specified class. How do I can modify my above stored procedure to receive multiple values for a single parameter.

View 14 Replies View Related

Reporting Services 2005 Multi-value Parameter Possible Values Search

Apr 21, 2008

Hi there,

I have a problem with multi-value parameter in ReportingServices2005, hope to find a solution here.


if I use ordinary parameter in a report(multi-value checkbox is not selected), after deployment I can click on drop down list and type possible value of that parameter using keyboard(it will be selected from what i typed).


if I use multi-value parameter somewhy it doesn't respond to anything i type from my keyboard.



Why is that?
What should i do to make that multi-value parameter select possible result from what i type?

View 4 Replies View Related

Multi-Select String Parameter Values Are Converted To N'Value1', N'Value2' In Clause When Report Is Run

Apr 14, 2008



I understand that Multi-Select Parameters are converted behind the scenes to an In Clause when a report is executed. The problem that I have is that my multi-select string parameter is turned into an in claused filled with nvarchar/unicode expressions like:


Where columnName in (N'Value1', N'Value2', N'Value3'...)

This nvarchar / unicode expression takes what is already a fairly slow-performing construct and just drives it into the ground. When I capture my query with Profiler (so I can see the In Clause that is being built), I can run it in Management Studio and see the execution plan. Using N'Values' instead of just 'Value1', 'Value2','Value3' causes the query performance to drop from 40 seconds to two minutes and 40 seconds. It's horrible. How can I make it stop!!!?

Is there any way to force the query-rewriting process in Reporting Services to just use plain-old, varchar text values instead of forcing each value in the list to be converted on the fly to an Nvarchar value like this? The column from which I am pulling values for the parameter and the column that I am filtering are both just plain varchar.

Thanks,

TC

View 3 Replies View Related

SQL 2012 :: Store Attributes / Values In XML Column - Table Design

Oct 29, 2014

I'd like to create a table that will store different order items. Several order items make up one single order. Order items can have 0 or more children (max depth will never be deeper than one). Order items can have up to 150 attributes/values. The way I think this should be done is using XML column instead of the EAV type of model. My table structure currently looks like this:

* child_order_item_id (PK)
* parent_order_item_id (FK to child_order_item_id)
* order_id (FK to Order table)
* product_id (FK to Product table)
* price
* attribute_XML

How my attribute_XML should look like or how to validate the xml.

View 2 Replies View Related

Reporting Services :: Ssrs 2012 Change Parameter Values

Apr 22, 2015

In an existing SSRS 2012 report, I have a requirement for a user to be able to select by multiple school(s) and/or multiple grade(s). This is fine except certain schools like elementary have grade levels of KG to 06, Middle school has grades of 06 to 09 and high school has grades of 10 to 12. Thus for example, if a user has initially selected grades 11 and 12 and then they select an elementary school that has grades KG through 06, the 'grade level' selection would need to change.In other words,  I am thinking of initially having the available and default values for the parameter called 'Grade' set to KG through 12. However if a school is selected that only has specific grade levels like elementary school, how can I override the original grade level and only allow the user to select grades that the particular school contains?

View 3 Replies View Related

SQL 2012 :: Disaster Recovery Options For Multi-Database Multi-Instance Environment

Sep 23, 2014

Disaster Recovery Options based on the following criteria.

--Currently running SQL 2012 standard edition
--We have 18000 databases (same schema across databases)- majority of databases are less than 2gb-- across 64 instances approximately
--Recovery needs to happen within 1 hour (Not sure that this is realistic
-- We are building a new data center and building dr from the ground up.

What I have looked into is:

1. Transactional Replication: Too Much Data Not viable
2. AlwaysOn Availability Groups (Need enterprise) Again too many databases and would have to upgrade all instances
3. Log Shipping is a viable option and the only one I can come up with that would work right now. Might be a management nightmare but with this many databases probably all options with be a nightmare.

View 1 Replies View Related

SQL 2012 :: MSDTC In Multi-node / Multi-instanced Cluster

Aug 17, 2015

More often than not, I typically don't touch DTC on clusters anymore; however on a project where the vendor states that it's required. So a couple things here.

1) Do you really need DTC per instance or one for all?
2) Should DTC be in its own resource group or within the instance's group?
2a) If in it's own resource group, how do you tie an instance to an outside resource group? tmMappingSet right?

View 9 Replies View Related

Integration Services :: Pass Multiple Parameter Values To SSIS Package In 2012 Through Stored Procedure?

Jul 9, 2015

we can  assign one parameter value for each excecution of  [SSISDB].[catalog].[set_object_parameter_value] by calling this catalog procedure..

Example: If I have 5 parameters in SSIS package ,to assign a value to those 5 parameters at run time should I call this [SSISDB].[catalog].[set_object_parameter_value] procedure 5 times ? or is there a way we can pass all the 5 parameters at 1 time .

1. Wondering if there is a way to pass multiple parameters in a single execution (for instance to pass XML string values ??)
2.What are the options to pass multiple parameter values to ssis package through stored procedure.?

View 4 Replies View Related

Reporting Services :: Multi-value Parameter Not Passing In Subreport Parameter List

Jul 29, 2015

I have two report , first is main report which is matrix and have one parameter User_ids which is multi value selection and my second report is basic chart of user_wise performance.

Now, my main report (matrix ) works fine for Multiple selection of users and i have putted one textbox on main report chart which has action properties set for chart report, when user click on chart button it must goes to chart with user selected in main report. Now , i have used expression for parameter to send it like ..

=join(parameter!user_id!value,",") which pass selected value to chart 

And when I am selecting single user it passing that value to chart parameter list but , when it is more than one user it errors with conversion failed when converting the nvarchar value '121,128' to data type int. But my chart also works when passing 121,128 in user parameter in preview of report .

View 2 Replies View Related

SSRS Toggle Parameter Between Multi-Value And Single Value Based On Another Parameter

Feb 4, 2008



I would like to be able to adjust the multi-value property of a parameter based on the value of another parameter in my report. The controlling paramter would be binary with two options for Single or Multiple selection. I would like my parameter to default to multi-value, which I can do on the screen selection. I have tried to add an IIF statement to the XML code, with no success. Any ideas would be helpful.

Thanks

View 4 Replies View Related

SQL Server 2012 :: Set Default Parameter For Function Parameter?

Jan 13, 2014

I want to set the default parameters for a function. I;d like to set the date start date to current date and end date for the last 90 days. how to make this work?

Create Function HR.Equipment
(
@startdate Date =(Convert(Date,DATEADD(DAY,-1,GETDATE())),
@enddate Date = (Convert(Date,@StartDate-90)
)
RETURNS TABLE AS RETURN
(
SELECT
EquipID,
EmpName,
IssueDate
FROM HR.Equipment
WHERE IssueDate <=@StartDate and IssueDate >=@EndDate
)
GO

View 5 Replies View Related

SQL Server 2012 :: Replace All Values In String With Values From Look Up Table

Mar 19, 2014

I have a table that lists math Calculations with "User Friendly Names" that look like the following:

([Sales Units]*[AUR])
([Comp Sales Units]*[Comp AUR])

I need to replace all the "User Friendly Names" with "System Names" in the calculations, i.e., I need "Sales Units" to be replaced with "cSalesUnits", "AUR" replaced with "cAUR", "Comp Sales Units" with "cCompSalesUnits", and "Comp AUR" with "cCompAUR". (It isn't always as easy as removing spaces and added 'c' to the beginning of the string...)

The new formulas need to look like the following:

([cSalesUnits]*[cAUR])
([cCompSalesUnits]*[cCompAUR])

I have created a CTE of all the "Look-up" values, and have tried all kinds of joins, and other functions to achieve this, but so far nothing has quite worked.

How can I accomplish this?

Here is some SQL for set up. There are over 500 formulas that need updating with over 400 different "look up" possibilities, so hard coding something isn't really an option.

DECLARE @Synonyms TABLE
(
UserFriendlyName VARCHAR(128)
, SystemNames VARCHAR(128)
)
INSERT INTO @Synonyms
( UserFriendlyName, SystemNames )

[Code] .....

View 3 Replies View Related

Want To Store Arabic Values In The Sql Server Database

Feb 27, 2008

Hi,

I want to store arabic values and dates in sql server database.

I am using visual basic 2005 with sql server 2005. I entered the the arabic values through visual basic forms. But when i open the database table, i see the values in english format.

I change my regional settings of the operating system is arabic (platform vista).

Can you give how to see arabic values.

Thanks.


Regards
Kashif Chotu

View 3 Replies View Related

SQL 2012 :: SSDT Installation On Multi-server Platforms

Jun 25, 2014

We have a BI-Stack configuration for server SQL 2012 that includes a gateway server that houses the app, a second server which houses SQL Server DB and SSIS, and a third server that houses SSAS and SSRS. Where should SSDT tools be installed? I assume on the gateway? This is a production environment, so should VS and/or SSDT not be here at all?

View 1 Replies View Related

How To Store A Multi-line Textbox In MS SQL?

Feb 28, 2008

Hello,I'm a newbie and I have a little problem that's starting to work on my nerves  I want to store a multi line textbox in the database, just like the way it has been entered.I used a varbinary-field.This is my code in my aspx                Dim myOptions As New InterTyp.Opties()                Dim myCon As SqlConnection = myOptions.getCon()                Dim cmdOef As SqlCommand                Dim parmOef As SqlParameter                                cmdOef = New SqlCommand("GetOef", myCon)                cmdOef.CommandType = CommandType.StoredProcedure                cmdOef.Parameters.Add("@oid", System.Data.SqlDbType.Int).Value = ID                'output                parmOef = cmdOef.Parameters.Add("@otext", SqlDbType.VarChar)                parmOef.Size = 8000                parmOef.Direction = ParameterDirection.Output                'execute the query                myCon.Open()                cmdOef.ExecuteNonQuery()                txtOef.Text = cmdOef.Parameters("@otext").Value                myCon.Close()In my code i call a sp:CREATE PROCEDURE dbo.GetOef             @oid integer,             @otext varchar OutputAS             SELECT  otext             FROM oefening             WHERE     (oid = @oid) So my problem is:How do i cast the varbinary back to a text?   

View 2 Replies View Related

SQL Server 2008 :: Store Long Values To Be Used In (IN) Statement In Separate Table?

Jul 14, 2015

I have several reports that are looking for a code within a certain set of codes or ranges. The specific list of codes to be including is determined by the end user. Currently my "IN" statement can be a hundred lines, listing several ranges, lists of specific codes, etc. I am constantly getting asked what codes does it include, is this code included, etc. Sometimes they'll give me a printed 10 page list of codes and want me to compare to what I have included in the report. Not ideal in the slightest.

What I'd like to do is have a table or a file of some kind somewhere where the end user can view the codes contained, add new ones, and delete ones they no longer want. Then I'd like to be able to just reference that file in my IN statement. Leaving the responsibility of listing the correct codes on them.

View 9 Replies View Related

SQL Server 2012 :: Sending Email Through Store Procedure?

Jan 28, 2015

I have below code to send email in HTML table format with store procedure. from my

Database = "CreditControl"
Table = "Testing$"

and code as below

DECLARE @bodyMsg nvarchar(max)
DECLARE @subject nvarchar(max)
DECLARE @tableHTML nvarchar(max)
DECLARE @recipients nvarchar(max)
DECLARE @profile_name nvarchar(max)

[code]....

View 6 Replies View Related

SQL 2012 :: Where Does Server Store Information About TempDB Configurations

May 29, 2015

Whenever SQL Server get restarted, tempdb gets recreated with its last configuration.

let me know where SQL Server store tempdb configurations? How does it know how many Tempdb files it needs to create on restart?

View 2 Replies View Related

SQL Server 2012 :: How To Update Master Count Column From Multi Thread Application

Sep 28, 2015

We have an application that runs Jobs, each of which affect ## number of child objects (usually around 1M). When a thread gets to 5000 updated child objects it bulk inserts into a table called ActionLog with the child Id and JobId.

When the job is complete a sproc SUMs the children from the ActionLog table:
select sum(id) from ACTIONLOG where JOBID = @JobId;

It then updates the Jobs table AffectedObjectCount column with the sum(*) from above.

Instead of writing to the ActionLog table and calculating the SUM at the end I would like to do this 'real time'. After the bulk insert I would like to update the AffectedObjectCount column with the number of rows that were just bulk inserted. I tried this in the past and ran into major contention issues. There are usually 20 threads running a job so there exists a lot of potential for deadlocks.

Is there a recommended way to handle updating one column on one row from multiple threads? What is the best practice for a counter like this?

View 0 Replies View Related

Multi Connection To .sdf File Store On Network Share

Feb 22, 2007

Hi

In the "Choosing Between SQL Server 2005 Compact Edition and SQL Server 2005 Express Edition" white paper, i can read that: "SQL Server 2005 Compact Edition support data file storage on a network share" and "Number of concurrent connections = 256"

But when i try to connect with two different PC at the same time to a .sdf file store on a network share, i have an error message : "File is locked by an other processus"

The firsth PC is connected but the secondth can't

";Mode=Read Write" in the connection string don't change anything.

anybody have an idea ?

View 3 Replies View Related

SQL Server 2012 :: DB2 Store Procedure Returning Two Data Sets

Oct 13, 2014

A DB2 store procedure returns two data sets, when executed from SSMS, using linked server. Do we have any simple way to save the two data sets in two different tables ?

View 1 Replies View Related

SQL Server 2012 :: Store Tabular Data Having Parenthesis As Column Name Into XML

Nov 9, 2014

We are storing changed data of tables into XML format for auditing purpose. The functionality is already achieved. We are using FOR XML Path clause to convert relational data of tables into XML format.

Now, a table is having column name with '(' . For example name of the column is, ColumnName(). In this case we can not convert into XML using For XML clause. Showing error as,

Column name 'columnName()' contains an invalid XML identifier as required by FOR XML; '(' (0x0028) is the first character at fault.

View 1 Replies View Related

SQL Server 2012 :: Non-Clustered Column Store Index On Table

Jun 18, 2015

I have created NONCLUSTERED index on table but my report is taking more time that's why i created columnstore NONCLUSTERED index on the same table but i have one query, if any table have row and column level index(same columns in index) . Which index query will consider.

View 1 Replies View Related







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