Viewing 15 posts - 3,316 through 3,330 (of 3,543 total)
Are you saying
1 A Yes
1 B Yes
1 C Yes
produces
A 1
AB 1
AC 1
BC 1
and
1 A Yes
1 B Yes
1 C No
produces
A 1
AB 1
May 7, 2003 at 7:46 am
How about this for a wacky & crazy solution
create table #tblResponses (Resp int, ProdName char(1), Value varchar(3))
insert into #tblResponses values (1, 'A', 'Yes')
insert into #tblResponses values...
May 7, 2003 at 6:49 am
Can I ask some qualifying q's
How do you get 8 combinations from 3 products? If you want unique combinations then there are only 6
select a.ProdName,b.ProdName,c.ProdName
from prodx a
cross join prodx b
cross...
May 7, 2003 at 2:58 am
Since you are naming each server in turn then
INSERT INTO ##all_logins
SELECT name,'jupiter'
FROM jupiter.master.dbo.sysxlogins
WHERE name like '%Ivanov%'
INSERT INTO ##all_logins
SELECT name,'saturn'
FROM saturn.master.dbo.sysxlogins
WHERE name like '%Ivanov%'
May 6, 2003 at 6:26 am
Select into will always create a temp table.Try
CREATE TABLE
tempdb.##all_logins
([UserID] [int] IDENTITY (1, 1) NOT NULL ,
[UserName] [varchar] (100))
Then try to add records to it:
INSERT INTO ##all_logins
SELECT name
FROM jupiter.master.dbo.sysxlogins
WHERE...
May 6, 2003 at 3:23 am
Sorry, cockup on quotes (could'nt test)
DECLARE @search VARchar(3000)
DECLARE @scop VARchar(20)
DECLARE @sql nvarchar(1000)
set @scop='C:\'
set @search='ilan '
set @sql = 'SELECT TOP 10 *
FROM OPENQUERY(NTindex,
''SELECT DocTitle,create,path,filename, rank,VPath,Contents,characterization
FROM SCOPE ('''''+@scop+''''')
WHERE FREETEXT(Contents, ''''"'+@search+'"'''')'')'
exec sp_executesql...
May 2, 2003 at 11:03 am
Nice one Jay, did not think of that one. Probably make cleaner code as well.
May 2, 2003 at 10:01 am
Try this
DECLARE
@SearchField VARCHAR(100),
@A varchar(5),
@Temp VARCHAR(100),
@Output VARCHAR(100),
@counter INT
SET @SearchField = 'select1 select2 select3'
SET @Temp = @SearchField
Print @Temp
SET @Output = ''
SET @A = ''
WHILE (@Temp <> '')
BEGIN
SET @Counter = CHARINDEX(' ',@Temp+'...
May 2, 2003 at 9:53 am
The problem is you are sending the query with @scop and @search not the contents of the variables. You need to create the whole query (inc variable values) in a...
May 2, 2003 at 9:06 am
Why not user a join, it is faster and you do not need an top/order by in the subquery.
SELECT a.* FROM t_Retail a
FROM t_Retail a
INNER JOIN (SELECT Pcde6P
FROM t_Retail
WHERE LEN(RTRIM(Pcde6P))...
May 2, 2003 at 8:02 am
Don't really know if there is a best way. It depends on volume and type of data. You only gave example of 3 rows with one character data. The only...
May 2, 2003 at 7:06 am
In EM right click on the server (the one you are linking to) and select properties. Select the Connections tab, click on ANSI warnings and ANSI nulls (to put tick...
May 2, 2003 at 2:25 am
Have you tried setting them on the linked server for connections? (providing it does cause problems elsewhere!)
April 30, 2003 at 10:30 am
No but you can use goto to branch, eg
declare @ErrorNo int
(sql statement)
SET @ErrorNo = @@ERROR
IF @ErrorNo <> 0 GOTO Error_handler
(sql statement)
SET @ErrorNo = @@ERROR
IF @ErrorNo <> 0 GOTO Error_handler
RETURN
Error_handler:
(clean up)
...
April 30, 2003 at 10:21 am
Viewing 15 posts - 3,316 through 3,330 (of 3,543 total)