Forum Replies Created

Viewing 15 posts - 4,216 through 4,230 (of 8,731 total)

  • RE: Import of Excel or Txt File into Database

    Does the server have access to the path specified?

    You might want to check this thread as well: http://www.sqlservercentral.com/Forums/Topic1300136-392-1.aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Import of Excel or Txt File into Database

    All the options work if done properly, you might get better help if you share the errors you get or the problems you face.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Today's Random Word!

    ZZartin (9/11/2015)


    Pizza

    Always

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Remove weird character from one of my SQL tables

    This can help you find unicode characters that you might not want. It will return the string and the characters, you just need to change the test table to your...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Remove weird character from one of my SQL tables

    You might have characters that are not NCHAR(65533).

    You need to identify the characters that don't belong to your dataset.

    CREATE TABLE #CharsTest(

    nstring nvarchar(100));

    INSERT INTO #CharsTest

    VALUES

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: UPDATE or MERGE or help me God

    xynergy (9/11/2015)


    Dude, I just went from 4 minutes to a few seconds on that task!

    Its pure awesomeness... Thanks both for your help... I'll carry on working on my frontend...

    Cheers! :hehe:

    A...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Import of Excel or Txt File into Database

    You can use BULK INSERT to import from a csv or (any flat file).

    You can also use OPENROWSET to query the Excel file as a table and insert the rows...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: CURSOR - Is that a normal behaviour?

    Emil B (9/11/2015)


    I was reading https://msdn.microsoft.com/en-us/library/ms180169%28v=sql.110%29.aspx

    and was trying to find out what is the default behavior but it only says that:

    If FORWARD_ONLY is specified without the STATIC, KEYSET, or...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How To Pivot AN Unknown Number Of Rows To Columns Using Data As The Column Headers

    Or at Jeff's series on cross tabs and pivots: Part 1[/url] & Part 2[/url].

    Personally, I try it to keep it simple by using the concatenation method explained in here: http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    And...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: UPDATE or MERGE or help me God

    Thank you for the reference on the article, but this problem doesn't seem to need a loop. A single update can do the job.

    CREATE TABLE Table1(

    EntryID...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How do I copy several records from one server to another?

    I would use the Import/Export wizard that will create an SSIS package that you can save for future executions or dismiss after running it once.

    It allows you to use queries...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Get the total number of attachments of a group ID

    That's easy, just add a where clause.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Get the total number of attachments of a group ID

    Something like this?

    --UPDATE t SET ID_NumofAttach = x.ID_NumofAttach

    select *

    from #temp t

    CROSS APPLY (

    SELECT SUM( CAST( i.ID_AttachLvl AS int)) ID_NumofAttach

    FROM #temp i

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Retrieving Null Values

    Your query will only return rows where the region starts by null, which is different from a NULL value.

    To compare NULL values, you need to use IS NULL or IS...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: CURSOR - Is that a normal behaviour?

    STATIC cursors create a copy of the data to keep it the way it was at the creation of the cursor. If not used, the cursor will continue to read...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 4,216 through 4,230 (of 8,731 total)