Description:
Microsoft SQL Server newsgroup.
|
|
|
SQL Case Select
|
| |
Hope you can help, I thought this would work but doesn't, SELECT getdata= case(@who) When 'me' then (select col1, col2, col3) When 'him' then (select col4, col5, col6) When 'them' then (select col1, col3, col5) else '' end From dbo.mytbl Where ID= @ID End Thanks for any help!
|
|
SQL question
|
| |
I'm trying to retrieve the establishments that have at least one record with a value of 1, 2 and 3 in CodeFonctionCategorie. I don't care how many records there are per establishment. In the example below, I want to retrieve Establishments 612, 8401, 25538 and 45935. Establishment 3659 only has records with 2 and 3, and establishment 42650 only has 1 and 2.... more »
|
|
recovery mode
|
| |
Hi, my database is simple recorvery model now, what's the good/bad things if I swith to full? thanks...
|
|
QA - edit procedure shows "create"
|
| |
SQL 2000 Query Analyzer. Well this seems very odd to me. Every stored procedure I can ever remember doing this with has never done this. When you have the object browser open and right click a stored procedure, one of the options is "edit". When you click that option, the procedure opens up and the definition starts with "ALTER PROCEDURE..."... more »
|
|
INSERT INTO behaviour???
|
| |
Hi all I was just writing a quick insert INTO and got an error Msg 156, Level 15, State 1, Line 15 Incorrect syntax near the keyword 'ORDER'. INSERT INTO [Test].[dbo].[address1] ( [ID] , [customerId] , [line1] , [line2] ) ( SELECT [ID] ,... more »
|
|
display duplicates
|
| |
Hi Champs, I do have a table in which machine info is stored. It does has lot of duplicate entries. I have written a simple code to list them.. select a.Name0,count(*) from v_r_system group by Name0 having count(*)>1 This code list me all the duplicate machine entries(258 rows) with the count. Now, i would like to join 2 more tables and give some additional condition... more »
|
|
replicating euro symbol from oracle to sqlserver
|
| |
Hi, I have a problem regarding euro symbol (?) replication from Oracle to SQLserver2005. At oracle side we have a column containing ? (euro symbol). which is being replicated to sql server. The select statment for that column displays that symbol as (?) question mark. The column at oracle is varchar(512) and at sqlserver side is nvarchar(512)... more »
|
|
Stored Procedure Update on Multiple Servers
|
| |
Hi, I am wondering if this is at all possible, I have a number of SQL Server 2000/2005 servers with different names with the same database name on them but within different locations and containing different data depeneding on the location but all the structures are the same. At the moment what I have to do is when changing a Stored Procedure or... more »
|
|
Truncate Table Table variable
|
| |
Hi, Sql Server 2005 I am using table variable with in a stored procedure and within a table variable i am using identity field. Sometimes I required to truncate the table variable to rseed the identity, but truncate table variable, dbcc checkident are not working. Any idea... Declare @Columns Table(id Int Identity(1,1), [Name] VarChar(155));... more »
|
|
Database Unit Testing Comparison?
|
| |
Not sure if this is the right forum for this, but here goes... I have a Visual Studio 2008 GDR Database Unit Test (Data Dude) with some TSQL that calls a sproc. I then have a single select statement that produces a 1-row result set with 2 columns. I want to pass the test if the values are equal and fail if it is not equal. I do not... more »
|
|
|