Answer Questions
Kent Boogaart Getting the latest data from different fields in one SQL - SQL Server 2000
Hi, I'm trying to write some SQL which will give me the following result from the table below.. Currently I can do each of the PRICEx fields in a seperate query then join the results together. I do this by getting the MAX(Date) WHERE PRICEx IS NOT NULL then using that date to get PRICEx, and then repeat until I've done all the PRICE fields. This is acceptable for a small selection, but for a large selection this can get quite slow. I was just wondering if there is there a way to do this in one single SQL without having to join the table to itself 3 times (for all 3 PRICE fields) Interesting performance note, and they definitely make a lot of sense. The method I showed you onl ...Show All
Always Learning Synchronizing Tables
Scenario regarding SQL 2000. I have the same table on 2 different servers, Server R and Server L. This table schema is: ID int not null Name varchar(50) not null Password varchar(50) not null IsUpdate int not null default (0) People has an application that enables them to change their passwords in the table on Server L. There is a for update trigger in the table on server L that sets IsUpdate column to 1 when any password has been modified. The required scenario: - Synchronizing passwords in the table on server R with passwords in the table on server L. - Then setting the IsUpdate column in the table on server L to 0 again. What is the best technology for that Please send me a code proposal. Many Thanks and Best Regards, Bishoy ...Show All
Jamie Thomson Dynamic Date Parameter in Report Manager
Hi all, I was wondering if there's a way to override the default date parameter of a report to a dynamic value such as Today(), Now(), DateAdd(),... through Report Manager. I know this can be done in Report Designer, but never been successful when I try to change the date parameter value in Report Manager. I've tried to change the date parameter value by clicking on the Override Default button in the report's properties page from Report Manager, error like the one below will be shown after I entered Now() in the Default Value field and clicked Apply: The value provided for the report parameter 'StartDate' is not valid for its type. (rsReportParameterTypeMismatch) Thanks in advance. Does anyone have a solution to the o ...Show All
SunHunter Bulk Insert from CSV - trouble with .FMT
I need to bulk insert from multiple files which are comma-separated with quotes as delimiters around each column. I cannot use DTS because the filenames are variable (unless someone knows how to get DTS to read 'DIR *.csv' and then load each file ) This .fmt doesn't work because SQL sees "","" as "" - meaning no terminator - then ,"" where it expects whitespace. 8.0 6 1 SQLCHAR 0 1 "","" 3 Prefix SQL_Latin1_General_CP1_CI_AS 2 SQLCHAR 0 1 "","" 5 Forenames SQL_Latin1_General_CP1_CI_AS 3 SQLCHAR 0 1 "","" 4 Surname SQL_Latin1_General_CP1_CI_AS 4 SQLCHAR 0 1 "","" 6 Job_Title SQL_Latin1_General_CP1_CI_AS 5 SQLCHAR ...Show All
Sam Loud Clustered constraint v clustered index
I inherited a database where the designer uses unique clustered constraints instead of indexes for primary keys. Now as far as I can make out, there is no performance issue because it is clustered. My question is, why only create a unique clustered constraint instead of a unique clustered index My thinking is that a primary key should be ceated as an index rather than a constraint. Does it matter When you create a primary key, you have no option - you get a primary key constraint, period...behind the scenes, you end up with a unique index on the columns that make up the key and absolutely no null values are allowed. As for a unique constraint vs. unique index, it's not to say that one is any bet ...Show All
Malcolm McCaffery Service Pack 2 for SQL Server 2005 is avaliable!
If I have installed pre release SP 2 in Analysis Server 2005, should I reinstalled with relese version or it's same Thank you - Ashok This is probably a good idea. The final version of SP2 had some fixes and improvements as result of users reporting problems with CTP. Edward. -- This posting is provided "AS IS" with no warranties, and confers no rights. ...Show All
PJFINTRAX System.IO.StreamReader: The Report element was not found.
Hi, I just installed few reports on our test environment w/ SQL Server 2005. I can run the pre-made reports (.rdl) files from our developers. But when I try to create a new reports, I'm getting the following error. System.IO.StreamReader: The Report element was not found. does anyone has any ideas Thanks, Did you ever get an answer to this I'm having the same problem. ...Show All
zdrae How to use subreport functionality?
I have a master page which calls subreport one or many times. How am I going to handle this Do I need to put the subreport in table's details -row where it gets parameters as values returned by a dataset ...Show All
ackermsb Report Model Wizard
I created a data soure view that has tables from two data sources (both sql databases). when I try to generate a report model using this data source view, I get an "invalid object name" error for the first table it encounters that is not from the "primary" data source for the view. Is there something I need to do so the report model retrieves the connection strings for both data sources Any help is greatly appreciated. Thank you in advance! Thank you for the reply.. I'm not sure I understand the workaround though. I am trying to do a proof of concept for my department and we have several data sources that I need to report from. Any help I can get is truly appreciated. I've been readin ...Show All
johngarcia Writing MDF to SQL Database
Hi, I've been searching the internet for hours and the code i'm finding is just not what i'm wanting to do. Heres the story, I have a database file "MyDatabaseFile.mdf" I am making a form when you click a button I want it to create the "MyDatabaseFile.mdf" in MS SQL Server. Is this possible if so how I it something like "CREATE DATABASE MYNAME ". I jsut want the MDF file i dont want the log file inserting or anything. Is there any tools out there that anybody can recommend that will help me with T-SQL Cheers, Rob Thank you for your time thats fantastic now I know what i'm looking for! Cheers, Rob There are several ways, you can fire a sql statement using a sqlcommand against SQL Server, or u ...Show All
katesune Config error
I get this error. Does any body came across this and found some solution Compiler Error Message: CS0433: The type 'Microsoft.Web.UI.ScriptManager' exists in both 'c:\WINDOWS.000\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\websites_hrdbms\3acda2bb\a63d28c5\assembly\dl3\32deaeca\005606e1_3759c601\Microsoft.Web.Atlas.DLL' and 'c:\WINDOWS.000\assembly\GAC_MSIL\Microsoft.Web.Extensions\1.0.61025.0__31bf3856ad364e35\Microsoft.Web.Extensions.dll' I have created the application with ATLAS July CTP . currently upgraded to ASP.NET AJAX BETA 1. I face the above problem Ramanan wrote: I get this error. Does any body came across this and found some solution Compiler Error Message: ...Show All
FannwongCindy Predict Probability in Decision Trees
Hello, I installed the bike buyer example and i am learning the DMX language. Now i wrote the following query (using MS decision trees): SELECT T.[Last Name], [Bike Buyer], PredictProbability ( Predict ([Bike Buyer])) AS [Probability] From [v Target Mail] PREDICTION JOIN OPENQUERY (....... And so on..) Now the result is surprising to me. In the resulttabel all the probabilities are equal. Bike Buyer Probability 1 0.99994590500919611 0 0.99994590500919611 0 0.99994590500919611 0 0.99994590500919611 0 0.99994590500919611 1 0.99994590500919611 and so on. Now i am wondering what predictProbability means. I thought that PredictProbability meant the probability that the prediction is correct. Now all the probabi ...Show All
volleynerd Best Practice/recommendation dev data maint plans
We are working on converting to SQL 2005 database. During the conversion we are having to rewrite a lot of code and doing a lot of intital testing and development on development data. This is causing our transaction logs to really big. I have created a maint plan that runs nightly that does a back up of database and tran log but throughtout the day the tran logs are getting really big and eating up a ton of disk space. Does anyone have suggestions on what sort of maint plan I can setup to run on my developement data where as at this point I am not concened about being able to roll back the database just keep is small as possible and "healthly" All ideas are appreciated Thanks Chris Hi, If your database has rec ...Show All
Mykhaylo Blishch CE support from ASP.Net 2.0
MS states that CE does not work with ASP.Net applications 'by default'. What is needed to change this default Bascially, my desktop app. is configured from a browser app. (ASP.Net 2.0) and I want to use CE as the datastore for the application. Thanks. Access is now officially unsupported. That is part of the problem. - A On a hosted website often one doesn't have a choice over the database. .mdb works fine for me on my relatively low access site. As OLEDB and SQL Server were not possible then there are few choices. Perhaps MySQL is another option. What programming language are you using to access the database Perl/python/Php Access files (.md ...Show All
Johan J Help with SQL
Hi, i hope i posted int he appropiated forum. I hope you can help me with an sql sentence i dont know how to do,... The problem is that i have a database with fields like this: name, adress, etc.... , phone number but sometimes, i get them like this: paul, ... street... , etc... , 776509332 paul, ... street... , etc... , 234536445 paul, ... street... , etc... , 567847345 The client si the same, but he has more than one phone number.... I need to do, somehow, another table that makes this kind of duplicates to dissapear, and joins the phone numbers in an unique field for that person, so it will in the end look like this: paul, ... street... , etc... , 776509332 234536445 567847345 Can anybody help me Thanks ...Show All
