I found out the data I need for my SQL Report is already defined in a dynamic dataset on another web service. Is there a way to use web services to call another web service to get the dataset I need to generate a report? Examples would help if you have any, thanks for looking
I have a report with multiple datasets, the first of which pulls in data based on user entered parameters (sales date range and property use codes). Dataset1 pulls property id's and other sales data from a table (2014_COST) based on the user's parameters. I have set up another table (AUDITS) that I would like to use in dataset6. This table has 3 columns (Property ID's, Sales Price and Sales Date). I would like for dataset6 to pull the Property ID's that are NOT contained in the results from dataset1. In other words, I'd like the results of dataset6 to show me the property id's that are contained in the AUDITS table but which are not being pulled into dataset1. Both tables are in the same database.
I have a small number of rows in a dataset, Table 1. There is a CLOB on a large dataset, Table 2. They join on a PK. I would like to retrieve this CLOB and add it to the data flow for Table1. In short I want to emulate the following:
Table 1: Small table without CLOB, 10 rows. Table 2: Large table with CLOB, 10,000,000 rows
select CLOB from table2 where pk = (select pk from table1)
I want this to return the CLOBs for the small number of rows in Table 1. The PK is indexed obviously so it should be a fast look up.
Table 1 and Table 2 live on different Oracle databases. How do I perform this operation efficiently in SSIS? It seems the Lookup and Merge Join wont do this.
I have a report with multiple datasets, the first of which pulls in data based on user entered parameters (sales date range and property use codes). Dataset1 pulls property id's and other sales data from a table (2014_COST) based on the user's parameters.
I have set up another table (AUDITS) that I would like to use in dataset6. This table has 3 columns (Property ID's, Sales Price and Sales Date). I would like for dataset6 to pull the Property ID's that are NOT contained in the results from dataset1. In other words, I'd like the results of dataset6 to show me the property id's that are contained in the AUDITS table but which are not being pulled into dataset1. Both tables are in the same database.
What is required is to split data of this format into 3 separate datasets:
1. One dataset for DividendRequirement of 100, i.e. select * from tableName where DividendRequirement = 100
2. One dataset for DividendRequirement > 100 i.e. select * from tableName where DividendRequirement > 100
3. One dataset for DividendRequirement < 100 i.e. select * from tableName where DividendRequirement < 100
I know that i can do it with 3 separate stored procedures using a different operator ('=', '>' and '<') in each one and that i can combine the 3 stored procedures into 1 using dynamic sql and pass the operator (or some number that maps to a particular identifier) as a parameter to the stored procedure. What i'm after though is a way to avoid dynamic SQL but still keep it as one stored procedure. Possibly some clever use of case statements or something along those lines?
hi i have a problem i am writing a stored procedure which contains "EXECUTE" statment which excutes the query and retrieves the attributes what i want. by using that procedure it is working fine and i am able to get the result
but i am not able to build the report why because this dataset not listing the attributes.
my procedure is like this : -------------------------------------------- USE [HOST_BPM_COVLTCP] GO
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROC [dbo].[PB_Report_GetProjectAttributes] @intProjectId INT AS BEGIN
SELECT @SRC_ATTRIBUTE_COLUMNS = (CASE WHEN @SRC_ATTRIBUTE_COLUMNS IS NULL THEN '' ELSE ',' + @SRC_ATTRIBUTE_COLUMNS END), @STR_ATTRIBUTES = ISNULL(@STR_ATTRIBUTES, ''''' DUMMY_COL'), @SRC_ATRIBUTE_NAMES = ISNULL(@SRC_ATRIBUTE_NAMES, ' '''' WHERE 1 <> 1')
EXEC ( ' SELECT DP.IDX PROJECT_ID, dbo.FindAndReplace(DP.CODE) [Project Code], dbo.FindAndReplace(DP.NAME) [Project Name], dbo.FindAndReplace(DP.LABEL) [Project] ' + @SRC_ATTRIBUTE_COLUMNS + ', ISNULL(DP.CREATED_BY,'''') AS CREATED_BY, ISNULL(DP.MODIFIED_BY,'''') AS MODIFIED_BY, DP.CREATED_DATE, DP.MODIFIED_DATE FROM DIM_PROJECT DP, ( SELECT ' + @STR_ATTRIBUTES + ', PROJECT_ID FROM PB_PROJECT_ATTRIBUTE_VALUE WHERE PROJECT_ID = ' + @intProjectId + ' GROUP BY PROJECT_ID ) SRC WHERE DP.IDX = ' + @intProjectId + ' AND DP.IDX *= SRC.PROJECT_ID ORDER BY DP.LABEL ' ) ---------- actually this procedure should result the following attributes
Hi, I have a stored procedure attached below. It returns 2 rows in the SQL Management studio when I execute MyStorProc 0,28. But in my program which uses ADOHelper, it returns a dataset with tables.count=0. if I comment out the line --If @Status = 0 then it returns the rows. Obviously it does not stop in if @Status=0 even if I pass @status=0. What am I doing wrong? Any help is appreciated.
ALTER PROCEDURE [dbo].[MyStorProc]
(
@Status smallint,
@RowCount int = NULL,
@FacilityId numeric(10,0) = NULL,
@QueueID numeric (10,0)= NULL,
@VendorId numeric(10, 0) = NULL
)
AS
SET NOCOUNT ON
SET CONCAT_NULL_YIELDS_NULL OFF
If @Status = 0
BEGIN
SELECT ...... END If @Status = 1 BEGIN SELECT...... END
We have built an analytics solution in Analysis Services with the following setup:
1) FactTable = Customer transactions 2) DimCustomerClassificationTable = For a customer over a trailing twelve month period, we have pre-calculated a series of segmentations such as their revenue segment at a Worldwide Level, Region Level, SubRegion Level, or Country Level, their product classification (e.g., what are they mainly buying) at a Worldwide Level, Region Level, SubRegion Level, or Country Level etc. For each combination of a customer and country over a trailing twelve month period, we have one dimension table record that has their segmentation classifications at each geography level. 3) DimTime = Allows a user to select a trailing twelve month time period 4) DimSalesLocation = the hierarchy of sales organization locations (Worldwide, Region, SubRegion, Country) credited with the sale to the customer
Ideally, we would like to create calculated members on the DimCustomerClassification dimension that would assume the value of the correct segmentation field based on a user's selection (e.g., if they has selected a country, we would have one calculated member called Revenue Segment that assumes the value of Revenue Segment Country, if they selected a SubRegion, it would assume the value of Revenue Segment SubRegion, etc.), but we are not sure if this is possible.
If this isn't possible, what would be the best approach to address this?
so that everything is then driven from a single selected Quarter value, the table report no longer gets populated, as it has hardcoded field values such as
i have two datasets.one dataset have old data from some other database.second dataset have original data from sql server 2005 database.both database have same field having id as a primary key.i want to transfer all the data from first dataset to new dataset retaining the previous data but if old dataset have the same id(primary key) as in the new one then that row will not transfer. but if the id(primary key) have changed values then the fields updated with that data.how can i do that.
D2 is a list of data. each row in D2 has a classid. D2 may or may not have all the classids in D1. all classids in D2 must be in D1.
I want to show fields in D2 and group the data with classids in D1 and show every group as a seperate table. If no data in D2 is available for a classid, It shows a empty table.
=CountDistinct(IIF(Fields!Released_DT.Value = Fields!Date2.Value, Fields!Name.Value, Nothing)) Released_DT = a date - 09/03/2015 or 09/02/2015 Date2 = returns another date value in this case 09/03/2015
What I'm trying to do is: count distinct number of people (Fields!Name.Value) if the Relased_DT = Date2.My IIF statement is returning a zero value.
Hi every body... I have a probleme I have a web Services which contains a method getValue(IDEq (int), idIndicator(int), startTime(dateTime), endTime(dateTime)) I need to call this method. But my problem is how pass parameter ? I see the tab Param but it isn't work as I wait,... maybe I do a mistake...
I want that statTime and endTime are select by the user via a calendar for example... now idIndicator and idEq was result of an other dataSet from a xml datasource...
But I don't how integrate dynamically... I try to enter a parameter via the param tab, and create and expression : =First(Fields!idEq.Value, "EquipmentDataSet") but when i execute the query, the promter display <NULL>... So I don't know how to do and if it is possible ! I hope someone can help me ! Thank you !
I am faced with a common situation but there is a little twist that makes it unique and has me stumped. Hopefully someone can point me to a solution or give me enough guidance to figure it out. Here is the situation, I am loading an XML file into a Dataset and need to update SQL tables from that Dataset but the tables are slightly different than in the DataSet. I am using C#, asp.net 2.0, visual studio 2005 and sql server 2005. When I loaded the XML into the Dataset, the Dataset contained 19 tables. I individually loaded each table from the Dataset and determined from that which tables I needed and didn't need as well as determinined which fields I needed or not. I used this information to create my SQL tables. Briefly, when creating the SQL tables, I used the dataset table name as the SQL table name and used the same column names as well. the only difference from the Dataset tables and SQL tables is 1 column has a different name (or to be more specific, a column exists in the datset that does not exist in the sql table and a column exists in the SQL table that does not exist in the dataset table). Also, some tables in the dataset do not exist in the sql Database. I know that I can spin through each row of the tables I need in the Dataset and create an insert command from the row data and insert that into the SQL table but I have 11 tables to do that with. I would like to take advantage of ADO.NET and push the datset information into sql data but I am confused on how to do this. I am confused because not all tables in the dataset are represented in the sql database and though the tablenames and most of the columns have the same name, it is not an exact fit. Can anyone point me to a solution or give me a good game plan that I can search on to help me load my dataset info to a sql DB. I appreciate any help I can get. Thanks.
hi developers i've a table named users where i store the city id , this city id -> citymaster (cityid,stateid)->state master (cityid,stateid) ->country master (countryid,stateid). now i need to make the query fetches the columns like this username,cityid,stateid,countryid how can i do this
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: -- Create date: -- Description: -- ============================================= ALTER PROCEDURE [dbo].[SP_UpdateProfile] -- Add the parameters for the stored procedure here @regUserID nvarchar(20), @regName nvarchar(50), @regEmail nvarchar(50), @regMobile nvarchar(10), @regPinCode nvarchar(10), @regCity nvarchar(12), @regState nvarchar(12), @RValue int output AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;
-- Insert statements for procedure here UPDATE tblUserDetails SET regName= @regName, regEmail= @regEmail, regMobile= @regMobile, regPinCode= @regPinCode, regCity= @regCity, regState= @regState WHERE regUserID=@regUserID END
here i updating the profile according to the userID..
My doubt is how to get these various values selected in a dataset and how to retrieve from tat dataset... please friends help me out...
I am using storedprocedure for a process... i am selecting 4 variables from the stored procedure as a ouput parameters.. now please help me in working with a dataset to collect the 4 variables and read the variables from the dataset...
Would anyone have any suggestions on how to modify this procedure so that it returns only one dataset, but yet still keeps the data seperated? Or is this even possible?
hi i m working on ERP with VB.Net and SQLserver2005. i have some problem with that query. In the here is two administrator 1- administrator 2-HR administrator in the table,code written on login srceen and query is following. SELECT userGroupMaster.groupName FROM userGroupDetails INNER JOIN userGroupMaster ON userGroupDetails.groupName = userGroupMaster.groupName INNER JOIN UserNameMaster ON userGroupDetails.userName = UserNameMaster.UserName WHERE (UserNameMaster.UserName = '" & gl_strUserName & "') whenever i execute it then error comes due two administrator.
I wanna use dataset in that query to read first administrator.
I have come into a company where my predesessor used a TON of differently named RDS files to connect to the same SQL Server Database; the same connection string, login id, etc. My suspicion is that he thought that datasources were the same as datasets and created one for each. I can't find a difference in any of them; except their name.
Is there any good reason to do this?
Should they all have been changed to be something generic like "ConnectTo{servername}Production.RDS (instead of {Report Name}.RDS)??? What is the easyiest way to change them all to the same RDS file?
How to transfer data in a table in dataset to a table in sql server ? i.e. I want to transfer the table values in excel to a table in sql server. I have populated the excel table in a dataset. I just want to know how to transfer from dataset to sql server.
I have a dataset that uses generated stored procedures to do its select, insert, update, delete. I am inserting a row to that dataset, and after the update, using the ID of newly created row. This worked just fine until I added triggers to some of the tables on my DB, and now, when I insert a row, the row's ID is not available after the update (it's 0) Any idea what happened / what I have to do to fix this? Thnx!
Hello Team i want to insert more than one row to the dataset before update the sqladapter for ex i want to insert rows for orderlines then i send them all to sql by updating adapter is it done by javascript ? because when i press the button a postback hapend then it clears the dataset so the new row clears the old one any idea Thanks lot
Hi, I am trying to figure out how to update a dataset. Below is my sample code but it gives me this error on the mySqlDataAdapter.Update line.Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information. I looked around and it seems like I'm supposed to add a Primary Key but I did that and still get nothing. Below is my page load code... it is based on the quickstart at http://quickstarts.asp.net/QuickStartv20/howto/doc/adoplus/UpdateDataFromDB.aspx but I'm still having trouble and not sure what I'm missing. 1 // Create a new Connection and SqlDataAdapter 2 SqlConnection myConnection = new SqlConnection("Server=localhost;uid=user;pwd=password;database=northwind"); 3 SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter("Select * from Customers", myConnection); 4 DataSet myDataSet = new DataSet(); 5 DataRow myDataRow; 6 7 // Create command builder. This line automatically generates the update commands 8 // for you, so you don't have to provide or create your own. 9 SqlCommandBuilder mySqlCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter); 10 11 // Set the MissingSchemaAction property to AddWithKey because Fill will not cause 12 // primary key & unique key information to be retrieved unless AddWithKey is specified. 13 mySqlDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; 14 mySqlDataAdapter.Fill(myDataSet, "Customers"); 15 16 showData(myDataSet); 17 18 // Set PK of table to CustomerID ?? 19 DataColumn[] pk = new DataColumn[1]; 20 pk[0] = myDataSet.Tables["Customers"].Columns["CustomerID"]; 21 myDataSet.Tables["Customers"].PrimaryKey = pk; 22 23 // Edit some data 24 myDataSet.Tables["Customers"].Rows[0]["ContactName"] = "Maria Anders2"; 25 //DataRow myDataRow1 = myDataSet.Tables["Customers"].Rows.Find("ALFKI"); 26 //myDataRow1["ContactName"] = "Maria Anders2"; 27 28 showData(myDataSet); 29 30 //Update DB 31 mySqlDataAdapter.Update(myDataSet, "Customers"); 32 Thanks!