Forum Replies Created

Viewing 15 posts - 1,951 through 1,965 (of 2,006 total)

  • RE: script

    SET @accountID = 1

    SET @BeginDate = '20100505 23:59' -- yyyy-mm-dd hh:mm:ss[.mmm]

    SET @EndDate ='20100505 23:59' -- yyyy-mm-dd hh:mm:ss[.mmm]

    -edit- just so you know, I haven't read your query. Just noticed that @BeginDate...

  • RE: Constraint Syntax

    Our DBA used to claim he could tell what language you program with the most by the way you layout your SQL :hehe:

  • RE: Constraint Syntax

    I'd write it like this: -

    CREATE TABLE tested.namedkey

    (

    namedkeyid INT NOT NULL IDENTITY(1, 1)

    CONSTRAINT...

  • RE: Would You Do Your Hobby for a Living

    My hobbies are Chess, Watching Sports and Programming (I can't specify a language, since part of this hobby is learning new ones 🙂 )

    As a job I develop software.

    So. ....

  • RE: select last two year from current year

    Without DDL, it's difficult to answer your question. I'd do something like this, if using DATETIME -

    DECLARE @currentdate DATETIME,

    @lastyear ...

  • RE: select query issue

    sachinrshetty (5/27/2010)


    Emp_id Emp_name Supervisor_id

    --------------------------------------

    1 A ...

  • RE: Conversion datetime

    satya.sakamuri (5/27/2010)


    Thanx for ur help.

    i ll try using this script,one mor equesting.....in mytable design i given the RUN_DATE column datatype to datetime.

    if i use 103 will it pick only...

  • RE: Conversion datetime

    Well, I can't do any testing because you haven't provided me with enough information. But I suspect what you want is something like : -

    SELECT record_count.table_name,

    ...

  • RE: Conversion datetime

    101 would give you the US MM/DD/YYYY format.

    103 would give you the DD/MM/YYYY format you're asking about.

  • RE: syntax error in query

    Like Gail, I'm not entirely certain what you're after. I think you're looking for something like this: -

    UPDATE Employee

    SET emp_codemeli = @VarEmp_Codemeli,

    ...

  • RE: QUERY T-SQL

    Well, I don't know how much help you'll get from this. Two points that'll make it more likely you get some: -

    1. Please read this[/url] to find out how to...

  • RE: WHERE Clause

    Not sure exactly what you want here, but I think this'll get you started.

    --Create Dummy data

    --Really, you should've supplied something like this in

    --your question.

    DECLARE @code INT

    DECLARE @Table1 TABLE(

    col1...

  • RE: How to get previous date

    da-zero (5/26/2010)


    EDIT: grmbl, why hasn't the code of skcadavre any scrollbars and mine has, while mine is much smaller?

    All about formatting 🙂

    E.G. I'd have written your code like so: -

    SELECT...

  • RE: How to get previous date

    da-zero (5/26/2010)


    @skcadavre:

    Your solution will work on SQL Server, but not on Access. The getdate() function doesn't exist there.

    As the OP proposed, the function DATE() should be used. However, I'm not...

Viewing 15 posts - 1,951 through 1,965 (of 2,006 total)