Viewing 15 posts - 1,786 through 1,800 (of 3,543 total)
Sorry my bad
Try this
DECLARE @srvname varchar(255)
CREATE TABLE #temp (srvname sysname,dbname sysname,oname sysname,uname sysname,uid smallint)
DECLARE mycurs CURSOR FOR
SELECT srvname FROM master.dbo.sysservers...
August 17, 2006 at 3:05 am
Yeah that has happened to me, sometimes either way works sometimes not
May be MS should call them 'Sticky Cells'
August 16, 2006 at 7:29 am
Answer is no but you do not need a UNION use CASE instead
SELECT *
FROM tblCountry
ORDER BY CASE WHEN Country_Id = 26 THEN 1 ELSE 2 END, Country_Name
August 16, 2006 at 6:27 am
![]() | Watch out setting the row number to a large number as dts will process theses rows |
Not for me...
August 16, 2006 at 3:04 am
Set Last Row to a very high number eg 999,999,999
August 15, 2006 at 6:31 am
Not sure what your problem is but I doubt if SQL is confused about INSERT or UPDATE, maybe your code logic is.
To to do what you are doing then I...
August 11, 2006 at 7:03 am
alter Procedure testLoad
(
@FileName varchar(50),
@Logon varchar(20),
@BusArea_out char(2)OUTPUT,
@PayId_out char(3)OUTPUT,
@CycleNo_out char(7)OUTPUT
)
As
SET NOCOUNT ON
DECLARE @File_Exists int,
@textfile char(150),
@BusArea char(2),
@PayId char(3),
@Login varchar(20),
@CycleNo char(15),
@FHBusArea char(2),
@FHPayId char(3),
@FHCycleNo char(15),
@TrBatchPoNo char(10),
@rename varchar(255),
@file_extn datetime
SELECT @BusArea = SUBSTRING(Col001,194,2),
@PayId = SUBSTRING(Col001,196,3),
@CycleNo...
August 11, 2006 at 6:37 am
Alternatively if you want all the results in one table then
DECLARE @srvname varchar(255)
CREATE TABLE #temp (dbname sysname,oname sysname,uname sysname,uid smallint)
DECLARE mycurs CURSOR FOR
SELECT srvname FROM master.dbo.sysservers WHERE...
August 11, 2006 at 2:21 am
The query returns queries that you paste into another QA window to execute.
Sorry for any confusion
If you want the query to execute the...
August 11, 2006 at 2:02 am
Why are Table2 and Table3 separate, what is unique about them for them to be separate?
If they were one table your contraints would be easier to implement
August 10, 2006 at 6:20 am
Check the table that is being updated has a uniqure index on it
Plus I thought updates had to be like
UPDATE OPENROWSET('SQLOLEDB','xxx.xxx.xx.xxx';'user';'PWD',
'SELECT myCol FROM MyDB.dbo.TEST WHERE mycol=2222')
SET myCol =...
August 9, 2006 at 7:37 am
SELECT col1,
CAST(SUM(ABS(SIGN(Col2 - 1)) ^ 1) as varchar) + '/' + CAST(COUNT(*) as varchar) AS [Rate],
COUNT(*) AS [Total]
FROM @test-2
GROUP BY col1
August 9, 2006 at 7:08 am
EXECUTE('select * from [' + @dbname + '].dbo.sysfiles')
to stop sql injection attack
August 9, 2006 at 6:45 am
Viewing 15 posts - 1,786 through 1,800 (of 3,543 total)