Answer Questions
Ben Vaughan Problem working with models
All, We are again adventuring into the manipulation of report models. I have some code that worked a few months ago, and I'm dusting it off, tweaking it and hopefully making it work. Here is the setup: We are going to create generic models that will be manipulated for each client. Here is the flow: A user will login to our existing application, and will click a link to our implementation of the ad hoc report builder. He or she will then choose one of the master models to work with. This will run my code. What I do is: read in the mastermodel chosen into a byte array. Convert the byte array to a string, replace the client id of 9999 in the generic model with the appropriate client id, convert the string back into a byte array. Now ...Show All
Sportsdude how to perform this query to return data?
I am using this stored procedure to check if user is exist and update his alread_loggedOn field.. IF EXISTS ( SELECT login_user_id , login_password , person_name , staff_active , is_staff , company_id FROM persons WHERE login_user_id = @login_user_id AND login_password = @login_password AND is_staff = 'Y' AND staff_active = 'Y' AND already_loggedon = 'N' ) BEGIN -- Insert statements for procedure here UPDATE persons SET already_loggedon = 'y' WHERE login_user_id = @login_user_id AND login_password = @login_password AND is_staff = 'Y' AND staff_active = 'Y' END ELSE -- RAISERROR('This value already exists.', 11, 1) RETURN 1073 b ...Show All
Atul Bahl Hide some columns in Matrix but not in subtotal
Hi all, I would like a matrix that look like this: 2006/01 2006/02 2006/03 Total % % % % Amount Amount Class. BU1 98,82% 78,53% 88,12% 88,49% € 217.763.099,50 € 207.328.766,75 BU2 64,98% 32,53% 92,19% 63,23% 5.093.781.522,65 € € 287.731.766,75 BU3 74,71% 45,78% 78,69% 66,39% € 847.871.349,50 € 819.123.124,75 I want detailed subtotals but I don't want the "Amount" and "Amount Class." values in the details of my Matrix. I've not found other w ...Show All
qt1h00 Any MySQL ENUM eqvivalent in MSSQL?
Hi, Can't seem to find a similar data type in MSSQL like the one very handy ENUM type existing in e.g MySQL: ... Enum('on','off','standby') ... It's also a convinient way to check for true/false. I'd appreciate any suggestions on possible "workarounds" or sources that might point me in the right direction. Best You could use a Rule or a Check Constraint. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Zero_ Joins vs SubQueries
Hi, Can any one please let me know which one is better in performance, Joins or sub-queries Any other differences between joins and sub-queries plz let me know. Thanks Pradeep pradeepyr: I would suggest that the best way to answer your question is to take quick benchmarks whenever you have doubt. In general (1) look at the execution plan, (2) query execution time and (3) query IO statistics and judge based on this information. This is all information that is readily obtainable from the Query Analyzer in SQL Server 2000 and SQL Server Management Studio in SQL Server 2005. Dave joins and subqueries solve different purposes, and cant ...Show All
Brian2 copying tables from 2000 to 2005 express
I have a rather sizeable SQLServer 2000 database. To work on an issue, I would like to copy just a couple tables into SQL Server 2005 Express. How does one go about this efficiently You are right, there are no tools for that. What about either doing a backup / restore on the databases OR do a manally SELECT INTO with using linked servers Another option would be to script the structure and then script the data from the table and execute the data script on the other server. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- Sure, but might have a look in the BOL about adding linked servers. In common if you don’t have the GUI to administer linked servers ...Show All
shishio Getting records in a line (commalist)
Hi, i searched for many hours now and I need help from the community ;) I have a list of records and want to include the records as a comma sperated list in an other select statement. I tried it with std. SQL and later with T-SQL, and I am sure it will work ith a stored procedure, but I am not that professional in this (try to learn...). Background: I have a lot of data (users) and want to create a records set without having the data processed in my scripts. So i have: records in table krgroupusers (example data): lgroupid, luserid 3 , 1 3 , 48 4 , 1 197 , 1 197 , 48 197 , 250 197 , 251 207 , 1 207 , 250 Weiter habe ich eine Tabelle kruser (example data): lid, strusername , strmail 1 , Administrator , admi ...Show All
ChrisBarth1 Replicating Schema Changes
Hi there, I'm using Sql 2005 merge replication and I have noticed something, I'm not sure if this is true or not:... My publication is set to replicate schema changes (replicate_ddl = 1). Now, I have noticed that schema changes are only replicated if the current snapshot is valid. Is this right If so why My next question carries on from the first. If I'm about to run a TSQL script on my publisher that will add a column or two to a published table, how do I ensure my snapshot is valid inorder for the ddl changes to be replcated Should I be using: EXEC sp_mergearticlecolumn @publication = <publicationname> , @article = <article name> , @force_invalidate_snapshot = 1 , @force_reinit_subscriptio ...Show All
zapacila89 changing "header rows to skip" property in flat file connection during runtime
Hi all I have a flat file.I am trying to set the value for the property " HeaderRowsToSkip " during runtime.I have set an expression for this in my "flat file connection manager". But this is not working.The connection manager is not able to take the value during runtime . My expression is as follows: DataRowsToSkip : @[user:: Var] where " Var " is my variable which gets the value from the rowcount component and trying to set it back to the "HeaderRowsToskip" property. I ve even tried setting the value to the " HeaderRowsToSkip " property in the expression builder. Its not working.... Can anyone help me out in solving this Thanks in advance Regards Suganya ...Show All
radek_m VS 2005/SQL Reporting Services/storedprocedure tmp table problem
hi, i am trying to design a report (.rdlc) in VS2005 where the data source is a stored procedure which uses a temperory table (#temp_SM) and at the end of this stored procedure I have something like .. select Sample_collection_num , ProductSeln , message , convert(varchar(10),sample_schedule_date,103) as sample_schedule_date from #temp_SM drop table #temp_SM GO Now the problem is in Visual sudio2005 when I am creating a new dataset with the source as this stored procedure it is saying : Invalid object name '#temp_SM' and the result is I cant see any fields in the Data sources explorer...... hence cant add anything to the report...... Any help is greatly appreciated.... Thanks in advance ...Show All
txteacher MAJOR PROBLEM: New SQL2005 installation performance problem.
We are experiencing a major issue since upgrading from SQL2000 to SQL2005 over the weekend. Starting today, it appears that the performance of SQLServer reaches a limit every 15 minutes. Our configuration is as follows: Window Server 2K3 x64 Enterprise SQLServer 2005 x64 Enterprise HP DL585 with 4 dual core Opterons 32 GB of RAM 2 TB EMC SAN At first, I thought there was a memory pressure problem, since I had the default max memory set. After changing the max memory to only 25 GB (out of 32 available), the issue went away temporarily. However, after 15-20 minutes, the number of batches/sec dropped in half, and remained after half until I changed the max memory setting again. Over the course of the day, I was able to fi ...Show All
Vasanth Thangasamy How to edit a asp.net2.0/C# project in VS2005, Plz HELP
Hi, How can i run or edit my ASP.NET 2.0/C# project in VS2005. I have source code files (including database) but it doesn't have .sln file. Please guide me how can i edit or run this in VS2005 Thanks for the help. which files are necessary, while sending ASP.NET 2.0/C# project (for further development) to the developer, like .sln files, database. please write the name of other files. and how to open that project in VS2005. Thanks vkkv Every file except *user files as they store user specific information. HTH, Jens K. Suessmeyer. --- http://www.sqlserver2005.de --- Hi, if you are missing the sln file, you should create a new web project and import the existing files to your sol ...Show All
TrevorHughes How to compare SQL server stored procedures from two separate databases?
Is there a straight forward way or a tool to compare SQL server database objects, such as stored procedures located in separate databases There are several free tools that do this. The one that I use is SQL Effects Clarity CE. It compares tables, stored procedures, views, functions, users, roles, etc. You can download it here: http://www.sqleffects.com/sfxClarityDetails.html Hope this helps. Well, the way that I always do it is to use the RedGate SQL Compare tool. www.red-gate.com . It works very nice and will compare everything, including permissions. There are other ways, and Buck Woody (who I have seen around the forums) has an article here that covers it pretty well: htt ...Show All
arooni Dynamic Security Stored Procedure Repeatedly Called
I have implemented an SSAS stored procedure for dynamic security and I call this stored procedure to obtain the allowed set filter. To my supprise, the stored procedure is being called repeatedly many times (more than 10) upon establishing the user session. Why is this happening > The allowed set expression is StrToSet(<call to stored procedure here>). The stored procedure returns a comma-seperated list of the allowed members in the format [DimensionName].[Security Filter].&[key]. This is not a good practice. Much better approach is to use Server Adomd.NET object model and return AdomdServer.Set from sproc instead of giant string. But since you query database table, I wonder whether you ...Show All
IS dude Future with SSIS
Hi, We have a NT service built via Visual Basic 6 which fires dts processes on demand according some criteria. Well, on the whole and basically only for the following rule: -dts process is executed when our service recognize a concrete plain file leaved in a folder. It’s generally generated for a mainframe JCL along with a activator file (.nul file, empty). Each application own a folder and each folder have lots of files as the aforementioned ones. Scheduler for that is an ASP application that lives within a intranet. It also is a monitor and logger In that schema, keeping on mind that eight out of ten are ETL processes, critical ones and on daily-basis, our question is, how to handle on with this stuff using ...Show All
