Viewing 15 posts - 2,266 through 2,280 (of 3,221 total)
Cos_ta393
Your welcome.
It makes me feel good that in some small way I may have assisted someone solve a problem for in so doing I find myself learning something...
December 4, 2009 at 3:16 pm
Before making the transfer to the User Acceptance Testing (UAT) server may I suggest you read the following, if you have not already done so.
SQL Server 2005 Books Online...
December 4, 2009 at 1:30 pm
Sorry about that link being faulty. Use books on line and search for:
CURRENT_USER (Transact-SQL)
Functions That Return User Names and User IDs
SESSION_USER (Transact-SQL)
USER (Transact-SQL)...
December 4, 2009 at 12:46 pm
Run this two (2) stored procedures on each of your servers and database(s)
sp_Helplogins
sp_helpuser
Compare the results from each server and each database. This should allow you to determine which have...
December 4, 2009 at 12:37 pm
Let me refer you to Books On Line
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/e31254f1-6c41-4cbf-98b5-54daa7f81fd9.htm
and you can learn how to use the user's login name or user name.
December 4, 2009 at 11:52 am
Lynn Pettis
Hate to be picky but if the ; is at the end of the last T-SQL code line (not a comment line) before the WITH, then doesn't that...
December 4, 2009 at 11:47 am
cos_ta393
Other than creating and using a temp table (solely to make it easy for me to test). Jason's code ran fine - now I did use the column...
December 4, 2009 at 10:25 am
Finally got my SQL 2000 back up and running and came up with this.
DECLARE @ThisDate DATETIME;
set @ThisDate = '12/31/07';
DECLARE @NxtDate DATETIME;
DECLARE @Wk_Num INT;
SET @Wk_Num = 1;
DECLARE @C INT;
SET @C =...
December 4, 2009 at 10:01 am
This might be a beginning to create the date table you requested:
declare @ThisDate datetime;
set @ThisDate = '12/31/07';
DECLARE @Wk_Num INT;
SET @Wk_Num = 1;
DECLARE @C INT;
SET @C = 1
DECLARE @monday DATETIME;
CREATE TABLE...
December 3, 2009 at 5:00 pm
Here is an excellent article on creating a date calendar that you could modify to insert only Mondays and work with that table.
Author Sean Smith, 2009/10/29
http://www.sqlservercentral.com/scripts/Date/68389/
Edited 4:23...
December 3, 2009 at 2:21 pm
Might I suggest reading this SSC article by Lynn Pettis
https://www.sqlservercentral.com/blogs/lynnpettis/archive/2009/03/25/some-common-date-routines.aspx
December 3, 2009 at 11:58 am
kalyan sankar
I have a numeric(9,4) columnA
If you insert 7.89 / 1.8 into a numeric(9,4) column they will exist in the table as 7.8900 / 1.800
CREATE TABLE #T(ColumnA Numeric(9,4))
INSERT...
December 2, 2009 at 12:07 pm
vision59
This seems to work - but without your data/table structure and very, very limited testing on my part:
CREATE TABLE #Ta(aid INT,Type VARCHAR(3))
INSERT INTO #Ta
SELECT 1, 'AB' UNION ALL
SELECT 1,...
November 29, 2009 at 3:06 pm
mr_adeelalisyed
You may want to use code like this:
CREATE TABLE #FirstLevelChangeDetail(CapturedDate DATETIME,DbTotal INT,RecordNumber INT)
INSERT INTO #FirstLevelChangeDetail
SELECT '1/1/09',20,1 UNION ALL
SELECT '1/1/09',50,3 UNION ALL
SELECT '1/1/09',21,5 UNION ALL
SELECT '1/2/09',50,1 UNION ALL
SELECT '1/3/09',50,1
;with...
November 29, 2009 at 2:15 pm
David Data
I'm still trying to get to grips with connection strings, and there are all the examples one could ever want!
I have used this code for years, figuring it is...
November 29, 2009 at 6:28 am
Viewing 15 posts - 2,266 through 2,280 (of 3,221 total)