Forum Replies Created

Viewing 15 posts - 3,766 through 3,780 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    Of course you're getting yelled. Why would you want to turn off xp_cmdshell? 😀

    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: Checking Multiple Fields in a Table

    Sjey (11/19/2015)


    Thank you very much Luis.

    You're welcome.

    Now the most important question. Do you understand how the code works? Would you be able to explain it if needed?

    Remember that you'll be...

    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?

    Jack Corbett (11/19/2015)


    Sean Lange (11/19/2015)


    It is however pretty clever.

    Talking about me again. I'm both "pretty" (in a very masculine way) and "clever". 😛

    As my wife says, mother's...

    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: Table design question

    Something like this? Or I misunderstood the question?

    CREATE TABLE Company_Messages(

    CompanyId INT,

    MessageID INT,

    CONSTRAINT PK_Company_Messages PRIMARY KEY (CompanyId, MessageId),

    ...

    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?

    You're missing the obvious way to get the current date. :hehe:

    USE [msdb]

    GO

    DECLARE @jobId BINARY(16);

    EXEC dbo.sp_add_job @job_name=N'GetCurrentDate',

    @enabled=1, @job_id = @jobId OUTPUT;

    EXEC dbo.sp_add_jobserver

    @job_name = N'GetCurrentDate' ;

    EXEC...

    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: LIKE unicode character in SQL Select

    vantuan02t1 (11/19/2015)


    I want to use a variable (ex: @test-2) to replace value 'College' in LIKE

    Sample:

    Select * from Table_1 where Description like N'%@test%'

    We already know this. I already post a test...

    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: LIKE unicode character in SQL Select

    Actually, have you tried this?

    Declare @test nvarchar(50)

    select @test = N'College'

    I'm assuming that you have a unicode character in the value which won't translate correctly into ASCII strings, instead of...

    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: LIKE unicode character in SQL Select

    vantuan02t1 (11/19/2015)


    Naturally I will declare a variable, sample:

    Declare @test-2 varchar(50)

    select @test-2 = 'College'

    (1) Select * from Table_1 where Description like N'%' + @test-2 + '%'

    But test result is different with

    (2)...

    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?

    I'm sorry, I'm just watching too much Green Batman Arrow, lately. 😀

    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: LIKE unicode character in SQL Select

    How did you declare the variable?

    Using this, you might get a hint:

    PRINT N'%' + @test + '%'

    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?

    jasona.work (11/19/2015)


    I was going to post this over in Steve's call for Good Basic T-SQL Exercises but decided not to pollute the topic with fluff...

    So I'm posting it here...

    Just for...

    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: concatenation of two columns as single

    You have the wrong formulas to calculate each part. Check my previous post for correct formulas.

    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: dynamic cursor

    Jeff Moden (11/19/2015)


    Easy guys. 'Tis the season to be jolly. 🙂

    That's me being jolly.

    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: Nested Schemas

    sestell1 (11/19/2015)


    I like to add square brackets around my nested schemas. :-D:crazy::hehe:

    CREATE SCHEMA [[a]].].[c]]]

    I'm not sure if that's confusing enough. 😀

    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: Insert into select from - View

    Minnu (11/19/2015)


    Thanks its working good.

    also wants to delete from table before insert.

    is it possible in this view...

    The insert is not part of the view, you might want to use 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

Viewing 15 posts - 3,766 through 3,780 (of 8,731 total)