Answer Questions
textman How to combine MAx statement with specific search?
Hello everyone! I've got a table (of "Persons") with 2 columns: "Age" and "Name". I make a procedure that get the MAX of "Age" of the table, like this: SELECT MAX (p.Age) MaxAge FROM Persons p But I'll like to add a new column to my result table. That column corresponds to the "Age" of a person 'X'. 'X' is its 'Name' and i will pass it by parameter to the procedure. Something like this: SELECT MAX (p.Age) MaxAge, --The highest age of the table p.Age ConcretPersonAge -- The age of the person X FROM Persons p That should returns a single row result table with the max of all 'Age" and the 'Age' of the person 'X'. Anyone can help me to do this Thank you to everyon, and a ...Show All
sameach DateTime ?
This is my table structure Date(m/dd/yyyy) 9/09/2006 I want to select month and year in the below format . Sep 2006 . How to do that Sorry Raghu, Try this.. SELECT LEFT( CONVERT ( CHAR ( 11 ), GETDATE (), 109 ), 3 ) + ' ' + RIGHT( CONVERT ( CHAR ( 11 ), GETDATE (), 109 ), 4 ) Try this.. SELECT CONVERT ( CHAR ( 6 ), GETDATE (), 109 ) Or: SELECT LEFT(DATENAME(month,'9/09/2006'),3) + ' ' + CONVERT(CHAR(4),Year('9/09/2006')) as DateYouwant ...Show All
Doug Peck Matrix Totals
Below is part of a matrix report. Sooo close, but I have two problems I have not been able to solve. Please help as a I have several similar reports to do. 1. Row totals. I have been able to get a row total by adding a row group (i.e., $849.7 in the first row). However it does not display a group total (i.e., the sum of $849.7 and $371.3 for Economic Development) for that column. I have not been able to add a static column outside of the dynamic groupings. I thought this might be a resolution by displaying the sum of the Estimated Costs in a static column and hoping it would show the group totals the same as with the dynamic column totals. Is there a way to do this 2. Sorting. The report needs to display the groups based on the de ...Show All
farkbert Import/Export data with SQL Server 2005 Express
Hello folks! I have installed SQL Server 2005 Express and SQL Server Management Studio Express. Everything looks ok and works fine, but I can't find the Data Import/Export Wizard. Can anyone tell me how to Import/Export data Thank you!!! There is a company that makes a whole bunch of db converters. I just used one of them to convert from Access to MS SQL Express: http://www.convert-in.com/acc2mss.htm They have a demo that will convert the first five records from each of your tables if you'd like to try it out before you buy. Wolfey305 wrote: If you have MS Access, you can simply export directly to your SQL Server data base by creating an ODBC link ...Show All
Helio Gomes AMO: Hanging on Partition.Update
I am using AMO to manage partitions. I am trying to create a partition then use the Update method to create the new partition.. snippet of code below: 65 //create the new partition 66 Partition newPartition = mg.Partitions.Add(partitionName, partitionName); 67 newPartition.StorageMode = StorageMode .Molap; 68 newPartition.Source = new Query ...Show All
buckenn AGGREGATE doesn't do MIN/MAX on textual columns
Hi, Can anyone from MS exaplain why the AGGREGATE component doesn't allow you to select MIN/MAX when the column is DT_STR/DT_WSTR Thanks Jamie Anyone How about including it because it's valid transact-sql to use it on non-numeric fields It'd be better to allow for the aggregate functions to work as they are supposed to according to the MS Transact-SQL documentation. It's also better to use an aggregate transform in my package rather than having to query outside of the datastream to do something that should've been included in the first place. For a given group of records, I want to, for instance, find the minimum text value in a column -- I shouldn't need a script to tell me that. If you consider add ...Show All
kundalani Report Parameters and Jump To Report
Greetings, I have two reports, Report A and Report B. Report A has two parameters defined as "Prompted", meaning the report input area is available for the user. Report A parameters ---> StartDate, EndDate When Report B invokes Report A using the Jump To Report Functionality and passing Report B's StartDate and EndDate parameters, Report A seems to think the parameters are implied and not needed and fails to drop down the parameter input area. This is not desired because the user should be able to change report A's parameters. Anyone know a workaround When I test the reports in Firefox the parameter input area is always expanded. This maybe due to rendering of ...Show All
samcneal Error when deploying report to server
I'm trying to deploy my report to the server but keep getting the following error. does anyone know how to fix or is there some steps on how to set up the server to allow this Error 1 The permissions granted to user 'GIP-SQLTEST\IUSR_GIP-SQLTEST' are insufficient for performing this operation. 0 0 Thanks, This has been changed but I still can't deploy my report to the server it a local system account on the SQL Box, you will find however it has no rights by default to your db. You will see it if you look at the config settings of ssrs on the server I don't know where the error message is getting this user. This is not my username on this machine nor does this user have access to the server. I'm stumped. ...Show All
Gunston SQL 2000 SP4 and SQL 2005
Is it possible to have 2 SQL servers differents in the same machine I need to continue to use a DB on 2000 for an old services on BI and start to use SQL2005 for a new application and all in my laptop in order to be able to use them every where. Thanks It should be ok. I currently have both 2000 and 2005 installed on my laptop and I never had any problems in terms of compatibility. So far so good The only issue you might hit is if you are running Analysis Services on your SQL 2000 install. This component cannot run side-by-side with SQL 2000/2005 and must be upgraded. As for the database engine and any existing instances, they'll run fine side-by-side. Thanks, Sam Lester (MSFT) ...Show All
James Asher Deploying multiple files through a package
Hi I am working on on SQL Server Integration Services and facing few problems in it. Actually am supposed to create a package that would automatically pick excel spreadsheets with a specific format and import it onto the SQL server. (Lets say , there is a company named AB and they have got various products named CD,EF and GH and each product has its own spreadsheet in which its monthly sales(JAN, FEB,...NOV, DEC) is given. So i have to build a generic package for each product (lets say CD) so that i don't have to import every spreadsheet seperately for each month. To summarize i just have to build a package where i can deploy the various spreadshhets again and agian instead of building a package for each and every month spreadsheet s ...Show All
Evan Mulawski Issue Exporting Date format to a delimited file.
In exporting from a OLEDB connection to a flat file. In the originating table the field for DOB is in a varchar(10) format ex. 01/17/2007. The flat file connection destination is setup as a DT_STR. When you look at the OLEDB connection table preview you see it as 01/17/2007. When it is export to the delimited <CR><LF> <|> pipe delimited the format looks like this 01/17/2007 00:00:00. The issue would be resolved with a right ragged fixed width file. But this is not the requirement for the project format fot the file. I have tried delete and recreating the connections, and even tried doing a data conversation from the OLEDB connection to a char(10). Also, thourgh the transformation services with out any luck. On the flat ...Show All
albTotxo WMI Datareader
I defined a WMI data reader that performs the following query and logs the data into an Object Variable. Query: Select Name, Filesize, LastModified from CIM_Datafile WHERE Name = 'c:\\test.txt' The query performs succesfully and I can log the destination to an output file or a variable. (Outputtype property name and value, property value). However when I log to Data Table the destination variable I created as type Object also is populated. How can I now retrieve those values from the Datatype Destination variable I defined ...Show All
anderskj1 buckets or quartile
Hi all, Dreaded moment has come:) I need to produce a report against MSAS 2005 with quartiles buckets, meaning that besides actual value of the measure, it needs to display following: Value 1st 2nd 3rd 4th X Min - Max Min - Max Min - Max Min - Max ------------------------------------------------------------------- 80 85 - 95 75 - 85 55 - 75 12 - 55 where 1st is range of values of top 25% performing entities and so forth. It's supposed to be sliceable by any hierarchy in the cube. I tried to use TopPercent 25%, but never could get it work in calculated member. Any idea, comment, reference highly appreciated. Thanks Can you use the Descritization ...Show All
Subby Dev Error: Transaction context in use by another session
I am programming in ASP and SQL server. I am using this tag <% Transaction =Required %> to do the transaction. And it woks well, but the problem is that sometimes I get this error: "transaction context in use by another session" ... It's really weird because it only happens in the same row. If choose this row to be shown I get that message, but if choose another row I get result with no error. And if take out the tag <%Transaction... I don't get any error. I've searched in other forums about this error, and one guy claims that there is a bug in the MTS and there is no way to solve the problem. Actually, the transaction is done only by using this tag <% @ Languag ...Show All
lcj Setting collection element value using expression fails
I'm trying to set the value of the SelectedDatabases collection property of an Update Statistics Task using an expression for the task, basing it on a user variable. Ultimately, I'll set that variable's value from a configuration file at run time and thereby specify the database whose statistics I want to update. When I set this up in the designer, I get an error at the time I try to save the package: TITLE: Microsoft Visual Studio ------------------------------ Nonfatal errors occurred while saving the package: Error at Update Statistics Task: The result of the expression "@[User::SelectedDatabase]" on property "SelectedDatabases" cannot be written to the property. The expression was evaluated, but cannot be s ...Show All
