Viewing 15 posts - 2,011 through 2,025 (of 3,543 total)
Can someone clarify the supposed correct answer
Server.SetDefaultInitFields has one parameter, allFields, and is a boolean and therefore cannot be set to 'list of fields you need returned'
if set to False 'objects...
January 16, 2006 at 7:06 am
A possible alternative
DECLARE @chars varchar(255), @code varchar(6)
SET @chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
SET @code = ''
SELECT @code = @code + [char]
FROM
(SELECT TOP 6 SUBSTRING(@chars,number,1) AS [char]
FROM master.dbo.spt_values WHERE type = 'P' AND number...
January 13, 2006 at 7:26 am
You could try with dynamic sql, first run this (change the name of the excel file)
SELECT *
INTO #temp
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;HDR=YES;Database=C:\temp\book1.xls', [sheet1$])
SELECT colid,[name]
FROM tempdb.dbo.syscolumns
WHERE [id] = OBJECT_ID('tempdb.dbo.#temp')
AND [name]...
January 13, 2006 at 7:12 am
Do as Vladan suggests (he always seems to get the best ideas )
or select the guids into a temp table and
select...
January 13, 2006 at 2:23 am
Unless it it the sum of unique rmstranamt's that is required
January 12, 2006 at 9:53 am
To display an image to the client
Get the data into a byte array as per Eriks example, e.g. Buffer
Then put the data in a PictureBox
Dim ms AS MemoryStream = new...
January 12, 2006 at 7:21 am
SELECT RMSFILENUM, SUM(rmstranamt) AS [rmstranamt10]
FROM (SELECT RMSFILENUM, rmstranamt AS rmstranamt10
FROM RFINANL
WHERE RMSTRANCDE = '10'
GROUP BY RMSFILENUM, rmstranamt) x
GROUP BY RMSFILENUM
January 12, 2006 at 6:47 am
CREATE TABLE #temp (userid int)
INSERT INTO #temp (userid) SELECT userid from [users]
DECLARE @maxq int, @qid int,@sql nvarchar(4000)
SELECT @maxq = MAX(questionid) FROM [questions]
SET @qid = 1
WHILE @qid <= @maxq
BEGIN
SET @sql =...
January 12, 2006 at 6:42 am
If you enforce the non duplication then I see no problem with that method, i.e.
E1 E2 x y z
-- -- --- --- ---
1 5 0.1 0.2 0.3
or
E1 E2 x y ...
January 12, 2006 at 5:22 am
Agree with Chris
If your data was in two tables then the joining table would not be an issue the only peculiarity is that the joining (interaction) table references one table instead...
January 12, 2006 at 4:12 am
You could try this, but probably not the best solution (make sure the input ends with a comma !!!)
CREATE PROC usp_GetColumnName @ptr varbinary(16), @start int, @length int
as
READTEXT #temp.search_clause...
January 9, 2006 at 11:07 am
It's hard to soar like an Eagle when you work with Turkeys
and... not really a saying but....
Far away is close at hand in the images of elsewhere
Anon.
January 6, 2006 at 2:48 am
use LEFT OUTER JOIN for any column that maybe null and check for null when ouput (as per p.firstName etc)
January 5, 2006 at 7:10 am
Not possible as the 'unique column' will prevent distinction
You will either have to
ignore the 'unique column' e.g.
SELECT col1,col2,col3 FROM GROUP BY col1,col2,col3
or aggregate the 'unique column' e.g.
SELECT col1,col2,col3,MIN([unique column])...
January 5, 2006 at 6:53 am
SELECT Employee, [DateTime], Status
FROM @table a
WHERE NOT EXISTS(SELECT * FROM @table b
WHERE b.Employee = a.Employee
AND b.[DateTime] = a.[DateTime]-1
AND b.Status = a.Status)
ORDER BY Employee, [DateTime]...
January 5, 2006 at 4:05 am
Viewing 15 posts - 2,011 through 2,025 (of 3,543 total)