Viewing 15 posts - 1,756 through 1,770 (of 3,544 total)
| ...the '00' unicode country code in these examples sticks out like a sore thumb... |
Thanks Jeff ![]()
Far away is close at hand in the images of elsewhere.
Anon.
October 4, 2006 at 1:49 am
Try
CAST([columnname] as nvarchar(100))
Far away is close at hand in the images of elsewhere.
Anon.
October 3, 2006 at 10:18 am
Change
set @mysql = 'select count(*) from ' + @myname
select @mycnt = count(*) from @myane
set @mycnt = execute(@mysql)
to
set @mysql = 'select @mycnt=count(*) from ' + @myname
exec sp_executesql @mysql, N'@mycnt int...
Far away is close at hand in the images of elsewhere.
Anon.
October 3, 2006 at 10:04 am
Ah, OK ![]()
Besides any solution will require a SELECT/JOIN because of the INSERT
Far away is close at hand in the images of elsewhere.
Anon.
October 2, 2006 at 7:07 am
Heck, I only found out when I experimented before my first post ![]()
There is always something in SQL to catch me out
Far away is close at hand in the images of elsewhere.
Anon.
October 2, 2006 at 6:57 am
| Don't use NOT EXISTS. It forces the whole table to be looked at because it has to check... |
Far away is close at hand in the images of elsewhere.
Anon.
October 2, 2006 at 6:49 am
If data consists of fixed values then use CASE statements and GROUP BY
If data consists of variable values then create a function to concatenate data for and use it...
Far away is close at hand in the images of elsewhere.
Anon.
October 2, 2006 at 6:22 am
But for uniqueness it is 4.
ie add 3 or 4 milliseconds to 13 milliseconds and you will get 17 milliseconds for both ![]()
Far away is close at hand in the images of elsewhere.
Anon.
October 2, 2006 at 2:04 am
The only way I can think of is to use temp table/table variable to store the unique key of the selected records plus IDENTITY column and update datetime using the...
Far away is close at hand in the images of elsewhere.
Anon.
September 29, 2006 at 7:19 am
Just some observations
You will not be able to update the new column in a set based update unless all of your dates are valid or SQL will stop at the...
Far away is close at hand in the images of elsewhere.
Anon.
September 28, 2006 at 6:45 am
You could try to reduce the rows selected in the Linked Server like this
UPDATE u
SET [LinkCol_1] = l.[LocalCol_1]
FROM OPENQUERY(LinkedServerName, 'SELECT [LinkCol_ID],[LinkCol_1] FROM DBName..TblName WHERE LinkCol_3]=''ABC''') u
INNER JOIN...
Far away is close at hand in the images of elsewhere.
Anon.
September 25, 2006 at 7:11 am
Something like this
IF ((SUBSTRING(COLUMNS_UPDATED(),1,1) & 128) > 0 OR
SUBSTRING(COLUMNS_UPDATED(),2,1) > 0 OR
(SUBSTRING(COLUMNS_UPDATED(),3,1) & 7) > 0) AND
EXISTS(SELECT * FROM [2nd table] WHERE ...)
RAISERROR ('Record is...
Far away is close at hand in the images of elsewhere.
Anon.
September 21, 2006 at 9:02 am
or
DATENAME(month,DATEADD(month,[monthcolumn],-1))
Far away is close at hand in the images of elsewhere.
Anon.
September 21, 2006 at 7:48 am
Are you looking for SQL Server solution?
Translate Access to TSQL first
SELECT @YearInput AS [input],
s.Department,
s.DateAwarded,
s.StudentNumber,
p.Forenames AS fore,
p.Surname AS Sur,
s.Mode,...
Far away is close at hand in the images of elsewhere.
Anon.
September 19, 2006 at 7:53 am
DECLARE @months int
SET @months = DATEDIFF(month,@firstdate,@seconddate)
SELECT @months % 12 AS [Months],@months / 12 AS [Years]
Some more detail and example data and results would be helpful
Far away is close at hand in the images of elsewhere.
Anon.
September 19, 2006 at 6:37 am
Viewing 15 posts - 1,756 through 1,770 (of 3,544 total)