Viewing 15 posts - 1,876 through 1,890 (of 3,221 total)
My former post was run PRIOR TO NOON. Following up on Michael Valentine Jones forum post ... running at
2010-06-22 12:41:59.030 or after noon gives
14782 and 14783. ...
June 22, 2010 at 10:49 am
select ((DateDiff("d",'01/01/1970', getdate())) * 1)
select ((DateDiff("d",'01/01/1970', cast(getdate() as numeric) )) * 1)
Results:
(No column name)
14782
(No column name)
14782
When running on my SQL Server 2008 as you can see there is NOT a...
June 22, 2010 at 9:20 am
PLease be aware of: (From Books On Line)
Because @@ERROR is cleared and reset on each statement executed, check it immediately following the statement being verified, or save it to a...
June 19, 2010 at 12:16 pm
research-1077696
Note that the T-SQL code that I posted using my assumption of your table structure, which of course is most likely incorrect in that I selected as the primary key...
June 17, 2010 at 7:05 am
Without a trigger you could:
CREATE TABLE [dbo].[Table1]([Custid] [nchar](9) NOT NULL,[Cname] [nvarchar](75) NOT NULL,
CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED ([Custid] ASC))
CREATE TABLE [dbo].[Table2]([CTEID] [int] IDENTITY(1,1) NOT NULL,[CustId] [nchar](9) NOT NULL,
CONSTRAINT...
June 16, 2010 at 5:04 pm
Read this SSC article on running the default trace. Default trace - A Beginner's Guide
By Adam Haines,
http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/
In it you will find code that will return the application name.
Here...
June 16, 2010 at 3:52 pm
paul s-306273
As for posing a question, I don't actually have access to SQL Server, so I'd feel that was a bit of a fraud.
Sorry to hear that you...
June 16, 2010 at 1:06 pm
Here is one method of showing a decimal value in the format you requested.
DECLARE @V DECIMAL(18,4)
SET @V =10001.5768
SELECT REPLACE(convert(nvarchar(15), cast(@V as money), 2),'.',',')
Result:
10001,5768
June 16, 2010 at 10:50 am
As steveb said:
DECLARE @First DECIMAL(8,0)
DECLARE @Second DECIMAL(8,2)
SET @First = 1233555
SET @Second = @First / 100
SELECT @Second
June 16, 2010 at 9:36 am
This will export data to a CSV file .....
From DB table to text file. the text file must exist. Text file must have a first line of comma...
June 16, 2010 at 8:30 am
YSLGuru
MANAGEMENT - The problem (from personal experience) is that far too foten the managemnt or decission makers are often programmers themselves and unless they have at least a respect...
June 15, 2010 at 2:00 pm
Phil Parkin
Reverse the string, find the first occurrence in the reversed string and then subtract that from the total string length
And here is a link that explains the REVERSE...
June 15, 2010 at 1:16 pm
If this is a one time or very infrequent requirement I suggest using the Excel work book and not T-SQL. Refer to the following from Microsoft on ways to...
June 15, 2010 at 8:52 am
Jon Russell
Cris E - Another example to Andy's point, "a focus on just storing the data and not on using all the other things that can insure both data integrity...
June 15, 2010 at 8:42 am
paul.knibbs
If all people want to do is earn points, they can just wait until the day after the question is asked (when the answer is given on the daily e-mail)...
June 15, 2010 at 6:16 am
Viewing 15 posts - 1,876 through 1,890 (of 3,221 total)