Forum Replies Created

Viewing 15 posts - 2,011 through 2,025 (of 3,544 total)

  • RE: Question of the Day for 16 Jan 2006

    Thank you Steve.

    Must read the questions more carefully, the question meant property fields

    and never trust MS documentation http://msdn2.microsoft.com/en-us/library/ms210363.aspx 

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Question of the Day for 16 Jan 2006

    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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Translate this in a stored procedure

    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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Dynamic Insert

    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]...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Loop or Cursor needed? Questions on SQL Query...

    Do as Vladan suggests (he always seems to get the best ideas )

    or select the guids into a temp table and

    select...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to encorporate IF

    Unless it it the sum of unique rmstranamt's that is required

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to return more than one column with the READTEXT HELP!!!

    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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to encorporate IF

    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

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Loop or Cursor needed? Questions on SQL Query...

    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 =...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Normalization question...

    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    ...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Normalization question...

    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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: varchar size overflow

    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...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: First Poll for 2006

    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.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Join On Null??

    use LEFT OUTER JOIN for any column that maybe null and check for null when ouput (as per p.firstName etc)

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SELECT DISTINCT

    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])...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 2,011 through 2,025 (of 3,544 total)