Forum Replies Created

Viewing 15 posts - 181 through 195 (of 898 total)

  • RE: update for My table?

    raghuldrag (6/7/2013)


    hai friend,

    if suppose choose the first row of the table,

    create table journey

    (

    journey_id int identity,

    depdate datetime,

    fromplace varchar(20),

    toplace varchar(20),

    mode nvarchar(20),

    seattype nvarchar(20),

    )

    insert into journey (deapdate,fromplace,toplace,mode,seattype) values ('2013-05-13', 'chennai','Banglore','air','Business')

    insert...

  • RE: update for My table?

    Your requirement is still not very clear. Which is the column you want to update and How?

    raghuldrag (6/7/2013)


    if suppose wanna update 10th may-13 data's depends on auto increment id...

  • RE: SP for inserting max(eid)+1 no for all fields

    It seems you are calling the procedure 5 times for the 5 rows

    You will have to change this approach and call the procedure only once and insert all the 5...

  • RE: update for My table?

    A sample data of 1 rows might not be enough

    Please provide a few more rows to replicate the issue properly

    Now, the main questions, What do you want to update and...

  • RE: Forcing a row to be related to at least another row

    lordzoster (6/7/2013)


    Hallo Craig.

    It's not so easy, thank you anyway.

    Why do you think it is not so easy? Applying referential integrity is not so difficult either.

    Can you explain us the...

  • RE: truncate error - foreign key and check constraints

    ananda.murugesan (6/7/2013)


    DELETE statement will be hang due to 76554566 total records.. any suggestion Pls.

    You can try the below steps

    1. DELETE or TRUNCATE the data from all tables that are dependent...

  • RE: Are the posted questions getting worse?

    dwain.c (6/5/2013)


    Stefan Krzywicki (6/5/2013)


    Don't you hate it when you finally figure out a solution for a difficult problem and it creates 5 more problems that the old way disguised?

    I would...

  • RE: JOIN Result

    What is the result you are expecting based on your sample data?

  • RE: Audit changes in table using stored procedure

    lsalih (6/5/2013)


    I know that by querying sys.dm_db_index_usage_stats you can get the information

    You will not get all this information by querying this table.

    A better option would be to create a trigger...

  • RE: Need some help with some SQL Queries

    Your explanation is not very clear

    Can you explain the logic behind the expected results based on your sample data?

    It would be a bit more helpful if you could add some...

  • RE: get part of the string in between square brackets

    One way to do this..

    SELECTSUBSTRING

    (

    C.Col,

    CHARINDEX(']',C.Col,1)+1,

    LEN(C.Col) - CHARINDEX('[',REVERSE(C.Col),1) - CHARINDEX(']',C.Col,1)

    )

    FROM(

    SELECT'[N] 18. Is the C.B. removed from the panel? [Yes / No]' AS Col UNION ALL

    SELECT'[NABCD] 18. Is it removed from the...

  • RE: How To get Characters after a string

    Something like this..

    SELECTCVFileName

    ,RIGHT(CVFileName,CHARINDEX('.',REVERSE(CVFileName),0)-1)

    FROMCandCV

  • RE: remove last character and reformat date

    You probably have some data which is not a valid date

    SELECT*

    FROMYourTableName

    WHEREISDATE(LEFT(perControl,8)) = 0

    The above code will give you the list of invalid dates.

  • RE: remove last character and reformat date

    The data type DATE is not available in SQL Server 2005 and hence, the error

    Change it to DATETIME or SMALLDATETIME

    select cast(left('201301042',8) as datetime)

  • RE: MY query is procedure is not working?

    ChrisM@Work (6/4/2013)


    ALTER PROCEDURE update_use

    (

    @name varchar(20),

    @class nvarchar(30)

    )

    AS

    UPDATE grts SET class = @class WHERE name = @name

    IF @@ROWCOUNT = 0

    INSERT INTO grts (name, class) VALUES (@name, @class)

    Wow. This is the shortest INSERT/UPDATE...

Viewing 15 posts - 181 through 195 (of 898 total)