Search Results

Search found 4908 results on 197 pages for 'ssas 2005'.

Page 80/197 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Computed column should result to string

    - by strakastroukas
    Here is a snap of my database. Both col1 and col2 are declared as int. My ComputedColumn currently adds the Columns 1 and 2, as follows... col1 col2 ComputedColumn 1 2 3 4 1 5 Instead of this, my ComputedColumn should join the columns 1 and 2 (includimg the '-' character in the middle) as follows... col1 col2 ComputedColumn 1 2 1-2 4 1 4-1 So, what is the correct syntax?

    Read the article

  • Dynamic table design (common lookup table), need a nice query to get the values

    - by Swoosh
    sql2005 This is my simplified example: (in reality there are 40+ tables in here, I only showed 2) I got a table called tb_modules, with 3 columns (id, description, tablename as varchar): 1, UserType, tb_usertype 2, Religion, tb_religion (Last column is actually the name of a different table) I got an other table that looks like this: tb_value (columns:id, tb_modules_ID, usertype_OR_religion_ID) values: 1111, 1, 45 1112, 1, 55 1113, 2, 123 1114, 2, 234 so, I mean 45, 55, 123, 234 are usertype OR religion ID's (45, 55 usertype, 123, 234 religion ID`s) Don't judge, I didn't design the database Question How can I make a select, showing * from tb_value, plus one column That one column would be TITLE from the tb_usertype or RELIGIONNAME from the tb_religion table I would like to make a general thing. Was thinking initially about maybe a SQL function that returns a string, but I think I would need dynamic SQL, which is not ok in a function. Anyone a better idea ?

    Read the article

  • Does ASP.net Report Viewer / Reports require Reporting Services on SQL server

    - by soldieraman
    I have an application that makes use of Report Viewer and Report (.rdlc) files. Does this mean that I need to have "Reporting Services" installed on my SQL server?? Also would not having "SQL Server Analysis services" affect me any way I want to make sure I keep using - SQL Server Profiler - SQL Server Agent - create and run management tasks - Reporting services if the first question's answer is true.

    Read the article

  • Do Instances Share Same Services? - SQL Server

    - by peace
    Lets say i installed two named SQL Server 2008 instances e.g. A and B, will i have two services of each type e.g. two analysis service, two reporting service and so on, one service for A and the other for B? If yes, then it is known a service listens on a port number, how two same services going to listen on the port? I hope this is clear enough. Thanks

    Read the article

  • Power error handling inside of sql function

    - by user172062
    I have a power function call inside of a sql function. What is the correct way to handle overflow and underflow conditions since I cannot use a Try Catch inside of a function. I am also trying to avoid modifying the ARITHABORT, ANSI_WARNINGS, and ARITHIGNORE settings in the calling code. GO CREATE FUNCTION TestPow() RETURNS DECIMAL(30, 14) AS BEGIN DECLARE @result FLOAT SET @result = POWER(10.0, 300) RETURN @result END GO SELECT dbo.TestPow()

    Read the article

  • Table Valued UDF vs Views

    - by vaibhav
    I have never used UDF in sql server. Today I got to know that we can have functions which can return a table. So I just wanted to know can I use functions in place of views. If yes, which one is the better choice and why

    Read the article

  • Use SQL to filter the results of a stored procedure

    - by Ben McCormack
    I've looked at other questions on Stack Overflow related to this question, but none of them seemed to answer this question clearly. We have a system Stored Procedure called sp_who2 which returns a result set of information for all running processes on the server. I want to filter the data returned by the stored procedure; conceptually, I might do it like so: SELECT * FROM sp_who2 WHERE login='bmccormack' That method, though, doesn't work. What are good practices for achieving the goal of querying the returned data of a stored procedure, preferably without having to look of the code of the original stored procedure and modify it.

    Read the article

  • update SQl table from values in excel

    - by user175084
    I am using the SQL Developer or SQl express. How do i get the values from an excel sheet and update those in a column of my database... Please help thanks. i have this and im running it but i get error: SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\books.xls', 'SELECT * FROM [Sheet1$]') i get error now OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "Could not find installable ISAM.". thanks

    Read the article

  • APplication performance issue : SqlServer & Oracle

    - by Mahesh
    Hi, We have a applicaiton in Silverlight,WCF, NHibernate. Currently it is supporting SQL Serve and Oracle database. As it's huge data, it is running ok on SQL Sevrer. But on Oracle it is running very slow. For one functionality it takes 5 Sec to execute on SQL Server and 30 Sec on Oracle. I am not able to figure out what will be issue. Two things that i want to share with you about our database. 1) Database: contains one base table contains column of type SQLServer: [Text] Oracle: [NCLOB] 2) Our database structure is too much normalized. May be in the oracle i have used NCLOB, that is the cause of the performance. I mean i don't know the details about it.... Can anyone please let me know what will be cause? Or Which actions do i need to follw to improve the performance as equal as SqlServer.? Thanks in advance. Mahesh.

    Read the article

  • Help with a t-sql query

    - by user324650
    Hi Based on the following table Path ---------------------- area1 area1\area2 area1\area2\area3 area1\area2\area3\area4 area1\area2\area5 area1\area2\area6 area1\area7 Input to my stored procedure is areapath and no.of children (indicates the depth that needs to considered from the input areapath) areapath=area1 children=2 Above should give Path ----------- area1 area1\area2 area1\area2\area3 area1\area2\area5 area1\area2\area6 area1\area7 similary for areapath=area2 and children=1 output should be Path --------------- area1\area2 area1\area2\area3 area1\area2\area5 area1\area2\area6 I am confused how to write a query for this one.

    Read the article

  • Linq to sql Incorrect varchar length

    - by scott
    I have a table with a nullable varchar(50) column in it. When I am updating the value through linq to sql and trace the call in profiler it is defining the parameter as varchar(36). This is obviously causing some minor issues when we are trying to insert data that is between 37 and 50 characters long. I have tried removing the table and re-adding it to the design surface but the same thing happens. I also tried removing that property and adding it manually, same issue. When I look at the designer.cs code it shows the attribute properly: [Column(Storage="_Name", DbType="VarChar(50)")] I am out of ideas, anybody seen this before? Every other column is correct.

    Read the article

  • SQL Server: How to remove empty lines in SSMS?

    - by atricapilla
    I have many .sql files with lots of empty lines e.g. WITH cteTotalSales (SalesPersonID, NetSales) AS ( SELECT SalesPersonID, ROUND(SUM(SubTotal), 2) FROM Sales.SalesOrderHeader WHERE SalesPersonID IS NOT NULL GROUP BY SalesPersonID ) SELECT sp.FirstName + ' ' + sp.LastName AS FullName, sp.City + ', ' + StateProvinceName AS Location, ts.NetSales FROM Sales.vSalesPerson AS sp INNER JOIN cteTotalSales AS ts ON sp.BusinessEntityID = ts.SalesPersonID ORDER BY ts.NetSales DESC Is ther a way to remove these empty lines in SQL Server Management Studio? This is what I would like to have: WITH cteTotalSales (SalesPersonID, NetSales) AS ( SELECT SalesPersonID, ROUND(SUM(SubTotal), 2) FROM Sales.SalesOrderHeader WHERE SalesPersonID IS NOT NULL GROUP BY SalesPersonID ) SELECT sp.FirstName + ' ' + sp.LastName AS FullName, sp.City + ', ' + StateProvinceName AS Location, ts.NetSales FROM Sales.vSalesPerson AS sp INNER JOIN cteTotalSales AS ts ON sp.BusinessEntityID = ts.SalesPersonID ORDER BY ts.NetSales DESC

    Read the article

  • Fastest way to compress a database or .bak file and transfer it

    - by Nai
    As per the question title. I wonder if there are special programmes or commands that makes zipping up a .bak file and transferring it super quick. I read abour xp_cmdshell here but I'm not sure about the speed. My .bak file is about 12 gigs at the moment. Related to this is the possibility of using Red Gate's SQL Data Compare to just transfer the differential data across the network pipeline but I have never used SQL Data Compare before and I'm not sure how it goes about doing INSERTS on tables with Primary Keys and such. Also, not sure about the speed. Does anyone have any experience with this programme or similar programmes? Cheers!

    Read the article

  • Create view or SP, only if the DB contains a pattern

    - by Randall Salas
    Hi all: I am working on a script, that needs to be run in many different SQL servers. Some of them, shared the same structure, in other words, they are identical, but the filegroups and the DB names are different. This is because is one per client. Anyway, I would like when running a script, If I chose the wrong DB, it should not be executed. I am trying to mantain a clean DB. here is my example, which only works for dropping a view if exists, but does not work for creating a new one. I also wonder how it would be for creating a stored procedure. Thx a lot. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ContentModDate]') and OBJECTPROPERTY(id, N'IsView') = 1) AND CHARINDEX('Content', DB_NAME()) 0 drop view [dbo].[ContentModDate] GO IF (CHARINDEX('Content', DB_NAME()) 0)BEGIN CREATE VIEW [dbo].[Rx_ContentModDate] AS SELECT 'Table1' AS TableName, MAX(ModDate) AS ModDate FROM Tabl1 WHERE ModDate IS NOT NULL UNION SELECT 'Table2', MAX(ModDate) AS ModDate FROM Table2 WHERE ModDate IS NOT NULL END END GO

    Read the article

  • T-SQL error object exists when separated in if/else blocks

    - by Jeff O
    I get the error: Msg 2714, Level 16, State 1, Line 16 There is already an object named '#mytemptable' in the database. There are ways around it, but wonder why this happens. Seems like SQL Server is verifying both blocks of the if/else statement? declare @choice int select @choice = 1 if @choice = 1 begin select 'MyValue = 1' AS Pick into #my_temp_table end else begin select 'MyValue <> 1' AS Pick into #my_temp_table end select * from #temptable drop table #temptable If the tables have different names, it works. Or if I create the temp table and use Insert Into... statements that works as well.

    Read the article

  • How can I iterate over a recordset within a stored procedure?

    - by David
    I need to iterate over a recordset from a stored procedure and execute another stored procedure using each fields as arguments. I can't complete this iteration in the code. I have found samples on the internets, but they all seem to deal with a counter. I'm not sure if my problem involved a counter. I need the T-SQL equivalent of a foreach Currently, my first stored procedure stores its recordset in a temp table, #mytemp. I assume I will call the secondary stored procedure like this: while (something) execute nameofstoredprocedure arg1, arg2, arg3 end

    Read the article

  • Detecting if SQL Server Compact Edition 3.5 SP2 x64 is installed?

    - by Nate Zaugg
    I am building an installer and I want to bootstrap SQL Server Compact Edition 3.5 SP2. The problem is that I am looking for the registry key HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU\DesktopRuntimeVersion. The reason that is a problem is that for 64-bit machines SQL CE requires that both the 32-bit and 64-bit installers are run. You can't install the 64-bit version until the 32-bit version is installed. As soon as the 32-bit version is installed the registry key is populated and my bootstrapper, dotNetInstaller detects that the registry key is there and the x64 version is never installed. Any ideas on how to tell if the x64 version is installed even if the x32 is installed?

    Read the article

  • UNIQUE Constraints in SQL (SQL Server)

    - by rockbala
    Why are UNIQUE Constraints needed in database ? Can you provide any examples ? Primary Key is UNIQUE by default... Understandable as they are referred in other tables as Foreign keys... relation is needed to connect them for rdbms platform... but why would one refer to other columns as UNIQUE, what is benefit of doing so ?)

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >