Forum Replies Created

Viewing 15 posts - 151 through 165 (of 248 total)

  • RE: Unable to concatenate two NVarChar(4000) fields.

    All we are saying is that when concatenation of string fields is done, the final result after the concatenation is still bound to the length limitations of the data-type...so, if...

  • RE: how to run sql script

    In addition to those two (and osql), you can also use VBScript which can use SQL-DMO and fire off SQL scripts after getting the input such as instance-name, authentication used...

  • RE: Generating ID

    If there is no such PK column to provide you with the running unique value, you can also do this:

    create table testcase (role int, seq int, id int, modifiedid int)

    insert...

  • RE: Unable to concatenate two NVarChar(4000) fields.

    Carl answered it actually...even after the concatenation the total length cannot exceed nvarchar(4000), that is why you are seeing data only from the first field. The truncation would occur...

  • RE: IN List (How many maximum?)

    Why do you need many items in the IN (, , , ) list ?  Can't you write a filter condition or a sub-query (or a co-related sub-query) with filters...

  • RE: Views

    In addition to what Chris mentioned, there are indexed views as well.  These are different than the normal views since the result set in the case of indexed views is...

  • RE: Query Dates

    There are couple of options - one is to create a computed column that will compute and store it as a datetime and then you can index it and your...

  • RE: How to kill the process id''''s

    You said the process is going into sleeping mode - you checked that from sysprocesses from the SQL Server side ? If so, then the connections are not really...

  • RE: Blocking Locks mystery

    Check the sp_blocker_pss80 procedure from Microsoft PSS

    http://support.microsoft.com/default.aspx?scid=kb;en-us;271509

    This will give you more idea on what is going on.

  • RE: Automated update scripts

    I agree with clayton. For our installation process, we use Javascript (primarily to do a Search and Replace for the place-holders in the scripts), VBScript (using SQL-DMO) and batch...

  • RE: UPDATE in a better way

    The CASE statement is a short circuit statement in T-SQL meaning if the first WHEN condition gets satisfied, the second one does not get executed at all. Since this...

  • RE: UPDATE in a better way

    And why don't you want to use the CASE in this case since this is a conditional update ?

    UPDATE studTable

    SET choice= (case choice

    ...

  • RE: Automated update scripts

    Use osql (look up different options in BOL)...one way to do it would be to ask the end user for input like instance name, name of the database, authentication method...

  • RE: Different Orders in Order By in the same SELECT

    Seems like you do not even need to go after T2 since you are not selecting anything out of it and the STATUS-CODE column in T1 itself can be used...

  • RE: Sorting across columns

    You do not need a temporary table...this can be achieved by doing conditional ordering in the order by clause, example:

    CREATE TABLE TESTCASE (ROW_NUM INT IDENTITY(1,1), COL1 INT, COL2 INT, COL3...

Viewing 15 posts - 151 through 165 (of 248 total)