Forum Replies Created

Viewing 15 posts - 13,606 through 13,620 (of 15,381 total)

  • RE: filter by calcuated feild?

    foscsamuels (10/31/2011)


    i wouldnt think they are milliseconds because they are always zero. or maybe the software is rounding when creating timestamps.

    i've never thought of it that way before.

    edit -...

  • RE: Strip HTML Tags

    Jeff Moden (10/30/2011)


    I refactored the function that I found at the following URL... look for the answer posted by "dudeNumber4"...

    CREATE FUNCTION dbo.StripHtmlTags

    ...

  • RE: filter by calcuated feild?

    foscsamuels (10/31/2011)


    huh this produces same error

    select cast(DATEDIFF(s, '1/1/1970', '9/1/2011') as int) * 1000

    That value is too big for an int which is why it is failing.

    Assuming your data is milliseconds...

    select...

  • RE: filter by calcuated feild?

    I guess i do have stale data. Is your timestamp in milliseconds?

  • RE: filter by calcuated feild?

    Here is your sample data with the unix timestamp converted to datetime in sql.

    select *, DATEADD(s, CREATED_DT, '1/1/1970')

    from filetrans

    where created_dt > DATEDIFF(s, '1/1/1970', '9/1/2011')

    order by created_dt

  • RE: filter by calcuated feild?

    Phil Parkin (10/31/2011)


    I'm not familiar with Unix timestamps, but could you use a calendar/dates table (with appropriate 'XTimestamp' column) to help with this?

    It is just the number of seconds since...

  • RE: filter by calcuated feild?

    From your sample data (nicely done btw) I get three rows.

    select dateadd(ss,cast(left(created_dt,len(created_dt)-3) as int),'1970-01-01') as 'Created'

    from filetrans

    where created_dt > DATEDIFF(s, '1/1/1970', '9/1/2011')

    Not really sure what the calculated column you have...

  • RE: filter by calcuated feild?

    Does this work for you?

    where created_dt > DATEDIFF(s, '1/1/1970', '9/1/2011')

  • RE: Create sub Folders in SQL Server Management Studio

    J Livingston SQL (10/31/2011)


    take a look here:

    http://www.sqltreeo.com/wp/

    it may do what you are looking for

    That looks pretty slick. Have you used it?

  • RE: Create sub Folders in SQL Server Management Studio

    No you can't create your own folder under stored procedures. This is where naming and schemas really come into play. With decent naming and schemas you can sort of organize...

  • RE: SQL Injection

    prashant-507002 (10/31/2011)


    I have contact us page and on it there are one description field.

    In that hacker enter the <script myfile.php>.

    Bu using SP it will accept the value as it has...

  • RE: Query Facing An Error While executing in Teradata

    It is nearly impossible to decipher all that unformatted code. The issue most likely somewhere in that overly complicated "nested case sub select thing" in the middle.

    As a side note...

  • RE: [2008 R2] Optional constraint

    info-651246 (10/28/2011)


    Hello,

    I have a Person table

    I would this table to be usable for Persons and Companies.

    I the record is a person (FK_PersonType = 1), I store First Name and Last...

  • RE: Check Constraint on boolean

    calvo (10/28/2011)


    Sean Lange (10/28/2011)

    And just for the record a bit is NOT a boolean. It has 3 possible values (0, 1, null). Something to keep in mind when writing your...

  • RE: Check Constraint on boolean

    You can't just have select statement in a check constraint. For the purposes of what you are trying to accomplish a check constraint is just not the right approach. You...

Viewing 15 posts - 13,606 through 13,620 (of 15,381 total)