Forum Replies Created

Viewing 15 posts - 826 through 840 (of 1,249 total)

  • RE: How to slect data from table ?

    Create a table valued function that returns the delimited string as a column in a table. Join whatever table you are working on to this table (valued function) on the...

    ----------------------------------------------------

  • RE: Killing all sessions and restoring the database

    declare tmpcursor cursor for

    select 'kill ' + convert(varchar, spid) as spid

    from master..sysprocesses

    where db_name(dbid) = @dbname

    and spid <> @@spid

    and dbid <> 0

    Markus out of curiosity,...

    ----------------------------------------------------

  • RE: SSRS textbox code not working properly

    In more detail, what exactly is the code 'supposed' to do ?

    ----------------------------------------------------

  • RE: Extremely slow report rendering in SSRS 2008 R2 in Internet Explorer 8

    I think this is related to why I get faster results in SSMS when I export to text rather than to grid. The rendering engine plays a part in the...

    ----------------------------------------------------

  • RE: Tricky SQL Query

    Thanks for the feedback, glad this worked out for you.

    ----------------------------------------------------

  • RE: Conversion of Date from legacy systems with 7 and 6 digit format to DD/MM/YYYY format

    CELKO (12/19/2014)


    We are migrating data from old DB2 systems to sql server 2012, the DATE FORMAT in those systems is in decimal format with 7 digits. CYYMMDD format. I...

    ----------------------------------------------------

  • RE: Acessing Unix files directly through SSIS

    Orlando Colamatteo (12/17/2014)


    Just for the record, CHAR(253) is not Unicode.

    Hi Orlando,

    Hmm, I guess I am not clear on what you mean... I just saw that unicode decimal 253 is the...

    ----------------------------------------------------

  • RE: Calculating Last 5 Business Days and Next 5Days

    Agreed, its not hard on my eyes either. I am trying to get into the mind of someone that has not seen this syntax before. It is not that difficult...

    ----------------------------------------------------

  • RE: Calculating Last 5 Business Days and Next 5Days

    jshuter (12/17/2014)


    I understand the need to use SQL when doing SQL but a little looping wont kill ya 🙂

    I'd still do something like the following

    declare @i int =...

    ----------------------------------------------------

  • RE: SQL doesn't see .bak file?

    Under SSMS> Server Objects, >

    there is a Backup Devices folder. Here you can easily create a .bak file and easily find it later as well through here. You can point...

    ----------------------------------------------------

  • RE: Select bottom 25%

    Statistically speaking you want the first quartile, so borrowing on Matt's solution I would just shift a few things to make it intuitive ...

    with MYcte as (

    selectMAINGROUP,vALUE, NTILE(4) OVER...

    ----------------------------------------------------

  • RE: Database column size increased but SSIS package not reflecting the change

    I find in these situation I save a lot of time by dropping the source and creating a new one. If I had SQL coded I copy it ahead of...

    ----------------------------------------------------

  • RE: Better to store 0 or null in a column

    0 means 0 , NULL means unknown. They are not the same.

    One approach if you do not want to have nulls in your table is to have a "magic"...

    ----------------------------------------------------

  • RE: Acessing Unix files directly through SSIS

    mitesh.temre (12/17/2014)


    lvbntapasvi (9/6/2014)


    Hello All,

    I am new to SSIS, and have started using it from the past 3 weeks. I have a task where in I am supposed to access the...

    ----------------------------------------------------

  • RE: Conversion of Date from legacy systems with 7 and 6 digit format to DD/MM/YYYY format

    Luis Cazares (12/9/2014)


    Should I insist on this method? I just added a NULLIF function and it works.

    SELECT CAST( CAST( 19000000 + NULLIF(oldDate, 0) AS CHAR(8)) AS date)

    FROM( VALUES('0980412'),('1100323'), ('0'))x(oldDate)

    I think...

    ----------------------------------------------------

Viewing 15 posts - 826 through 840 (of 1,249 total)