Forum Replies Created

Viewing 15 posts - 3,901 through 3,915 (of 26,490 total)

  • RE: loop through table where one field always has different value

    wdmm (5/2/2016)


    pietlinden,

    Included in the original post:

    --tblOrder

    --Keysv

    --72apple

    --72orange

    --73100

    --73100

    --desired end results

    --idd

    --7Value of apple 100

    --7Value of orange 100

    Below are the create and insert stmts:

    --table create

    CREATE TABLE [dbo].[tblOrder](

    [Key] [int] NOT NULL,

    [varchar](50) NOT...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Jeffery Williams (4/30/2016)


    No I am not sure I following what you are suggesting here or I am missing the point.

    So I build a dynamic query. In this case it is...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (4/29/2016)


    Chad Crawford (4/29/2016)


    Brandie Tarvin (4/29/2016)


    you can do anything you put your mind to.

    Reminds me of the strip that showed up on my Dilbert calendar this week:...

  • RE: Using reserved words as column names

    Alan.B (4/28/2016)


    Something like this would not work:

    CREATE TABLE LovelyTable(

    Join varchar(50)

    )

    SQL Server is generally very good at dealing with reserved keywords as column names but its a terrible practice. Column names...

  • RE: Looking to "hack" the "Script As DROP"

    Brandie Tarvin (4/29/2016)


    Luis Cazares (4/29/2016)


    Or install more memory.

    Umm, that won't work. SSMS has the memory limitation. Not my desktop.

    Per Microsoft:

    Note SSMS is a 32-bit process. Therefore, it is limited...

  • RE: Are the posted questions getting worse?

    Ed Wagner (4/28/2016)


    Lynn Pettis (4/28/2016)


    I think it is time for me to take a break.

    People can't format their code to make it readable, can't post enough information to really help...

  • RE: Passing table name as parameter into SP

    Learner44 (4/28/2016)


    Because we do this exercise every week splitting one table into 4. So when we do this we don't care about what's in there into those 4 tables so...

  • RE: Passing table name as parameter into SP

    Learner44 (4/28/2016)


    Looks like that error is solved and got the new one! Neverending!

    Error message

    Invalid column name 'cindex'.

    SP

    ALTER PROCEDURE Doc124NEW_new (@DMIGRATIONNEW nvarchar(255))

    AS

    BEGIN

    -- SET NOCOUNT ON added to prevent extra result...

  • RE: Are the posted questions getting worse?

    I think it is time for me to take a break.

    People can't format their code to make it readable, can't post enough information to really help them with out guessing...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Jeffery, You said you recreated the problem with another table and some test code. That is what I want to see, not the code and table from the...

  • RE: Passing table name as parameter into SP

    Learner44 (4/28/2016)


    I am getting following error.

    Msg 245, Level 16, State 1, Procedure Doc124NEW_new, Line 36

    Conversion failed when converting the varchar value 'SELECT TOP (' to data type int.

    Here is my...

  • RE: sql loop with insert

    wdmm (4/28/2016)


    I've placed data into a temp table as such:

    declare @i as int

    declare @nmbrRow as int

    declare @dM table(dM varchar(max))

    insert @dM (select lname from names etc..)

    set @nmbrRow = (select count(*) from...

  • RE: t-sql 2012 change query

    wendy elizabeth (4/28/2016)


    What format is the most efficient for executing the best? subqueries, temp tables, or cte?

    It depends. The best you can do is test the different options and...

  • RE: Passing table name as parameter into SP

    So what is the issue? You have given us the code but told us nothing else about the problem.

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Jeffery Williams (4/27/2016)


    I know it is something with a server setting or something, not code.

    Made another table varchar(8000)

    I inserted few hundred characters then just did update where field = field...

Viewing 15 posts - 3,901 through 3,915 (of 26,490 total)