Forum Replies Created

Viewing 15 posts - 5,836 through 5,850 (of 8,731 total)

  • RE: return this one column into three columns

    Maybe something like this:

    WITH SampleData AS(

    SELECT 1 n UNION ALL

    SELECT 2 n UNION ALL

    SELECT 3 n UNION ALL

    ...

    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: Are the posted questions getting worse?

    Ed Wagner (9/11/2014)


    Heh - We just got our driveway paved with asphalt on Tuesday (the day before the rain) and our dog doesn't know what to do any more. ...

    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: Using COALESCE and also trying to multiply and divide

    Thank you, Tom.

    I guess I shouldn't have taken the quote from Wikipedia. My mistake.

    PS. It's great that you can create cables on SQL :-D:hehe:

    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: Using COALESCE and also trying to multiply and divide

    Your little example is really nice, real life isn't like that.

    Please find the errors in the following code:

    INSERT INTO dbo.FactInternetSalesCopy

    (ProductKey, OrderDateKey, DueDateKey, ShipDateKey, CustomerKey, PromotionKey, CurrencyKey,

    ...

    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

    If my guessing skills are working fine, you want a result set which in some coding languages is called a cursor. A cursor in SQL Server is very different 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: First Web Page to Query Sql Server

    If you're interested on having help in the same place for front and back end, you might want to use SQL Server with visual studio and take a look at...

    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: Using COALESCE and also trying to multiply and divide

    CELKO (9/11/2014)


    The single line is a bouma; a semantic unit read as a whole. My PROGRAMMING STYLE goes into some of the research we collected at AIRMICS on this. 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: Check the Variable is Empty or Null

    SimonHolzman (9/10/2014)


    Alan.B (9/9/2014)


    IF @user > '' --This checks for not null and not empty

    Please don't do this... It's one of the things that drove me crazy with c programmers -...

    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: Check the Variable is Empty or Null

    Eugene Elutin (9/10/2014)


    Alan.B (9/9/2014)


    IF @user > '' --This checks for not null and not empty

    Cool. I never knew you could do that, very interesting :laugh:

    Edit: sql code tag messed up...

    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: Check the Variable is Empty or Null

    Are you seeing (ampersand)gt(semicolon)? That's a "greater than" sign showed like that by this site. You should use the normal sign in your query.

    If you see the "greater than" sign,...

    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: Check the Variable is Empty or Null

    To complement what David said, you need to use AND instead of OR.

    Of course, you could go with the simple way of doing it.

    declare @user varchar(30) = ''

    IF @user >...

    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: load multiple excel files(with different number of rows in every file) into a single table

    You're right.

    But with no question, there's no wrong answer. 😀

    "If you don't know where you are going, any road will get you there." - Lewis Carroll

    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: load multiple excel files(with different number of rows in every file) into a single table

    You need to use 2 data flow tasks.

    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: Can't log out.

    New Born DBA (9/9/2014)


    Luis Cazares (9/9/2014)

    On a server? Are you serious?:w00t:

    Yes on the server. I asked one of co-worker to RDP into the server and kick me out but he...

    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: Denormalising Data

    Here's an option to read the table once based on Tom's post and cross tabs.

    with number as (select Exam_id

    , row_number() over (partition by exam_id order by ([time])) NUM

    ...

    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 - 5,836 through 5,850 (of 8,731 total)