Forum Replies Created

Viewing 10 posts - 1,336 through 1,345 (of 1,345 total)

  • RE: Cursor with Table Name as Variable in Stored Proc

    A Cursor Declaration requires a valid select statement

    SELECT distinct (HourofDay+':'+QtrHr) as HourofDay  FROM @TableName order by HourofDay+':'+QtrHr

    is not a valid select statement.

    Try evaluating the table name before you declare the...

  • RE: TOP operator in SQL v65

    Top Operator is not used in SQL 6.5 New in sql 2000

     

    Try

    set rowcount 100

    select * from Mytable

    Note 100 rows returned

  • RE: Procedure or T-SQL to build new table

    I absolutely do not understand what problem you are trying to solve.

    The image you link to is not very helpful.

    Can you more clearly state your problem, and perhaps post some...

  • RE: Update Query Problem

    You Almost Had it.

    UPDATE A

    SET Appcryptic = b.new_appcryptic

    FROM tblAPP_DATA a,

         tblUPDATES b

    WHERE a.appcryptic = b.new_appcryptic

    Update From, this should work, it will update the A.Appcryptic value = to the last b.new_appcryptic...

  • RE: T-SQL to perform 2 COUNTs in 1 Pass (if possible)

     

    create table #tbl_A (pk int identity, Exam_id int, Question_Code int, Correct smallint)

    create table #tbl_B (Question_id int identity, Exam_Knowledge_Area varchar(100), Question varchar(1000))

    insert into #tbl_B (Exam_Knowledge_Area, Question)

    Values ('T-SQL Knowledge', 'Question 1')

    insert into...

  • RE: How to lock the table?

    My Question would be why would you want to force a table lock?

    Sql server handles row/page/table locks as required by the insert/update/delete statement.

    If you are inserting/modifying a row sql server...

  • RE: server down - restart no help

    Try checking the mssql service under services. Is it started?

    Check the server application logs, it may give you a clue why its not started.

  • RE: Database Design

    I would need more information about your problem to recommend any kind of solution.

    What is the nature of your issue?

    Sql server doesn't care if you create 1 or 42...

  • RE: DATETIME TO VARCHAR

    Try using convert.

    the third argument is style, thats where you can control what you want the date to look like, Look up cast and convert in sql books on line

    create...

  • RE: How do I copy the value of one column into another?

    I ran this and it works fine.

    create table Temp(pk int identity, day1 datetime, day2 datetime, day3 datetime, day4 datetime)

    insert into temp (day1,day2,day3,day4)

    values ('01/01/2005', '01/2/2005', '01/3/2005', '01/4/2005')

    update Temp

    set day1 = day2,

       ...

Viewing 10 posts - 1,336 through 1,345 (of 1,345 total)