Forum Replies Created

Viewing 15 posts - 3,136 through 3,150 (of 3,544 total)

  • RE: Dynamic Columns

    Is this what you want

    declare @max int 
    
    declare @ct int
    declare @sql nvarchar(4000)
    select @max = max(ColPosition)
    from frtabledef
    where jobid = @jobid
    create table...

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

  • RE: Retrieving data from linked server : access 97

    Does the counter signify a column in a table or part of a table name.

    Off the cuff and not tested you could try

    INSERT INTO sqltable

    SELECT m.*

    FROM accessdatabase...mdbtable m...

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

  • RE: BCP -line feed row terminator

    In BCP \r indicates single return character (ascii 13 0x0D) and \n indicates two characters CR/LF (ascii 13,10 0x0D0A). There is no provision (in SQL7) for just LF (ascii 10...

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

  • RE: Converting hex to int

    When you CONVERT(VARBINARY, '0x8A')

    sql converts the chars to hex (0x30783841)

    30 (0) 78 (x) 38 (8) 41 (A)

    When you CONVERT(VARBINARY, 0x8A)

    sql converts the value 0x8A to hex (0x8A)

    That is why when...

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

  • RE: QOD Cheats

    Yes. But I thought there were compatibility problems if you tried certain things? Have you had any problems?

    btw where would I get SQL2K tools if I have'nt got SQL2K!!!

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

  • RE: QOD Cheats

    I agree with what has been stated. I use testing,BOL and searching the Web to find answers depending on the question. I don't have SQL200 and since most of the...

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

  • RE: Please help me!!

    Mine works, it gives 4 fridays for 2003-05-03 to 2003-05-31, providing friday is weekday = 6.

    Also my solution (although not tested) should work for any date range and any selected...

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

  • RE: Stored Procedure for paged data like MySQL LIMIT

     DECLARE @sql1 nvarchar(4000)
    
    SET @sql1 = @sql
    SET @sql1 = REPLACE(@sql1,'SELECT' , 'SELECT IDENTITY(int,1,1) as row_num,')
    SET @sql1 = REPLACE(@sql1,'FROM ' , 'INTO #temp FROM ')
    SET @sql1 =...

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

  • RE: JOIN Problem

    You need to pivot your data, there are other threads on this forum that may help. The following is a possible solution.

    First create temp table containing details plus rowid and...

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

  • RE: Converting hex to int

    I'm on Standard Edition. Check one of our live servers and surprise, surprise it's not there. Only exists in our dev box. Don't remember putting it there

    Sorry...

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

  • RE: Converting hex to int

    Hi Frank,

    In Master. I'm on SQL7 SP4 may be it has been dropped in later versions!

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

  • RE: Please help me!!

    Not quite NPeeters, try it with '2003-05-01' to '2003-05-31', yours returns 4 when it should be 5.

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

  • RE: Please help me!!

    DECLARE@date1 datetime, 
    
    @date2 datetime,
    @Weekday int
    SET @Date1 = '01-Jun-2003'
    SET @Date2 = '30-Jun-2003'
    SET @Weekday = 6 --Fri
    SET @Date1 = (CASE WHEN DATEPART(weekday,@Date1) >...

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

  • RE: Converting hex to int

    Nice one Frank, wish I had known that a while back. Would have saved me a lot of trouble from using datatype conversions and case statement.

    Addendum

    Found sp_hexadecimal that does the...

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

  • RE: Remote login and password in linked servers

    If you are using a remote login in a linked server, that login does not need to be transferred to your new server, just create the Linked Server with the...

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

Viewing 15 posts - 3,136 through 3,150 (of 3,544 total)