My project is to automate testing of Stored Procedures
of type SELECT (at least for now).
I want to create a table where each stored procedure's
input parameter values are entered and in another table
the expected result value(s) are entered when executed
against a sample database containing manually entered
and verified data.
My current problem is that the stored procedures' input
parameters range from none to 50 parameters (ok now
that I think of it maybe this SP with 50 parameters is an
INSERT SP; regardless let's assume I have SPs that
require 10-20-30+ parameters).
My other problem is each stored procedures' returned
result could fall into any of these four categories:
- 1 row, 1 column
- 1 row, many columns
- many rows, 1 column
- many rows, many columns
So far I thought about 3 ways of storing the data:
1- 1 large table with 50 columns that can hold various
number of input parameter values. Similar type of table for
holding the output result for the four categories above.
2- 1 small table holding one value per row. All kinds of joins
with other tables to indicate which SP and which column the
value belongs to...
3- 1 individual table per stored procedure, this way the number
of columns in the table would match exactly the number of input
parameters.
Obviously the above 3 categories could apply both for the input
and output data.
Now I'm still in research mode and I haven't decided on any choice
yet. And I know each approach has serious consequences; let's just
say they are all with some limitations.
Has anyone dealt with this scenario before? This is the first time I
need a table to hold various types of returned data.
Just to give some numbers: possibly a few thousand SPs and very
likely each SP would have more than one test scenario.
Is it possible in the SSRS Report Designer to rotate a textbox to run vertically, or simply to rotate the text in a textbox ? I have only seen this done within axes lables of charts, but not text boxes.
In sql server, multiple instances of data default to a row display or vertical. I need a set of data in sql2005 to view horizontally so I can us it in a crystal report. Here is my issue. gift.HonorKey, gift.HonorName, gift.HonorId 1211 Smith 1222 1244 Owens 4155
I need for the data to read like this: HonorKey1, HonorKey2, HonorName1, HonorName2, HonorId1, Honorid2 1211 1244 Smith Owens 1222 4155
the table name is gift_view
I would like to be able to create a view in sql analyzer, then save as an SQL View My direct email is jackfam@comcast.net
I have a table in which records are inserted daily and with them i am storing the dates also. Now in SSRS i need to show the data for one week . The format should be like :
In above example Business Name , Phase, Activity will repeat lonely but its work description will be generated in next section according to that business name and that date. How to achieve this task ? I have referred : [URL] ....
Any way to merge cells vertically in SSRS 2005? I know w can do it horizontally by right clik, then select "merge cells". How about vertically? Thanks.
I have two tables with 250 columns each and I have a common column between the two. I need to merge them vertically to make it a bigger table. I mean I need a table with 500 columns. Both the tables have same no. of rows. I am lost on how to go about it. Any help would be really great.
I have a query to run, but the data in the tables are stored horizontally. I want the query to output the result vertically.
e.g. if row 1 contains the following data: custA,3-april2008,mango's,123,456,78,10
Then i want it to output as follows: custA,3-april2008,mango's,123 custA,3-april2008,mango's,456 custA,3-april2008,mango's,78 custA,3-april2008,mango's,10
hope I'm clear, and would appreciate if someone could help me.
I would like to print a report that is 64x64 matrix. I want the columns to be narrow and the headings for the columns to be vertical like is possible in excel. The text for the heading fields also comes from a stored procedure.
I have hunted and pecked around but I cannot seem to find an option that sets the orientation of the text for a text box to vertical.
Is there one?
If not, does anyone have a suggestion as to how I can make these column headings vertical and nicely fomatted all the time? Again, looking for the same effect as in excel.
In query editor I displayed a single row from a table. The row is so long that I need to scroll horizontally back and forth to check out it's fields. Using t-sql (or otherwise) can I display the row like this: (vertically)
I have a query that based 2 tables. I wrote a query with a left join on the base table but the result set returns multiple rows for each occurrence in the second table because of the left join. I want but to return all records from on table A and only matching records from table B which id but I would wan tit to keep return them vertically as the because it make it difficult to read when put in a spreadsheet. It want it to return the values horizontally so the rows are not increasing for each occurrence on table b.
I am using ssrs 2012 using sql server 2012. I have grouped by project name in the header now it is repeating horizontally i need to repeat it by vertically using project name grouped by column.
I am new in SSRS 2012.I have created a rdl,in this rdl, am having a row group.In this report, other two columns has multiple rows and some rows having data and some other rows doesn't have data.So I want to create rows when the row of that particular column has any data or need to merge vertically with the row having data and row don't have data of particular column along with the Common Row Group Data
I would like for each of the queries to have all of the selected fields shown horizontally in one table.
For example, Commercial Created | Commercial Closed | Commercial UserId | Residential Created | Residential Closed | Residential UserId | Other Created | Other Closed | Other UserId.
Here is what I have now and it is displaying the fields as I would like them to. In the code below, each Views is acting as an individual table and then joined together to make another table when the query is executed.
WITH t1 AS ( SELECT vSalesReportProcessDetail.[RequestId] ,vSalesReportProcessDetail.Process ,vSalesReportProcessDetail.Entered ,vSalesReportProcessDetail.Closed /*ROW_NUMBER() over (ORDER BY vSalesReportProcessDetail.[RequestId]) rn*/ FROM[Sales].[dbo].[vSalesReportProcessDetail] WHERE Process = 'Commercial' ),
I'm trying to append rows horizontally - I'm using the "xml path" approach
SELECT E.[USER_NAME] As 'User Name', ( SELECT ',' + C.[PERMISSION_NAME] FOR XML PATH('') ) As [Associated Groups] FROM TABLEA As A JOIN TABLEB AS B ON A.PK_OBJ_ID = B.FK_APP_OBJECT_REF JOIN TABLEC AS C ON C.PK_PERMISSION_ID = B.FK_PERMISSION_REF JOIN TABLED AS D ON D.FK_PERMISSION_REF = C.PK_PERMISSION_ID JOIN TABLEE AS E ON E.PK_PERSONNEL_ID = D.FK_PERSONNEL_REF WHERE A.[OBJECT_NAME] = 'MyObjectName'
It's not working. I'm getting:
User nameAssociated Groups A. SmithG1 A. SmithG2 A. SmithG3 etc...
What I'm looking for is:
User NameAssociated Groups A. SmithG1, G2, G3 etc...
I have a very wide report that uses a table control. I would like to "freeze" the two leftmost columns so that they remain visible when the user is scrolling horizontally (sideways). Is this possibe?
I have a client with the following table structure: ItemNumber, Name, Description
containing the following Data (example):
ItemNumber
Name
Value
6473764
SDRAM
4GB
6473764
Xeon
2300 Mhz
6473764
Video
256 MB
6473764
Bus
1300 Mhz
6473759
SDRAM
2GB
6473759
Xeon
2000 Mhz
6473759
Video
128 MB
6473759
Bus
1066 Mhz
I am trying to use PIVOT to convert this into Columns:
Item Number
SDRAM
Xeon
Video
Bus
6473764
4GB
2300 Mhz
256 MB
1300 Mhz
6473759
2 GB
2000 Mhz
128 MB
1066 Mhz
The problem is that I do not know the names of the columns before I run the query. I retrieve them based on a a list of Item Numbers: SELECT DISTINCT Name FROM TableName WHERE ItemNumber IN (...)
What I was trying to do is the following, but I am not exactly sure what is wrong:
WITH ProductLines (ItemNumber, ItemName, ItemValue) AS ( SELECT ItemNumber, Name, Value FROM ProductItems WHERE ItemNumber IN (...) )
SELECT * FROM ProductLines -- Don't know the column names PIVOT (
... -- Not sure what should come here FOR ItemNumber IN (...) )
I'm trying to figure this out I have a store procedure that return the userId if a user exists in my table, return 0 otherwise ------------------------------------------------------------------------ Create Procedure spUpdatePasswordByUserId @userName varchar(20), @password varchar(20) AS Begin Declare @userId int Select @userId = (Select userId from userInfo Where userName = @userName and password = @password) if (@userId > 0) return @userId else return 0 ------------------------------------------------------------------ I create a function called UpdatePasswordByUserId in my dataset with the above stored procedure that returns a scalar value. When I preview the data from the table adapter in my dataset, it spits out the right value. But when I call this UpdatepasswordByUserId from an asp.net page, it returns null/blank/0 passport.UserInfoTableAdapters oUserInfo = new UserInfoTableAdapters(); Response.Write("userId: " + oUserInfo.UpdatePasswordByUserId(txtUserName.text, txtPassword.text) ); Do you guys have any idea why?
hi my friends;i have got a problem.i thing you can help mea='x80x02}qx00(Kx02Kx03Kx04Kx06Kx05Kx07u. 'i want to store database but i don't know which encoding and dataytpepls help mesorry for my bed english...thanks all
we need to decide an architecture for Performance on a web site Search! I wanna use text service of SQL 2005 .But I am worried about the performance .... How should I design the system if I want the best perfomance and scalability ?1.Should I build a seperate coloumn in my every table and merge all the information into one coloumn and full text index that column.2.Put a full text index in all column in the table and use OR clause and reverse rank it for AND clause,using CONTAINSTABLE function.3.Make a different table and put _ID,_TYPE and _VALUE fields and search in that table with less coloumns.4.Seperate the full text database and search in a seperate db so that I can scale better?did anybody have a similiar problem ? Any books on full text search ?
Hi I have this stored procedure using Table Variable. ------------------------------------------------------------------------------------------------------------------------------- create procedure sp_matching @pid Int ASdeclare @tbl table (MAID int, image varchar(100)) insert @tblselect MAID, image from productswhere pid in (select top 10 mid from matching1 where pid=@pid order by newid()) select * from @tbl GO --------------------------------------------------------------------------------------------------------------------------------- When I run this sp, i have table with 10 rows. But what I really need to do is to store all data in one row like: PID, MAID1, Image1, MAID2, Image2, ..... MAID9, Image9, MAID10, Image10
How can I do this? Please help me out for this. Thanks.
Hi friends I want to add HTML to the SQL server as data please can anyone help me. which data type . & how to store the data. Thanks for all your support Thanks & regardsASPFreak
Greetings All, I was wondering if any of you would share some of yourexperiences regarding the task of loading a data store from an Oltpsource. We are using Analysis Services in a BI product that requiresdata to be pulled from one of our products, an OLTP database. Thedesign is to first run an ETL process from the OLTP source into anoperational data store, from here Analysis Services will pull its datato do its thing. Now, for small OLTP databases (< 1Gb) the storedprocs I have written to do the extraction works well, it is relativelyfast and efficient. However, we have a few databases that are 10Gb'sand the load could end up taking several hours. During this long loadthe OLTP source may be in use and I want to avoid write blocks, or if Iwere to use "select ... NOLOCK" I could get dirty data brought over. Icould used BCP for some of the big tables or Bulk Copy but I wanted tosee if anyone has dealt with this issue and what their specificresolution was for their specific problem. It is my hope that byseeing how others have dealt with this I will be able to architect asolution for my specific problemRegards, TFD.
i learned that BLOB data types are out-row data by default, i think it means it will not store in the row of table, because the max-length of a col is 8KB.
but will the system store those BLOB data? and is there any way to specify where should it be stored, like tha Partition Schema.
i am using SQL Express, so i hope it works for express.(partition does not work for express)
Now I want to insert data and create the tables: SqlDataSource ordersDataSource = new SqlDataSource();ordersDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["SpecialsConnectionString1"].ToString();
ordersDataSource.InsertCommandType = SqlDataSourceCommandType.StoredProcedure; So to insert data for the first field I need: ordersDataSource.InsertParameters.Add("@CustomerName", CustomerName.Text) Is this right? Any help is appreciated.