Forum Replies Created

Viewing 15 posts - 361 through 375 (of 2,038 total)

  • RE: Help needed writing stored procedure

    Hi

    Try this (untested)

    UPDATE m SET

    m.Project_ID = 22

    FROM TEMPTABLE t

    JOIN MYDATA m ON t.ERRORNUM = ERRORRECORD

    Greets

    Flo

  • RE: sql problem

    Hi x198yn

    x198yn (8/29/2009)


    ...what should i do as an administrator that when i insert a record to the table all the clients can see this inserted record real time in the...

  • RE: Difference between LINQ and Entity Data Model (EDM)

    Hi florim

    With new O/R-Mappers (like LINQ2SQL, EF, nHibernate, ...) I don't think the pro or contra procedures is based on security issues any more. They use parametrized statements which avoid...

  • RE: Error converting data type varchar to float.

    Use CONVERT to convert ColX and ColY to VARCHAR in your "THEN"-parts

  • RE: Hourly Group By

    You can use DATEPART on SQL Server 2000:

    CREATE TABLE #Sales (SalesDT datetime, SalesAmt money)

    INSERT INTO #Sales (SalesDT, SalesAmt) VALUES ('2009-08-28 14:15:42', 100)

    INSERT INTO #Sales (SalesDT, SalesAmt) VALUES ('2009-08-28 14:16:55', 50)

    INSERT...

  • RE: Update a table from another impoting modified and new records

    You don't need a loop to handle this. Use a JOINed UPDATE statement which only handles rows with same key in both tables:

    UPDATE A SET

    ...

  • RE: Dates, Dates and More Dates

    Usually you should provide dates in ISO or ODBC style in TSQL. If you want to use British date format you have to use CONVERT with style information or SET...

  • RE: Shared Static data in CLR without UNSAFE?

    Static/shared contexts can be used for tasks where they are useful for but are not required within a function/procedure.

    Sample:

    Compiled Regex is much faster than a not compiled, but the compilation...

  • RE: Shared Static data in CLR without UNSAFE?

    Hi Jonathan

    Sure, my sample is not thread safe. It was just a sample how to add static fields into a CLR function. To get it thread safe you can use...

  • RE: Three Table Query Including One Left Join

    The error:

    You have to use aliases for your tables or use a complete qualified column name like "SELECT TXBTESTDTA.CLMMSTP.CIENT".

    BTW:

    Try to get rid of the old JOIN syntax as combination of...

  • RE: SQL Server 2008 T-SQL Enhancements Part - III

    Great article! Thanks!

    Little hint for .NET developers:

    New .NET wrapper types SqlHierarcyId, SqlGeography, SqlGeometry are not stored in System.Data.dll but in "Microsoft.SqlServer.Types.dll" in "c:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\" directory. After adding the...

  • RE: Insertion

    It depends...

    You should work with chunks of data (e.g. 100,000 rows in one chunk).

    Would it be okay if your tables are locked while insertion? It defines the possible count of...

  • RE: Problem Declaring variables inside a Trigger

    Hi

    You can handle your complete work within one statement:

    DECLARE @WorkingDays decimal(18,0),

    @LWOP decimal(5,2),

    @Absent decimal(5,2),

    @CasualLeave decimal(5,2),

    @CompensatoryLeave decimal (5,2),

    @DutyLeave decimal (5,2),

    @VacationLeave decimal(5,2),

    @MonthDays int

    UPDATE EmployeeSalarySheetNew SET

    @LWOP = ISNULL(LWOP,0)

    ...

  • RE: Copy data to different server

    If both databases have same structure you can use replication. If not, what about a usual ETL scenario?

  • RE: Shared Static data in CLR without UNSAFE?

    Hi Barry!

    Thanks for the tip. Another way to handle this is a "static readonly" field which represents a wrapper for the real object ;-).

    Here's a little sample:

    class...

Viewing 15 posts - 361 through 375 (of 2,038 total)