Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Reporting Service book

    Thanks Jon and Cris for the replies.

    I ve read about the book you mention at http://www.awprofessional.com/bookstore/product.asp?isbn=0321268288&rl=1

    There are a lot of good opinions . I will consider to buy it....

  • RE: Using Excel and SQL

    Here is an example with an excel macro that connect to a sql server without a odbc definition. Uses a querytable


    Public qt As QueryTable

    Sub qq()

        sqlstring = "use yourdatabase UPDATE ....." &...

  • RE: concatenate strings from a select

    Thank you all. Each answer help me a lot.

    Kind Regards

  • RE: How to output to a text file from a cursor query

    Try this, it works for me.

    declare @filename varchar(200),

     @ole INT,

     @file INT,

     @fs INT,

     @archivo VARCHAR(100),

     @trenutniRed varchar(200)

    set @archivo='e:\apps\mssql7\backup\testtxt.txt'

    SELECT @trenutniRed = 'del '+ @archivo

    EXEC master..xp_cmdshell @trenutniRed, NO_OUTPUT

     

    EXECUTE @ole = sp_OACreate 'Scripting.FileSystemObject',

  • RE: Dynamic SQL query

    Tks Frank, that´s the point. I´ve too many code in my head that I can´t see it.

     

  • RE: Dynamic SQL query

    here it is..

    declare @qq varchar(4000)

    declare @columna1 varchar(255)

    set @columna1 = '171,5710'

    set @qq = 'select *  from tligfact

    where rtrim(ligfaccalculcode) in ('+@columna1+')'

    exec sp_executesql @qq

    result :

    Server: Msg 214, Level 16, State 2,...

  • RE: Dynamic SQL query

    Ok,many thanks

    but what I´m trying to do is something more complex...

    Select aa, bb, 'Neto Gravado'= sum(case  when tligfact.ligfaccalculcode

     in ('5701','5702','5703','5704','5705','5706','5707','5708','5709','5710','5711','5712','5713','171','172','12','16','28','180','5608','7709') then 0

    else (tligfact.ligfacunitprice*tligfact.ligfacqtefac) end)

    from tligfact where ......

    If I...

Viewing 7 posts - 1 through 7 (of 7 total)