Answer Questions
zwp Select GetDate() Just the month or year
I wonder if someone can help me with getting JUST the month and year from SQL DB. Using the Select Getdate() Statement. If I need to use another one that would work that would be appretiated as well. Thanks! select month (getdate()), year(getdate()) I brought a smile to me also! If you want chars and need the leading zeroes: select right ('0' + convert (varchar (2), year(getdate()) % 100), 2) ( Thank you for the smiles; they are welcome ) Dave :-) There are several ways to accomplish your task. In Books Online, look up [Functions], then [Date and Time Functions]. To retreive the current month as a number, use: SELECT month( get ...Show All
Bobbias Problem using an AXIS Webservice
Helo: I am trying to use an axis webservice as a datasource to a report. I have an error : Failed to prepare web request for the specified URL When I run the query in query designer. I test the webservice in a windows aplication and works fine. I think that the problem I have is with the target namespace/url I am using the folowing data in the report: datasource conection string: http://191.158.134.200:8080/CatalogWS/services/CatalogWebService dataset query: <Query> <Method Namespace="urn:CatalogWebService" Name="findArticulos"/> <SoapAction>urn:CatalogWebService/findArticulos</SoapAction> </Query> And here is a ...Show All
Marek Istvanek Finding a Member
Hi, I try to evaluate a functionality to find a date-Member. Wath we need is, we search the first existing Date in our Time-Dimension, which is, say 11 days before the actual-date. Since such a Member maybe not exits, the function should return the smallest existing Date bigger then the one we are searching for. MEMBER [MEASURES].[date1] AS DATEADD("d", -11, CDate([Zeit].[Zeit].CURRENTMEMBER.MEMBER_CAPTION)) MEMBER [MEASURES].[mydate] AS FILTER([Zeit].[Zeit].[Datum].members, cdate([Zeit].[Zeit].[Datum].value) >= [MEASURES].[date1]).Item(0) It doesn’t work in that way. Can anybody give me some Help. Thank you very much. Bahram. Sorry - I didn't notice that date1 was going agains ...Show All
JasonG271009 installing the sample databases and documentation
There are two instances: SQL2005 and SQL2005Express on two different units. While there is Visual Studio 2005 Team Edition also installed on the units have not attempted these component installs through either yet. Have spent the better part of two days, following all the directions having searched help locally, online, technet,and applied their advice respectively. While I've taken out the old instances, downloaded updated ones in both my SQL Server instances they do not show as installed under Programs->SQL Server (whichever instance)->Tutorials ...However they do show installed in Control Panel and they can be found via Explorer (AdWorks DBCI+AdWorks BICI and Express instance on the other unit. Have also download SP2 and installed ...Show All
Jassim Rahma Sum from attribute properties & hierarchy from different dimension tables
I am using a star schema which has about 9 dimension tables and a fact table. One dimension table has more than 100 attributes and this table has contract limits and premium details. The fact table has the transaction data. I would like get the contract limit(number) using dimension properties function and display in the end user view. One contract has multiple years. The MDX [Contract Dim].[Contract Number]. Properties ( "Limit" ) is not summing up all years and it is not allowing to use sum/aggregate function, it just gets last year's limit. How to get the sum . My second question is about defining hierarchy from two different dimension tables that are linked using Fact table. I was able to do this easily in SSAS 2000 ...Show All
leoku Script Task and Variable Type
Hi, I am using the following code in Script Task and it is giving me the error as shown below FileCount is a variable defined as Int16 (with initial value = 0 ) and it is part of Read/Write variables portion of Script Dim FileCount As Int16 FileCount = CType (Dts.Variables( "FileCount" ).Value, Int16) Dts.Variables( "FileCount" ).Value = FileCount + 1 //Error on this Line The type of value being assigned to @User::FileCount differs from the current variable type. Variables may not change during execution. Please Guide what is wrong with this. The result produced from "FileCount + 1" is of type Integer, you are trying to assign it to type Short. Change the line to the fol ...Show All
frgu Snapshot Agent & Log Reader Agent will not start.
Hi All, I would appreciate any help here at all. I am pulling my hair out! I am unable to start the snapshot agent or log reader agent from within SQL management studio. it fails on executing step 2 with unknown username or bad password. I have checked all account details and they are correctly using my domain admin account. I can connect to SQL using teh same account and it also has sysadmin permissions. If i copy the step 2 paramters and start from the cmd prompt (again logged in using the same domain account) they both start fine. Any ideas would be gratefully received. Are you using case sensitive server This error may be caused by account name with improper casing. For example, the domain name mostly likely ...Show All
dummies Access/Server
How do you change the connection string of a DataSet We have been using MSAccess for our database, but have recently upgraded to SQLServer Express. I was able to successfully upsize the Access database and now all information resides on the server. In my VisualBasic program, the dataset itself has around 200 queries total spread out on multiple table adapters. The problem now is that none of these queries work because the dataset is bound to the Access table. I have changed connection string through code and am able to display the information, but am unable to interact with it until i get the dataset connection changed. I would rather just change the connection of the dataset somehow rather than build a new dataset, reconnect all form ...Show All
kusanagihk Differencies in triggers behavior on 2000 and 2005 SQL Servers
This code works fine on MS SQL 2000 but fails on MS SQL 2005: create database tt go --exec dbo . sp_dbcmptlevel @dbname = N'tt' , @new_cmptlevel = 80 go use tt go create table t (id int ) go create proc p as update t set id=id go create trigger t1_i on t instead of update as update t set id=id go create trigger t1 on t for update as if @@nestlevel > 5 return exec p update t set id=id go insert t select 1 go update t set id=id go use master go drop database tt go Using database compatibility level 80 (SQL 2000, uncomment the line starting with -- exec dbo . sp_dbcmptlevel... ) does not make this code work like it does on SQL 2000! We have examined this code and found ...Show All
Alberiv Ad: Problems Creating Instance in SQL 2005 management studio
Hello all, Thanks in advance for any help you can provide. I am having a problem creating a new NS instance using SQL 2005 management studio. I am using the database element in my instance and application xml files like this, in order to create the NS application in an existing database. <Database> <DatabaseName>%databasename%</DatabaseName> <SchemaName>%schemaname%</SchemaName> </Database> the problem that I am having is that if I encounter an error somewhere in the process of creating this new instance the instance name and schema name I specified are still bound somewhere, and if I correct for the error and try to create the instance again, I receive a new error ...Show All
Ants Hurdley Parameter Values Going Crazy :(
Hi all, I am having a serious problem developing my reports within VS2005. For no reason, on one of my report it seems the parameters have got a life of there own. There is a collection of 4 parameters whose values change randomly (internal, hidden, multivalue). Regardless of what I set them to, once I click save some change, when I alter 1 parameter, the values of one of the other parameters change while the settings for the parameter I changed to not apply. What is going on here, I have been developing reports without issue however this is becoming a major concern. Please help! Kind regards Taz Hello Taz, I have the same problem now. Have you found a solution for yo ...Show All
Tryst Variables / Package Execution
I have 10 or so packages with package scope variables. I would like to create a package that not only runs all the packages but also sets the variables within the packages being executed. A) Whats the best way to run all the packages from one (package ) B) Whats the best way to set the variables in the child packages, without having to change them manually everytime I run it. Thanks, Mardo A) Create a master package and call other packages in it using 'Execute Package' task. B) For each variable created (and which needs to be used outside) in a child package, create a variable with the same name in the master package. For example, if u have a variable called 'test' in a child package, create a variable calle ...Show All
Grant21763 SQL Server 2005 Install fails on Vista
During the install, I get the following message: Setup has detected a problem with Microsoft .Net Framework installation and cannot proceed. Microsoft .Net Framework 2.0 is either not installed on this system or is corrupt. I cannot uninstall 2.0, as its part of the Vista. I have tried repairing it. I tried downloading 2.0 and installing it, but it says that its allready installed. I was able to install Visual Studio with Sql Server 2005 express. I am stuck. Is the case that Sql install dosent know about the latest version of 2.0 that came with vista My laptop is a new Dell that was pre-configured with Vista and .net 3.0, which means that you can't install .Net framework 2.0 because it gives you the error that th ...Show All
Lexite Assign expression value using code
I am trying to use a variable to set an attribute value of an SSIS task but I keep running into the 4000 character limit of the string variable. Not sure why the variable which is of .NET type String has this limit when it doesn't when you are in a .NET environment. Regardless, can anyone provide some sample code that I could use to do this in a script task I am trying to set the QueryString property of the Data Mining Query Task. All help would be appreciated. Thank you in advance. All task properties support expressions, it is only Data Flow components that require the developer to actually set some code that says an expression is supported. The problem is that the result of an expression cannot be greater than 4000 char ...Show All
anubisascends Problem with &
Hai Iam using asp.net 2.0 with sql server 2005 as back end.. i need to pass the data to stored procedure via parameter containg (&) symbol for ex: If i pass string like "sample&ss" it gives the error xml parsing how to avoid this..welcome for your suggestion. Regards Senthil If the error is in parsing XML try this: "sample&ss" '&' is a special character in XML, and if you catually want to use it you need to represent it as & Or...use ASCII...it works all the time hi, ampersand doesn't seems to cause an error on Sql server as the statement below executes succesfully select 'sample&ss' ...Show All
