Search Results

Search found 28900 results on 1156 pages for 'sql 2005'.

Page 91/1156 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • Odd SQL behavior, I'm wondering why this works the way it does.

    - by Matthew Vines
    Consider the following Transact sql. DECLARE @table TABLE(val VARCHAR(255) NULL) INSERT INTO @table (val) VALUES('a') INSERT INTO @table (val) VALUES('b') INSERT INTO @table (val) VALUES('c') INSERT INTO @table (val) VALUES('d') INSERT INTO @table (val) VALUES(NULL) select val from @table where val not in ('a') I would expect this to return b, c, d, NULL but instead it returns b, c, d Why is this the case? Is NULL not evaluated? Is NULL somehow in the set 'a'?

    Read the article

  • Tools to update tables in SQL server 2000/2005

    - by Stan
    Is there any handy tool that can make updating tables easier? Usually I got an Excel file with the original value in one column and new value in another column. Then I write a formula in Excel to create the 'update' statement. Is there any way to simplify the updating task? I believe the approach in SQL server 2000 and 2005 would be different, so could we discuss them both? Thanks.

    Read the article

  • Expanding list of databases in SQL Server 2008 Management Studio Takes Longer than SQL Server 2005

    - by Clever Human
    Is it just me, or does expanding the list of databases in SQL Server 2008 Management Studio take significantly more time than expanding the list of databases in SQL Server 2005 Management Studio? If it isn't just me, is there an explanation for this behavior? Whatever it is doing in the background that makes it take longer, can we turn that off? Is it configurable? I know, it seems trivial, but I am perpetually being surprised at how long this takes.

    Read the article

  • enable TCP in SQL server 2005 express edition

    - by david
    Hello, sorry for answer but how to enable TCP in SQL server 2005 express edition? I used configuration manager, find network configuration/protocols and there enabled TCP, after that I have restarted sql server service and tried installation of problematic software again (software which told me that TCP is not enabled) but I have the same problem :-(

    Read the article

  • How can I map a Windows group login to the dbo schema in a database?

    - by Christian Hayter
    I have a database for which I want to restrict access to 3 named individuals. I thought I could do the following: Create a local Windows group on the database server and add the named individuals to it. Create a Windows login in SQL Server mapped to the local Windows group. Map the login to the "dbo" schema in the database, so that the users can access all objects without having to qualify them with the schema name. When I try to do step 3, I get the following error: Msg 15353, Level 16, State 1, Line 1 An entity of type database cannot be owned by a role, a group, an approle, or by principals mapped to certificates or asymmetric keys. I have tried to do this via the IDE, the sp_changedbowner sproc, and the ALTER AUTHORIZATION command, and I get the same error each time. After searching MSDN and Google, I find that this restriction is by design. Great, that's useful. Can anyone tell me: Why this restriction exists? It seems very arbitrary. More importantly, can I accomplish my requirement some other way? Other info that might be pertinent: The server is fully up to date with service packs and hotfixes. All objects in the database are owned by the "dbo" schema, and it's not feasible to change that. The database is running in compatibility level 80, and it's not feasible to change that to 90 yet. I am free to make any other changes (within reason, depending on what they are).

    Read the article

  • Advice needed: warm backup solution for SQL Server 2008 Express?

    - by Mikey Cee
    What are my options for achieving a warm backup server for a SQL Server Express instance running a single database? Sitting beside my production SQL Server 2008 Express box I have a second physical box currently doing nothing. I want to use this second box as a warm backup server by somehow replicating my production database in near real time (a little bit of data loss is acceptable). The database is very small and resources are utilized very lightly. In the case that the production server dies, I would manually reconfigure my application to point to the backup server instead. Although Express doesn't support log shipping natively, I am thinking that I could manually script a poor man's version of it, where I use batch files to take the logs and copy them across the network and apply them to the second server at 5 minute intervals. Does anyone have any advice on whether this is technically achievable, or if there is a better way to do what I am trying to do? Note that I want to avoid having to pay for the full version of SQL Server and configure mirroring as I think it is an overkill for this application. I understand that other DB platforms may present suitable options (eg. a MySQL Cluster), but for the purposes of this discussion, let's assume we have to stick to SQL Server.

    Read the article

  • sql connection problem only from another computer

    - by geoff
    I have a task that runs nightly. It connects to a sql server on our network and when I run it from my machine it runs fine. When it runs from the other computer I get the following error. System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) I've checked with our systems admin and he said nothing has changed on the sql box or on the box in question so I'm not sure why it runs fine from one and not the other. From what I've read about this error it sounds like it's a setting on the sql server that would disallow it to run on either box.

    Read the article

  • How to reference a sql server with a slash (\) in its name?

    - by Bill Paetzke
    Givens: One SQL Server is named: DevServerA Another is named: DevServerB\2K5 Problem: From DevServerA, how can I write a query that references DevServerB\2K5? I tried a sample, dummy query (running it from DevServerA): SELECT TOP 1 * FROM DevServerB\2K5.master.sys.tables And I get the error: Msg 102, Level 15, State 1, Line 2 Incorrect syntax near '\.'. However, I know my syntax is almost correct, since the other way around works (running this query from DevServerB\2K5): SELECT TOP 1 * FROM DevServerA.master.sys.tables Please help me figure out how to reference DevServerB\2K5 from DevServerA. Thanks.

    Read the article

  • How do I check if a SQL Server 2005 TEXT column is not null or empty using LINQ To Entities?

    - by emzero
    Hi there guys I'm new to LINQ and I'm trying to check whether a TEXT column is null or empty (as String.IsNullOrEmpty). from c in ... ... select new { c.Id, HasBio = !String.IsNullOrEmpty(c.bio) } Trying to use the above query produces an SqlException: Argument data type text is invalid for argument 1 of len function. The SQL generated is similar to the following: CASE WHEN ( NOT (([Extent2].[bio] IS NULL) OR (( CAST(LEN([Extent2].[bio]) AS int)) = 0))) THEN cast(1 as bit) WHEN (([Extent2].[bio] IS NULL) OR (( CAST(LEN([Extent2].[bio]) AS int)) = 0)) THEN cast(0 as bit) END AS [C1] LEN is not applicable to TEXT columns. I know DATALENGTH should be used for them... How can I force LINQ to produce such thing? Or any other workaround to test if a text column is null or empty??? Thanks!

    Read the article

  • How to send reminder notifications to subscribers for renewal from SQL Server 2005?

    - by codemonkie
    I have a table in SQL DB, namely dbo.subscribers, it contains following columns: -SubscriberID -JoinDateTime The business logic says a subscription last for 2 weeks and a reminder should be sent after 7 days from the JoinDateTime. The way that the system was designed to send reminders are via a URL call, e.g. http://xxx.xxx.xxx.xxx/renew_userid=SubscriberID/ and that can only be called from our webserver which is the only whitelisted IP machines given. Currently there is a windows service written to query the DB once a day at midnight to grab all expiring subscribers and send them reminders, however this batch approach only sends reminders to the nearest date, well, I could have set the interval down from 1 day to 1 hour such that the service can send notifications out closer to the exact JoinDateTime + 7 days requirements. I have heard a stored procedure can be written and perform task like this to a nearly real-time manner, if yes, please give me some hints on how to do it. Another question is - is SSRS bit of an overkill to perform things like this? Please advice. TIA

    Read the article

  • SQL Server 2005 Reporting Services: How to count rows that are not null? Any hints for calculating t

    - by user329266
    Is there a way to count only records that are not null; similar to "COUNTA" in Excel? I would think this would be very simple process, but nothing I have tried has worked. If necessary, I can try to work this into my SQL query, but the query is already incredibly complicated. Also, I've found very little documentation for how to calculate report totals, and how to total from groups. Would anyone have any recommendations on what to use as a reference?

    Read the article

  • Membership in ASP.Net applications - part 4

    - by nikolaosk
    This is the fourth post in a series of posts regarding ASP.Net built in membership functionality,providers,controls. You can read the first one here . You can read the second post here . You can read the third post here . In this post I will show you how to add users programmatically to a role. In the third post we saw how to get users in a specific role.I will also show you how to delete a user and a role programmatically. 1) Launch Visual Studio 2005,2008/2010. Express editions will work fine....(read more)

    Read the article

  • The Image ASP.Net web server control

    - by nikolaosk
    In this post I will try to show you how to use the ImageMap web server control. This is going to be a very easy example. We will write no code but I will use the control to create navigation hotspots. 1) Launch Visual Studio 2010/2005/2008. Express editions will be fine. 2) Create a new asp.net empty web site and call it “ NavigationHotspot ”. 3) Drag and drop in the default.aspx page a ImageMap web server control from the Toolbox. 4) Let me explain what I did. I have an image that contains two flags...(read more)

    Read the article

  • Membership in ASP.Net applications - part 2

    - by nikolaosk
    This is the second post in a series of posts regarding ASP.Net built in membership functionality,providers,controls. You can read the first one post one here . In order to follow this post, complete the steps in the first post. It will only take 10 minutes or so. 1) Launch Visual Studio 2005,2008/2010. Express editions will work fine. I am using Visual Studio 2010 Ultimate edition. 2) Follow all the steps in the first post of the series. 3) Run your application to make sure it runs. 4) Change the...(read more)

    Read the article

  • Extending web server controls by providing client side functionality through Javascript

    - by nikolaosk
    In this post I will demonstrate how to extend the functionality of the web server controls by adding client side functionality with Javascript. Let's move on to our example. 1) Launch Visual Studio 2010/2008/2005. (express editions will work fine). Create a new empty website and choose a suitable name for it. 2) Add a new item in your site, a web form. Leave the default name. 3) We need to add some markup. < form id = "form1" runat = "server" > < div > < span id = "test1" > nikos...(read more)

    Read the article

  • SQL?????!????????????????? ~ DBA????APEX

    - by Yuichi.Hayashi
    Oracle Application Express(Oracle APEX)????????????Web????????????????DBA??????·???????????????? SQL?????!????·????????????????????? SQL????????????SQL??????????????????????? Oracle Apex???????????????????????????????SQL??????????????????????????????????? Oracle DB10g????????????iSQLPLUS????????????????????????????????????? SQL?????????CSV???????????? ??·?????????????????????? ????: SQL??????????? ??????: SQL??????????? ?DESCRIBE?: ??????SQL?: SQL?????????????????????????????? ????: ?????SQL???????????? APEX?????????????????????????????????? APEX(Oracle Application Express)????~??????????????????????

    Read the article

  • "If not exists" fails on SQL CE

    - by Mark Evans
    Hi I've got an unexpected problem. I'm making a script to update the schema on a SQL CE database. This won't run: if not exists ( Select column_name from information_schema.columns where column_name = 'TempTestField' and table_name = 'Inventory_Master_File' ) Alter table Inventory_Master_File add TempTestField nvarchar(10) null I think this is because I'm using stuff that isn't supported in SQL CE. Anyone know how to do this? I've tried rearranging the script and can't get anything to work. I tried "alter table ... where not exists ...". Note that the "select" part runs fine and also the "alter" part. The problem is "if not exists". I know there are some other postings regarding problems like this using SQL CE but I couldn't find an answer to this particular problem. Cheers Mark UPDATE: I've spent over an hour looking for a solution. I've found many postings asking for help with similar problems but I've still got no idea how to fix it. I really don't want to do this in C# code. I need to do this in a SQL script. I can't believe something this basic is causing so much difficulty :(

    Read the article

  • notepad sql Unicode and Non Unicode

    - by RBrattas
    Hi, I have a Microsoft Notepad flate file with data and Vertical Bar as column delimiter. I get following message: cannot convert between unicode and non-unicode string data types It seems it is my nvarchar(max) that creates my problem. I changed to varchar(max); but still the same problem. How do I insert my flate file into my SQL Server 2005? And in the SQL Server 2005 import and export wizard the flate file source advanced tab the OutputColumnWith is 50. Will that say my flate file column is max 50? I hope not because my column is more then 50... Thank you, Rune

    Read the article

  • SqlBulkCopy From CSV to SQL Datatable

    - by Swapnil
    I'm using SQL Server 2005, VB.NET 2005. I want to be able to import a very large excel file into a SQL table called "XYZ" I've done this by doing the following: 1. Save the excel file as csv.(Using SaveAs XLCSV option) 2. Build a datatable "ABC" From CSV.(using ODBC Connection and Select * from '*'.csv command) 3. copy the datatable"ABC" into database table "xyz" (using sqlBulkCopy.WriteToServer()) It works fine without any error but when i checked my database i found that data type for some columns has been changed and hence it didn't copy some of the records.Any help would be appreciated

    Read the article

  • Can't connect to SQL Server 2005 Express from an ASP.NET C# page

    - by Aviv
    Hey guys, I have an MS SQL Server 2005 Express running on a VPS. I'm using pymssql in Python to connect to my server with the following code: conn = pymssql.connect(host='host:port', user='me', password='pwd', database='db') and it works perfectly. When I try to connect to the server from an ASP.NET C# page with the following code: SqlConnection myConnection = new SqlConnection("Data Source=host,port;Network Library=DBMSSOCN; Initial Catalog=db;User ID=me;Password=pwd;"); myConnection.Open(); When I run the ASP.NET page I get the following exception at myConnection.Open();: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) I tried restarting the SQL Server but I had no luck. Can anyone point me out to what I'm missing here? Thanks!

    Read the article

  • How can I execute a .sql from C#?

    - by J. Pablo Fernández
    For some integration tests I want to connect to the database and run a .sql file that has the schema needed for the tests to actually run, including GO statements. How can I execute the .sql file? (or is this totally the wrong way to go?) I've found a post in the MSDN forum showing this code: using System.Data.SqlClient; using System.IO; using Microsoft.SqlServer.Management.Common; using Microsoft.SqlServer.Management.Smo; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string sqlConnectionString = "Data Source=(local);Initial Catalog=AdventureWorks;Integrated Security=True"; FileInfo file = new FileInfo("C:\\myscript.sql"); string script = file.OpenText().ReadToEnd(); SqlConnection conn = new SqlConnection(sqlConnectionString); Server server = new Server(new ServerConnection(conn)); server.ConnectionContext.ExecuteNonQuery(script); } } } but on the last line I'm getting this error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --- System.TypeInitializationException: The type initializer for '' threw an exception. --- .ModuleLoadException: The C++ module failed to load during appdomain initialization. --- System.DllNotFoundException: Unable to load DLL 'MSVCR80.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E). I was told to go and download that DLL from somewhere, but that sounds very hacky. Is there a cleaner way to? Is there another way to do it? What am I doing wrong? I'm doing this with Visual Studio 2008, SQL Server 2008, .Net 3.5SP1 and C# 3.0.

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >