Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 1,344 total)

  • RE: Thread: can''''t keep the nulls in export to text file

    Null in sql server is a "Special" Value,

    Null means there is no value, Text files do not have this "Special" value. Sql has to represent it with "" blank string....

  • RE: Function for YTD calc in TSQL

    for the last year of records

    Select OrderDate , OrderNumber , CustomerID , ItemID , SalesQty

    From Order

    Where OrderDate >= dateadd(yy,-1,getdate())

    This pulls all records from exacly 1 year ago til now.

    If you...

  • RE: Function for YTD calc in TSQL

    I was merely showing all date related functions from Books Online

    I just pasted them in the thread.

  • RE: Sistaxis Question

    The Capital "N" Before a string indicates the string is "Double Byte" Nvarchar, NChar, NText

     

  • RE: Query Help

    The table structure is fine, but can you supply some sample data, and what your expected output is?

    Seems to me you could perform a union. Calculate the default rate hours...

  • RE: Function for YTD calc in TSQL

    Can you please elaborate?

    It will depend on what you want, calendar year to date, number of days

    select datediff(dd, '01/01/2005', getdate())

    The only date functions are.

    Function Description Example

    DATEDIFF( ) Calculates an...

  • RE: Identify Ununsed Store Procedure

    You can set up a profiler trace watching only stored procedures, with results to table, then you can query the table. There is a small amount of overhead having this task...

  • RE: get a return value

    To do this you must use sp_executesql

    use pubs

    declare @sql nvarchar(100),

    @Table varchar(30),

    @Output int

    set @Table = 'authors'

    set @sql = 'select @output = count(*) from ' + @Table

    exec sp_executesql @sql,

  • RE: UPDATE Table

     

    Without knowing your entity definitions, or the relationships it is hard to say. As rgR'us notes you probably do not need the owner in table1.

     

    Left my wallet in El...

  • RE: Speedy Sub-Queries??

    I understand the need for a one size fits all view, but one of this size with all the left joins is definatelly not going to help performance. You'll find...

  • RE: Installing OSQL

    Install sql server client tools.! On sql serever installation CD. DOn't chose install server, select client tools only.

    No license required (I Think)

  • RE: Identity incriments when insert failed

    What is the data type of your identity?

    if its an integer than the max value is over 2 billion

    That will take a long time to run out of numbers, even...

  • RE: Custom Increment Based on Another Column''''s Max Value

    You cannot maintain this value thru a default.

    If the value is used for sorting, then why must the item be sequential?

    Thats fine if its a requirement, but requirements should tell...

  • RE: Passing value from stored procedure to DOS script

    Looks like your already on the right track.

    Don't think theres's a way.

    http://www.sqlteam.com/item.asp?ItemID=744

    Perhaps write an app in an easy to use language like vb.

     

  • RE: Programming Fiscal & Calendar months

    Whats not working?

    Without sample data from the harvardclub.dbo.fiscalMonths table, its hard to say what the issue is.

    I get these values for the parameters.

    thismonth   thisYear    FiscalYear  TestDate               

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

    7          ...

Viewing 15 posts - 1,036 through 1,050 (of 1,344 total)