Sql Statement Case In Where Works Management Studio Not In C#

Mar 17, 2008

I have a bit of an odd problem in an sql statement where it works in management studio but not in c# when setting up a table adapter the sql is:


DECLARE @week char(2)

SET @Week = 7

SELECT student_id, acad_period, register_id, register_group, week_no, absence_code, attendance_type

FROM dbo.sttdstud

WHERE (student_id LIKE '%') AND (register_id LIKE '%') AND (register_group LIKE '%') AND

week_no = Case @Week when null Then '#' Else @Week End


the idea is if they don't enter a number it would bring up all records. This works in mangaement studio but c# brings up the error sql server doesn't support udt on excecution of the sql. This is sql server 2000. Any ideas why this doesn't work and how to fix it.

View 3 Replies


ADVERTISEMENT

SELECT Statement Works In SQL Server Management Studio But Not In SSRS

Mar 14, 2008



Hi,

I'm attempting to extract some yearly average figures from our DB. I've written a SELECT statement in SQL Server MS which returns exactly what I need:


SELECT YEAR, CAllSource, AVG(CallTotal) AS [Average calls per day]

FROM (SELECT COUNT(CallID) AS CallTotal, DATEPART(YEAR, Recvddate) AS Year, CASE WHEN CallSource IN ('Auto Ticket', 'Email')

THEN 'Email' WHEN CallSource IN ('Phone') THEN 'Phone' ELSE 'Other' END AS CallSource

FROM Calllog where

DATEPART(MONTH, Recvddate) = 3

AND DATEPART(dw, RecvdDate) NOT IN ('7', '1')

GROUP BY RecvdDATE, callsource) as sub

GROUP BY YEAR, CallSource

ORDER BY YEAR, CallSource

The problem is that when I attempt to use this in SSRS I get the following error:

"sub.Year is not a recognised DATEPART Option".

Now as you can see, "sub.Year" is not even mentioned in the expression. However I noticed that when running the query, SSRS automatically adds "sub." before the YEAR in the section highlighted in yellow above. a) Why is it doing this, and b) does anyone know of a workaround/fix?

Thanks
Matt

View 4 Replies View Related

...Works In Management Studio, Not In .NET Anymore

Jul 3, 2007

I have an ASP.NET/ADO.NET page i wrote. It was based off of the development database during most development, and it switched over seamlessly to the production database.

Except for yesterday, when i went back to edit the page. It simply stopped returning results on my queries. To see if it was caused by bad values being passed to the sqldatasource, i tried it in the "Configure Data Source..." window, and it returns zero rows. When passing all of the exact same parameters to the same procedure in the same DB engine, even using the same login information, it works.

Just not in my ADO.NET app anymore...

Can anyone tell me what the hell could be going on here, please? I already rebuilt the page from an older version this morning, being very minimal on changes, and the last thing i changed before it stopped working was the connection string... *BUT* I have triple-checked that against the canon string we have always used in every working copy.

I'm losing a lot of hair over this . Any help would be greatly appreciated.

Thanks in advance

stoland

View 2 Replies View Related

DB Update Fails In Program, Works In Management Studio?

Jul 4, 2007

I have an SQL statement that, when run through SQL Server management studio works fine. However, when I run it on my ASP page, it doesn’t update the data! I have tried both as a stored procedure and as a simple commandText update statement.
All I do is simly update the value of a column based on another column – nothing particularly complex: update customer set dateChanged = System.DateTime.Now.ToString("dd-MMM-yyyy"), CURRSTAT = 'Active',custType = case WHEN cust_Changing_To IS NOT NULL THEN cust_Changing_To  ELSE custType END,cust_Changing_To = NULLFROM customers_v WHERE CURRSTAT = 'Changing'
           
As you can see, nothing that complex. The line that is causing the problem is the case: 
custType = case WHEN cust_Changing_To IS NOT NULL THEN cust_Changing_To  ELSE custType END 
all it does is if another nullable integer column is not null, sets it to the value of that column, else it retains its existing value. 
Like I say, this works in Management studio, but I cannot get it to execute programatticaly from an asp page.
No exceptions are being thrown, it just doesn’t update the data. 
Any ideas? 
Thanks
 

View 1 Replies View Related

Procs Fails In MS Access, Works In Management Studio

Apr 4, 2008

I have a stored procedure which is run through MS Access (yuck). It does not appear to fail, but it does not populate certain tables, and is also rather complex. I did not write it, and am trying my best to fix it. However, when I run the same procedure with the same parameters from within Management Studio (database state is the same, I restore from backup before trying out each execution) it populates the tables correctly. I have profiled both executions (from MS and from Access) and it is running with the same NTUsername, and thus the same permissions. The process used to work and then some changes were made to the DB which seem to have broken it from Access. As far as I know, the Access code has not changed, although it may have done so. The proc call from Access uses the same parameters, and does not throw an error, although it does not appear to close the connection to the DB (I'm looking into this). Access uses an ODBC connection to connect to SQL Server.

Any ideas?

View 3 Replies View Related

Connection Issue With Enterprise Manager But Works With Management Studio

Oct 26, 2006

Hi,I have an interesting scenario. I have a SQL Server 2000 Standard Edition instance running on Computer A. I'm trying to access it through computers B and C.Computer B has Sql Server 2005 Express Edition installed and I was able to use its Management Studio and connect to instance on Computer A.Computer C has SQL Server 2000 Standard Edition installed. When I try to connect to the instance on Computer A, I get connection failed message.I checked some settings. Both TCP/IP and Named pipes are enabled on the instance in A. The TCP/IP port is set to 1433 for both client and server.Please give me some ideas as to how I can solve this problem. -Thanks

View 5 Replies View Related

SQL Query That Works In SQL Server Management Studio, But Doesn't On .NET 2.0 Page

Feb 21, 2008

SELECT favorites.FID, favorites.filename, favorites.username, files.status, files.private, files.views, files.title FROM favorites INNER JOIN files ON favorites.filename = files.filename WHERE (favorites.username = @username) AND (files.status IS NULL) AND (files.private = @private)@private is manually set to 'no'@username is set to profile.usernamewhen I run the above query in microsoft sql server mgmt studio express on the database, it presents all the information i'm asking for very easily. however when i try to implement this query on a aspx .net2.0 page with teh sqldatasource and a gridview, no data is displayed.anyone know what my problem is? 

View 1 Replies View Related

Query That Works In Management Studio, Fails In Reporting Services

May 30, 2007

I can run the following query in Management Studio, but get the error listed below when I run it from the data tab in Reporting Services:



declare @starttime as datetime
declare @endtime as datetime
declare @timezone as integer
declare @date as datetime



set @timezone = 1
set @date = '5/1/2007'

set @starttime = dateadd(hh, @timezone, @date)
set @endtime = dateadd(d, 1, @starttime)



select @Starttime, @endtime from site



Error Message:

TITLE: Microsoft Report Designer
------------------------------

An error occurred while executing the query.
The variable name '@starttime' has already been declared. Variable names must be unique within a query batch or stored procedure.

------------------------------
ADDITIONAL INFORMATION:

The variable name '@starttime' has already been declared. Variable names must be unique within a query batch or stored procedure. (Microsoft SQL Server, Error: 134)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=08.00.2039&EvtSrc=MSSQLServer&EvtID=134&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


What I am trying to accomplish is the ability for users to select which time zone they want the data in the report to display in. To do this, I created a timezone parameter that has the offset from Central Time (which is how all data is stored in our database).



Any help would be greatly appreciated!

View 4 Replies View Related

Can Insert Statement Works In Case When Function

Nov 5, 2007

Hi

Im beginer in sql,Please guide

can insert statement works fine in case when function

for example

case when condition1=true then (first insert statement based on some condition) when condition2=true then (second insert statement based on some other condition)
end

View 5 Replies View Related

Function That Works In Sql Server Management Studio Does Not Work In Derived Column Transformation Editor

May 12, 2007

Hi

I'm a relative SQL Server newbee and have developed a function that converts mm/dd/yyyy to yyy/mm/dd for use as in a DT_DBDATE format for insert into a column with smalldatatime.



I receive the following erros when using the function in the Derived Column Transformation Editor. First, the function, then the error when using it as the expression Derived Column Transformation Editor.



Can anyone explain how I can do this transformation work in this context or suggest a way either do the transformation easier or avoid it altogerher?



Thanks for the look see...

******************************

ALTER FUNCTION [dbo].[convdate]

(

@indate nvarchar(10)

)

RETURNS nvarchar(10)

AS

BEGIN

-- Declare the return variable here

DECLARE @outdate nvarchar(10)

set @outdate =

substring(@indate,patindex('%[1,2][0-9][0-9][0-9]%',@indate),4)+'/'+

substring(@indate,patindex('%[-,1][0-9][/]%',@indate),2)+'/'+

substring(@indate,patindex('%[2,3][0,1,8,9][/]%',@indate),2)



RETURN @outdate

END

********************************



And the error...



expression "lipper.dbo.convdate(eomdate)" failed. The token "." at line number "1", character number "11" was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified.

Error at Data Flow Task [Derived Column [111]]: Cannot parse the expression "lipper.dbo.convdate(eomdate)". The expression was not valid, or there is an out-of-memory error.

Error at Data Flow Task [Derived Column [111]]: The expression "lipper.dbo.convdate(eomdate)" on "input column "eomdate" (165)" is not valid.

Error at Data Flow Task [Derived Column [111]]: Failed to set property "Expression" on "input column "eomdate" (165)".

(Microsoft Visual Studio)

===================================

Exception from HRESULT: 0xC0204006 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.SetInputColumnProperty(Int32 lInputID, Int32 lInputColumnID, String PropertyName, Object vValue)
at Microsoft.DataTransformationServices.Design.DtsDerivedColumnComponentUI.SaveColumns(ColumnInfo[] colNames, String[] inputColumnNames, String[] expressions, String[] dataTypes, String[] lengths, String[] precisions, String[] scales, String[] codePages)
at Microsoft.DataTransformationServices.Design.DtsDerivedColumnFrameForm.SaveAll()

View 3 Replies View Related

Prepared Statement Vs. Management Studio

Jan 25, 2008



Hello Folks,

I have a problem with a prepared statement against SS2005 SP2 that I do not fully understand. I have a query that is prepared and executed from a java application that looks similar to this:

SELECT TOP 1 str.ID FROM bigtable1 big1
LEFT OUTER JOIN bigtable2 big2
ON (big1.ID = big2.ID)
LEFT OUTER JOIN htable h ON (big2.HID = h.HID AND h.DIRECTSW=1)
WHERE big1.ID IN (SELECT ID FROM ltable WHERE LID IN(SELECT
LID FROM LAS WHERE LASID = ? )) AND big2.COMPLID <> 2 AND big2.COMPLID <> 3
AND ISNULL(big2.date1, big2.date2) BETWEEN ? AND ?

When run as a prepared statement this runs in about 27 seconds. When run under the query component of Management Studio it runs in about 1 second. Before each run I am clearing the buffers and the prepared statement cache. When running these I have looked at the execution plan from profiler and they both look the same. If I change the

WHERE big1.ID IN (SELECT ID FROM ltable WHERE LID IN(SELECT
LID FROM LAS WHERE LASID = ? ))

to INNER JOIN it runs ~1 second in both environments.

Any pointers would be welcome to explain the disrepency.

Thanks, Mark

View 4 Replies View Related

Query Works SQL Server Studio Not Visual Studio

Feb 29, 2008

I have SSRS in Visual Studio. I created a query that works fine in SQL Server Management Studio, but when pasted into Visual Studio I get the error "An expression of non-boolean type specified in a context where a condition is expected, near '('.

Here is the query. Can anyone help on why this isn't working? Thanks.

SELECT CASE WHEN MONTH(dbo.MAS_CCS_ARN_InvHistoryHeader.SOTransDate) = MONTH(GETDATE()) AND YEAR(dbo.MAS_CCS_ARN_InvHistoryHeader.SOTransDate) = YEAR(GETDATE())
THEN dbo.MAS_CCS_ARO_InvHistoryDetail.SOExtChargeAmount ELSE 0 END AS CurrentMonth,
CASE WHEN SubString(dbo.MAS_CCS_GL_Account.Account,1,3) = '400' THEN 'ALEDO' ELSE ' ' END AS Location,
dbo.MAS_CCS_ARN_InvHistoryHeader.SOTransDate, dbo.MAS_CCS_ARN_InvHistoryHeader.InvoiceNumber,
dbo.MAS_CCS_AR1_CustomerMaster.CustomerName, dbo.MAS_CCS_ARO_InvHistoryDetail.DetailSeqNumber,
dbo.MAS_CCS_ARO_InvHistoryDetail.LineType, dbo.MAS_CCS_GL_Account.Account, dbo.MAS_CCS_ARO_InvHistoryDetail.SOExtChargeAmount
FROM dbo.MAS_CCS_AR1_CustomerMaster, dbo.MAS_CCS_ARN_InvHistoryHeader, dbo.MAS_CCS_ARO_InvHistoryDetail,
dbo.MAS_CCS_GL_Account
WHERE dbo.MAS_CCS_AR1_CustomerMaster.CustomerNumber = dbo.MAS_CCS_ARN_InvHistoryHeader.CustomerNumber AND
dbo.MAS_CCS_ARN_InvHistoryHeader.InvoiceNumber = dbo.MAS_CCS_ARO_InvHistoryDetail.InvoiceNumber AND
dbo.MAS_CCS_ARO_InvHistoryDetail.SOGLSalesAcct = dbo.MAS_CCS_GL_Account.AccountKey

View 1 Replies View Related

Telnet Connection Works, Sql Cmd Connection Works, SQL Server Managment Studio 2005 Does Not

Jun 20, 2007

I'm having a strange problem with this but I know (and admit) that the problem is on my PC and nowhere else. My firewall was causing a problem because I was unable to PING the database server, switching this off gets a successful PING immediately. The most useful utility to date is running netstat -an in the command window. This illustrates all the connections that are live and ports that are being listed to. I can establish a connection both by running



telnet sql5.hostinguk.net 1433 and

sqlcmd -S sql5.hostinguk.net -U username -P password



See below:



Active Connections

Proto Local Address Foreign Address State

TCP 0.0.0.0:25 0.0.0.0:0 LISTENING

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING

TCP 0.0.0.0:135 0.0.0.0:0 LISTENING

TCP 0.0.0.0:443 0.0.0.0:0 LISTENING

TCP 0.0.0.0:445 0.0.0.0:0 LISTENING

TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING

TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING

TCP 81.105.102.47:1134 217.194.210.169:1433 ESTABLISHED

TCP 81.105.102.47:1135 217.194.210.169:1433 ESTABLISHED

TCP 127.0.0.1:1031 0.0.0.0:0 LISTENING

TCP 127.0.0.1:5354 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51114 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51201 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51202 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51203 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51204 0.0.0.0:0 LISTENING

TCP 127.0.0.1:51206 0.0.0.0:0 LISTENING

UDP 0.0.0.0:445 *:*

UDP 0.0.0.0:500 *:*

UDP 0.0.0.0:1025 *:*

UDP 0.0.0.0:1030 *:*

UDP 0.0.0.0:3456 *:*

UDP 0.0.0.0:4500 *:*

UDP 81.105.102.47:123 *:*

UDP 81.105.102.47:1900 *:*

UDP 81.105.102.47:5353 *:*

UDP 127.0.0.1:123 *:*

UDP 127.0.0.1:1086 *:*

UDP 127.0.0.1:1900 *:*

Both these utilities show as establishing a connection in netstat so I am able to connect the database server every time, this worked throughout yesterday and has continued this morning.

The problem is when I attempt to use SQL Server Management Studio. When I attempt to connect to tcp:sql5.hostinguk.net, 1433 nothing shows in netstat at all. There is an option to encrypt the connection in the connection properties tab in management studio, when I enable this I do get an entry in netstat -an, see below:



TCP 81.105.102.47:1138 217.194.210.169:1433 TIME_WAIT

TCP 81.105.102.47:1139 217.194.210.169:1433 TIME_WAIT

TCP 81.105.102.47:1140 217.194.210.169:1433 TIME_WAIT



Amost as if it's trying the different ports but you get this time_wait thing. The error message is more meaningful and hopefull because I get:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (.Net SqlClient Data Provider)

I would expect this as the DNS has not been advised to encrypt the conection.

This is much better than the : Login failed for user 'COX10289'. (.Net SqlClient Data Provider) that I get, irrespective of whether I enter a password or not.


This is on a XP machine trying to connect to the remote webhosting company via the internet.

I can ping the server

I have enabled shared memory and tcp/ip in protocols, named pipes and via are disabled

I do not have any aliases set up

No I do not force encryption

I wonder if you have any further suggestions to this problem?

View 7 Replies View Related

Management Studion Express Alongside Full-blown Management Studio?

Oct 9, 2006

Is it possible to run both Sql Server Management Studio: Express and full blown side by side?

I am developing with the full blown product but would like to test Management Studio Express on the same box.
Is this possible?

Thanks

Eric

View 3 Replies View Related

SQL Server Management Express Studio Management Tools

Apr 5, 2007



I have recently installed the SQL Server Management Studio Express but I do not find Management Tools in order to create scheduled backups and shrinking of the databases. I was under the impression that this should be included in the Management Studio. I use the SQL 2005 Express for smaller customers who run the SQL on a desktop unit. I need a way to backup the data to a server machine for backup purposes. I have uninstalled and reinstalled to no avail.

View 7 Replies View Related

Visual Studio Database File And SQL Server Management Studio Express Question

Mar 17, 2007

I have a database in my "App_Data" folder of my visual studio project.  I can view it fine in Visual Studio's built-in tools for managing a database attached to a solution.  However i recently started playing around with the SQL Server Management Studio Express program.  When i attach my database to Management Studio, and try to run my program it crashes.  I think it might be a permissions error?!? When i detatch it and reattach it in visual studio it runs fine again.   Any suggestions? ThanksJason 

View 1 Replies View Related

Visual Studio 2005 Standard And SQL Server Management Studio?

Sep 4, 2007

I am new to visual studio and I am still not sure of all its components and features.

I installed visual studio 2005 standard edition but cannot find SQL Server Management Studio?

I guess this must be because it is not included with Visual studio 2005 standard. Is it included with VS 2005 professional?

I want to add pictures of products to my shopping site using an SQL database and I’ve been told that SQL Server Management studio is required as it is a graphical tool.

How would I go about obtaining the SQL server management studio. There seems to be different versions of SQL server that it is confusing to know which one to purchase.

Will the SQL server 2005 version that comes with Visual studio standard be sufficient for me now right? I want to create a shopping site with hundreds, perhaps even thousands of products. I want to use an SQL server 2005 database. The database will include ‘dynamically generated’ product images if that is the correct terminology.

My goodness, it seems I still have so much to learn.

Thanks

View 1 Replies View Related

The Database Created Using Management Studio Cannot Be Connected To Visual Studio???help

May 13, 2008

 
 
I have created a database under management studio and i want it to be connected in visual studio but it failed
the error msgs said that the database can't be connected coz the database with same name exits but that is not true

View 2 Replies View Related

Case Works On One And Not The Other Server

Aug 7, 2001

Ok, this is in reference to the previous post about replicated server with difference.

I have a Case statement that checks for NULL values and works on one server and not the other. For example:

Select Case LineItems.Item When 'BILL' then Activities.InvoiceState When Null Then Activities.InvoiceState Else States.State End As Sate.

The second server is not recognizing the NULL in this statement. Any ideas??

Thanks alot for any help.

View 1 Replies View Related

How Do I Get The Database That I Am Using In Visual Studio Into My SQL Server Management Studio?

Sep 12, 2007

How do i get the database that i am using in visual studio into my SQL server management studio?
i need to create some scripts to create stored procedures on a live server.

View 1 Replies View Related

Is Management Studio Express Compatible With Visual Studio?

Sep 13, 2006

I have installed Visual Studio 2005 which includes SQL Server Express but not the Management Studio.

Can I install SQL Server Management Studio Express?

View 1 Replies View Related

What Is The Different Between Manangement Studio And Management Studio Express

Jan 18, 2007

In Microsoft.COM website do we have a comparision between Management Studio and Management Studio express in term of functions and features of the tool ? (Not SQL Server and SQL Server Express !)

View 1 Replies View Related

Works With Visual Studio Bt Not On Localhost???

Nov 17, 2006

i ran my project on the visual studio 2005. but when i posted the same folder in teh wwwroot folder, it gave me the following error: 
An attempt to attach an auto-named database for file C:PreranaOnCitoRunningFoldercitoason1606App_DataDatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Can anybody help me show the way to get through it??
Any relevant comment/ suggestion is appreciated!!
 

View 1 Replies View Related

Problem Using Result From CASE In Another CASE Statement

Nov 5, 2007

I have a view where I'm using a series of conditions within a CASE statement to determine a numeric shipment status for a given row. In addition, I need to bring back the corresponding status text for that shipment status code.

Previously, I had been duplicating the CASE logic for both columns, like so:




Code Block...beginning of SQL view...
shipment_status =
CASE
[logic for condition 1]
THEN 1
WHEN [logic for condition 2]
THEN 2
WHEN [logic for condition 3]
THEN 3
WHEN [logic for condition 4]
THEN 4
ELSE 0
END,
shipment_status_text =
CASE
[logic for condition 1]
THEN 'Condition 1 text'
WHEN [logic for condition 2]
THEN 'Condition 2 text'
WHEN [logic for condition 3]
THEN 'Condition 3 text'
WHEN [logic for condition 4]
THEN 'Condition 4 text'
ELSE 'Error'
END,
...remainder of SQL view...






This works, but the logic for each of the case conditions is rather long. I'd like to move away from this for easier code management, plus I imagine that this isn't the best performance-wise.

This is what I'd like to do:



Code Block
...beginning of SQL view...
shipment_status =
CASE
[logic for condition 1]
THEN 1
WHEN [logic for condition 2]
THEN 2
WHEN [logic for condition 3]
THEN 3
WHEN [logic for condition 4]
THEN 4
ELSE 0
END,


shipment_status_text =

CASE shipment_status

WHEN 1 THEN 'Condition 1 text'

WHEN 2 THEN 'Condition 2 text'

WHEN 3 THEN 'Condition 3 text'

WHEN 4 THEN 'Condition 4 text'

ELSE 'Error'

END,
...remainder of SQL view...


This runs as a query, however all of the rows now should "Error" as the value for shipment_status_text.

Is what I'm trying to do even currently possible in T-SQL? If not, do you have any other suggestions for how I can accomplish the same result?

Thanks,

Jason

View 1 Replies View Related

Can't Connect To SQL Server 2005 In Visual Studio, Only SQLExpress Works?

Jul 8, 2007

Hi all,I'm having a big problem here. I can't seem to connect to a database of MSSQL Server 2005... Here is what I've did:1. Under the Server Explorer>Data Connections. Right click and choose "Add Connection..."2. Data Source was "Microsoft SQL Server Database File". Click OK.3. I browse to the database in the MSSQL.2/MSSQL/Data folder.4. Click on the "Advanced" button, and change the default DataSource from .SQLEXPRESS to .MSSQLSERVER. Click OK5.  Received this error: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 setting SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) Only .SQEXPRESS that I was able to connect to... i've tried the solution from Microsoft, opened SQL Server 2005 Surface Area Configuration and enabled "Local and remote connections", checked the option "Using both TCP/IP and named pipes" but it didn't help. This is frustrating because I can't get the Membership provider, login to work on my host. Please help. Thank you very much,Kenny. 

View 2 Replies View Related

SQL 2005 Sp2 Works But SQL Maint Studio And The Instance Still Report As 9.0.1399

Jan 25, 2008



SQL 2005 SP2 install succeeds but in SQL Maintenance Studio the instance is still 9.0.1399. Also when I interogate using TSQL it is reported as 9.0.1399

Here's the log (I did try it a couple of times)

Time: 01/25/2008 13:25:05.338
KB Number: KB921896
Machine: ------------- (I took this out)
OS Version: Microsoft Windows Server 2003 family, Standard Edition Service Pack 2 (Build 3790)
Package Language: 1033 (ENU)
Package Platform: x86
Package SP Level: 2
Package Version: 3042
Command-line parameters specified:
Cluster Installation: No
**********************************************************************************
Prerequisites Check & Status
SQLSupport: Passed
**********************************************************************************
Products Detected Language Level Patch Level Platform Edition
Setup Support Files ENU 9.2.3042 x86
Reporting Services (MSSQLSERVER) ENU SP2 9.00.3042.00 x86 STANDARD
SQL Server Native Client ENU 9.00.3042.00 x86
Client Components ENU SP2 9.2.3042 x86 STANDARD
MSXML 6.0 Parser ENU 6.10.1200.0 x86
SQLXML4 ENU 9.00.3042.00 x86
Backward Compatibility ENU 8.05.2004 x86
Microsoft SQL Server VSS Writer ENU 9.00.3042.00 x86
**********************************************************************************
Products Disqualified & Reason
Product Reason
**********************************************************************************
Processes Locking Files
Process Name Feature Type User Name PID
**********************************************************************************
Product Installation Status
Product : Setup Support Files
Product Version (Previous): 3042
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRedist9_Hotfix_KB921896_SqlSupport.msi.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : Reporting Services (MSSQLSERVER)
Product Version (Previous): 3042
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRS9_Hotfix_KB921896_sqlrun_rs.msp.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : SQL Server Native Client
Product Version (Previous): 3042
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRedist9_Hotfix_KB921896_sqlncli.msi.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : Client Components
Product Version (Previous): 3042
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQLTools9_Hotfix_KB921896_sqlrun_tools.msp.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : MSXML 6.0 Parser
Product Version (Previous): 1200
Product Version (Final) : 6.10.1129.0
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRedist9_Hotfix_KB921896_msxml6.msi.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : SQLXML4
Product Version (Previous): 3042
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRedist9_Hotfix_KB921896_sqlxml4.msi.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : Backward Compatibility
Product Version (Previous): 2004
Product Version (Final) : 2004
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRedist9_Hotfix_KB921896_SQLServer2005_BC.msi.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
Product : Microsoft SQL Server VSS Writer
Product Version (Previous): 3042
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixRedist9_Hotfix_KB921896_SqlWriter.msi.log
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
**********************************************************************************
Summary
Success
Exit Code Returned: 0

View 4 Replies View Related

Works Fine Inside BI Dev. Studio, But Fails When Scheduling It In SQL Server 2005.

Jul 13, 2005

Hi!

View 12 Replies View Related

SQL Server 2012 :: Update Statement With CASE Statement?

Aug 13, 2014

i was tasked to created an UPDATE statement for 6 tables , i would like to update 4 columns within the 6 tables , they all contains the same column names. the table gets its information from the source table, however the data that is transferd to the 6 tables are sometimes incorrect , i need to write a UPDATE statement that will automatically correct the data. the Update statement should also contact a where clause

the columns are [No] , [Salesperson Code], [Country Code] and [Country Name]

i was thinking of doing

Update [tablename]
SET [No] =
CASE
WHEN [No] ='AF01' THEN 'Country Code' = 'ZA7' AND 'Country Name' = 'South Africa'
ELSE 'Null'
END

What is the best way to script this

View 1 Replies View Related

How To Write Select Statement Inside CASE Statement ?

Jul 4, 2006

Hello friends,
I want to use select statement in a CASE inside procedure.
can I do it? of yes then how can i do it ?

following part of the procedure clears my requirement.

SELECT E.EmployeeID,
CASE E.EmployeeType
WHEN 1 THEN
select * from Tbl1
WHEN 2 THEN
select * from Tbl2
WHEN 3 THEN
select * from Tbl3
END
FROM EMPLOYEE E

can any one help me in this?
please give me a sample query.

Thanks and Regards,
Kiran Suthar

View 7 Replies View Related

Transact SQL :: Update Statement In Select Case Statement

May 5, 2015

I am attempting to run update statements within a SELECT CASE statement.

Select case x.field
WHEN 'XXX' THEN
  UPDATE TABLE1
   SET TABLE1.FIELD2 = 1
  ELSE
   UPDATE TABLE2
   SET TABLE2.FIELD1 = 2
END
FROM OuterTable x

I get incorrect syntax near the keyword 'update'.

View 7 Replies View Related

Table Visibility Not Functioning Correctly On Server, Works Fine In Visual Studio

Feb 13, 2007

I have a report problem. I'm using a parameter to dynamically control visibility for two tables. If the parameter is set to one value, I want to switch one of the tables to invisible, if the parameter is set to another, I want the other table to be invisible instead.

This all works fine in Visual Studio. When I publish it to my report server, the visibility controls no longer function and both tables always display. Any ideas here?

I'm running 2005, SP2 CTP.

View 4 Replies View Related

Complex SQL Select Statement That Works But...

Jul 24, 2006

I have a pretty complex SQL statement that looks like this:
SELECT     aspnet_Employers.active, aspnet_Employers.accountexecutiveusername, aspnet_Employers.created, aspnet_Employers.Title AS Contact,                       SUM(aspnet_Employers.EmployeeCount) AS [# Emps], COUNT(aspnet_Signups.account) AS [# Email Addresses], COUNT(aspnet_ContactMe.username)                       AS [# Contact Me], COUNT(aspnet_AppsSubmitted.account) AS [# Apply Now]FROM         aspnet_Employers LEFT OUTER JOIN                      aspnet_AppsSubmitted ON aspnet_Employers.UserName = aspnet_AppsSubmitted.account LEFT OUTER JOIN                      aspnet_ContactMe ON aspnet_Employers.UserName = aspnet_ContactMe.username LEFT OUTER JOIN                      aspnet_Signups ON aspnet_Employers.UserName = aspnet_Signups.accountGROUP BY aspnet_Employers.accountexecutiveusername, aspnet_Employers.created, aspnet_Employers.Title, aspnet_Employers.active
It does work the way i want it, but the problem is, on my Gridview when i change the Employers accounts "Active" status either way, it changes the username field from the username of the account, to "null".
Why does it do this?
What would i change to prevent this from happening?
 
Thanks!

View 3 Replies View Related

Update Statement Works Ok But No Result

Nov 24, 2005

here is my update statement in a stored procedure:

create proc proc_add_comp
    @comp_answer nvarchar(300),
    @admin nvarchar(100),
    @comp_id int
as

update tbComp set
   
comp_answer = comp_answer + ' - ' + @admin + ', ' + @comp_answer

where comp_id=@comp_id

then I try it like this :
exec proc_add_comp 'new answer','by me',1

result is : (1 row(s) affected)

but when I look in the db, nothing was changed, comp_answer still has its old value..
comp_answer is nvarchar type column..isnt add operation allowed in update statement?
thanks...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved