First  |  Prev |  Next  |  Last
Pages: 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
How to flush the output in a T-SQL script
Very often I need to do the following: declare @YR int set @YR = 1993 while (@YR < 2010) begin print getdate() ... set @YR = @YR + 1 end This helps me keep track of where the script is. The problem is, nothing prints out until the end, when I get all the printings at one time, which of cour... 13 Apr 2010 11:43
Return 0 (zero) when null
SQL Server 2008 I have a calculated field like (Car.CarTot + Car.CarTax + Car.CarOther) - (Order.SubTot + Order.Taxes + Order.Other) My problem is this field sometimes returns Null When Values in "Order" is null. I would like to have 0 instead of Null Thanks for your help ... 24 Apr 2010 10:33
Trigger question
CREATE TABLE tblA ( Symbol varchar(50) NOT NULL, APIFormat varchar(50) NULL, DataFormat varchar(50) NULL ) I would like to do the following: If a new row is added or APIFormat is edited, and DataFormat is not being updated, I would like to set DataFormat like ... 13 Apr 2010 05:07
call sp from another sp
CREATE PROCEDURE usp_main @param1 nvarchar(128), @param2 varchar(10) AS EXEC general_select @tblname =@param1,@key =@param2 --Usage EXEC usp_main @param1 ='TBL',@param2 ='BLABLA ' "GW" <GW(a)discussions.microsoft.com> wrote in message news:EBCB1789-67FE-4937-AAF1-22AF8A20523E(a)microsoft.com... ... 12 Apr 2010 11:26
scripting an object
Hi, I have to change all column to unicode in our database. We use VC++ and OLEDB to access MS SQL Server databases. In case of varchar, char columns need to remove indexes of the columns during change its type (to nvarchar, nchar with 'ALTER TABLE table name ALTER COLUMN columnname nvarchar(...)' command). T... 13 Apr 2010 07:17
Get Month and Year from death field
I havedate/time field that stores value like 2010-4-10 00:00:00 I need to get the month and year like Apr-2010 or April-2010 I tried... (DATEPART(MONTH,WRKODR.DateDel) + DATEPART(Year, WRKODR.DateDel)) As MTYr It returns 2010 in some cases 2011... I think it just add month to year... I need help Thanks i... 12 Apr 2010 19:16
select * query excluding one field in sql server
I want to write a SELECT query for all fields except for one field that I want to exclude from the select statement. Let say I have a table containing 150 fields; I want to read 149 fields and exclude one field e.g Field_126 Is it possible to get this done without listing 149 fields explicitly? ... 9 Apr 2010 20:07
Problems inserting into attached MDF from MFC
Using Visual Studio 2008, MFC, C++, I am doing the following: CDatabase db; db.OpenEx(_T("Driver=SQL Server; Server=SUEDE\\SQLEXPRESS; Integrated Security=true; AttachDbFilename=C:\\Temp\\DesignList.mdf;"), CDatabase::noOdbcDialog); CDesignData rs(&db); rs.Open(); BOOL bUpdatable = rs.CanUpdate(); BOOL ... 8 Apr 2010 21:57
CPACKET
un soucis sur mon serveur SQL 2005 , lorsque je lance une procedure stockée qui fait un gros select elle genere des locks internes CPACKET et ne retourne rien !!! lorsque je lance le code SQL de la procedure en y mettant en dur les variables ca marche en 10 secondes j'ai trouvé des articles qui parlent de... 8 Apr 2010 16:20
Need Assistance with a SQL query
I am a novice and need assistance. I have a table create table Data_price ( name varchar (34), current_price dec (12,2), current_prc_date datetime, prev_price dec (12,2), prev_prc_date datetime ) insert into Data_price values ( 'How to help', 24.99, 04/06/2010,29.99, 01/16/2010) insert... 12 Apr 2010 19:16
First  |  Prev |  Next  |  Last
Pages: 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67