During work with creating, updating or deleting objects in a database,
we use explicit name of the objects, for example
DROP PROCEDURE myProc.
By what the method can I avoid using the explicit name and get something like this:
DROP PROCEDURE @myProc or DROP PROCEDURE id_myProc?
i need to store russian data in sql server db but i found the russain data appeared as odd character in the table, can sql server support it or is there other solution for it? thanks!
When I set a column to have a default definition that uses a UDF, I am receiving the "String or binary data would be truncated" error.
The UDF:
Code BlockALTER FUNCTION GetDefaultClientTier ( @ClientAssets decimal(15,2) ) RETURNS char(1) AS BEGIN DECLARE @Result char(1) -- Get the first result in case of overlaps. SET @Result = CAST((SELECT TOP 1 ClientTier FROM ClientTiers WHERE @ClientAssets BETWEEN ClientAssetsFloor AND ClientAssetsCeiling) AS char(1)) RETURN @Result END
ClientTier is defined as char(1) in the table. I simply have (isnull([dbo].[GetDefaultClientTier]([ClientAssets])),(null))) as the definition. I can't use a computed column because I the values need to be editable. When inserting with SSIS, the insert works fine but the column has a value of null for each row.
When putting a character as the default (like 'A') the insert works fine.
The cast is there only because I have tried everything I can think of to get around this.
I have a table in sql server 2000 which has over 94000 records. I have to delete a record from table ,which record having a language other than english . I need to clean the table by removing all the data which are in other language . My main table has 12 fields .
I am facing a very weird issue in our SSAS database. We have several roles with 'Read definition' access. None of these roles are able to see data in the cubes. I have checked these roles over and over and there is no problem with the definition. Each of the roles have been given read access to Data Source, Cube and Dimensions.
The users are able to access the definition and structure of the cube i.e. they can see the measures & dimensions available but when they drag measures and dimension attributes in the browser (SSMS) OR execute an MDX - they get null values. The roles with 'Full Control (administrator)' access are able to see all the data without any issues.  I have tried the following:
1. Deleted all roles and re-created. 2. Created roles directly on SSAS DB. 3. Deployed all objects and processed the DB. Â Each time only the admins are able to see the data.
I'm trying to move my current use of an sql 2000 db to sql 2005.
I need to update a table definition (to change a field to an Identity)
I'm getting a dialog box (in SQL server management studio) on save saying :
'xxxx' table
- Saving Definition Changes to tables with large amounts of data could take a considerable amount of time. While changes are being saved, table data will not be accessible.
I press 'Yes' to the dialog box.
After 35 seconds, I get another dialog box saying:
'xxxx' table
- Unable to modify table.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Well, the server is responding and I can query that talbe and other, I can add/delete rows to other columns. I can modify other (smaller) tables.
I am using SQL server 7 with ASP. I have two working environment means one is korean and second it english. - one Korean OS server have SQL server 7.0 and it is my database server - second Korean OS server is only webserver - English OS is win2k and it is only Web server.
1) When i used both Korean server as my webserver + database server then there is no problem to add Korean Data to SQL server On korean OS.
2) But when I try to user English OS server as my webserver and Korean Os server as my database server then I am not able to store Korean Data in Database server insted of it stored some mis/junk/acssi characters in database.
-- I allready try with Korean version of MDAC of English os -- I also try with OEM feature in SQL server client network utility -- When I am use CODEPAGE in my .ASP page then data storage work fine .. but at the time of getting it back there is problem.
If u need any more information about problem then let me know.
So please help me in this regards.
Thanx in advance Anis Vora Partner Global SoftWeb Solutions www.globalsoftweb.com
I'm trying to define a linked server using Microsoft OLE DB Provider for Data Mining Services. MSDMine data provider is missing. Do you know where I can get this? Thanks in advance.
I'm have a Xeon 64bit proc. using SP2. And had installed:
SQLServer2005_ADOMD_x64.msi, SLQServer2005_ASOLEDB9_x64.msi,SQLServer2005_OLAPDM_x64.msi, and SQLServer2005_XMO_x64.msi.
can anyone help me to solve this problem i have created a ssis package to load the data from excel file to the table, but we are getting the data in different language ie in french,english and in china after loading the data when we view the data it is showing as junk characters for chinese data but we are able to see other language data ie french and english. so please tell me how to solve that reply to my mail id(sandeep_shetty@mindtree.com)
It is possible to get the definition of an index in a script? I want the "Create index..." string so I can drop and recreate the index in a single statement. You can do it in the Query Analyzer object browzer with the "Script object..." options.
Hello, i would like to know if it's possible to generate automatically a word document or an excel document that will contain all the metadata definition, for example containing the source columns names, their datatype, and the destination with their datatypes, so that it would easy to create a data dictionnary .
I'm tasked with creating POCO (C# Class Object) and XML definitions for three different kinds of records coming from my input file. The problem is that I'm not sure how to do this within the SSIS framework. It seems to me that I can somehow define a class and include XML element tags in the definition, but I'm not sure where to look/who to ask/how to do that!
The goal is to be able to assign the data types and class attributes for various parts of each input record based on position, and to serialize the data as XML (and therefore my inputs to my Data Flow will be XML objects instead of a flat file, as I had been doing it...).
Can anyone point me at a good tutorial? Or a simple example?
I have a 2005 .Net 2.0 solution that includes two projects, a windows project and a Reporting Services project. The report viewer is apart of the windows project and I am wanting to open reports in the RS project but keep getting a 'the report definition has not been specified' error.
I set the ReportPath to point to the physical path of the RS project but it does no good.
Anyone have any idea how to run a report that is not apart of the project?
Hello,I'm using Visual Studio 2005 with ADO.Net 2.0 but I am missing a definition for the sqlcommands' object "ExecuteRow"oCommand = new System.Data.SqlClient.SqlCommand();oCommand.ExecuteRow() ----------------------------> this is the missing definitionAny ideas anyone ???
I've got a table that gets updated with live-data constantly throughout the day. I've got to run some statistical analysis on the data in this table based off of the value of one of the columns. The column can be 4 values, but I'm only looking to analyze data for rows containing one of two of the 4 total values. IETable |Status| more data....||1|......| |2|......||3|......||4|......| |1|......||4|......| I want to only analyze the data of rows with 1 and 4 as values. I don't care about 2 or 3... I was thinking of using a Trigger, but I'm not aware of a way to analyze the data that fires the Trigger.Ideally, I'd like to do something likeCREATE TRIGGER analyze ON table AFTER INSERT WHERE column = '1' OR column = '4' AS 'Trigger sql here'Is this possible?
We are trying to create a view that references lengths in both metres and feet.
What we want to do is to create a baselength column which either holds the value of the metres column or calculates the metric value of the feet column if there is no value in the metric column.
We can do all the maths for the calculations etc, it is just putting the IF statement into the view to test the values that we are struggling with.
Plesae tell me the MSSQL Server equivalent of the below MySQL query .create table temp2(a varchar(23) comment 'male m');What is the use of specifying a keyword 'comment' in the column definition. Will it make any difference
I have set up a couple of views for a user but they want to be able to see the database table columns by doing right click on table and getting the columsn.
I tried to give the permissions to database by right clicking on database and doing the user and giving view defintion.
-- [TABLEA] contains no columns that can be inserted or the current user does not have permissions on that object.
I have a Live Database as well as the Test database with the same Definition
now i need to write a SQL to check identity of these two database tables,
i mean i need to check if the Test Database has got the Same Table definition as Live Database table definition ? In the same way how do i check for the Stored peocedures ?
I want to create a view on the table "workorder" that contains a serial id "woid". Another table, "wo_comment" contains multiple comments for each "woid".
I would like to create a view view_workorder with a column "allcomments" that is basically a concatenation of all the comments within the table "comment".
Table: workorder has columns: woid, startdate (plus many others) Table: wo_comment has columns: woid, comment, sequence
Desired View: view_workorder has columns: woid, startdate, allcomments
I tried to create a view as follows but get errors concerning the "CURSOR" statement making me wonder if I can use declarations and CURSORS within a view?
create view [workorder_view] as ( Select w.woid, w.startdate, cast( DECLARE @all_comments nvarchar(4000), @curr_comment nvarchar(256) DECLARE wo_comment_cur CURSOR FOR SELECT woc.Comments FROM WO_Comment as woc WHERE woc.woid = w.woid OPEN wo_comment_cur FETCH NEXT FROM wo_comment_cur INTO @curr_comment WHILE (@@FETCH_STATUS = 0) BEGIN Set @all_comments = @all_comments + @curr_comment FETCH NEXT FROM wo_comment_cur INTO @curr_comment END CLOSE wo_comment_cur; DEALLOCATE wo_comment_cur; as nvarchar(80000)) as COMMENTS