Forum Replies Created

Viewing 15 posts - 376 through 390 (of 1,479 total)

  • RE: Collate and except

    You can specify it just after the column's name. Here is a small example:

    create table test1 (id int, st varchar(30))

    go

    create table test2 (id int, st varchar(30) collate Latin1_General_CS_AS_KS_WS)

    go

    insert into...

  • RE: Help with a query.

    Hope that I undestood what you need:

    DECLARE @data table (n INT)

    INSERT @data

    SELECT 1 UNION ALL

    SELECT 10 UNION ALL

    SELECT 11 UNION ALL

    SELECT 12 UNION ALL

    SELECT 13 UNION ALL

    SELECT 14 UNION...

  • RE: reduce the size of transaction log

    Actually it means that your transaction log is not big enough and that it needs to grow more, but it can't because there is no disk space left (or it...

  • RE: reduce the size of transaction log

    You can use the command DBCC shrinkfile (more details about it can be found in Books On Line), but the question is why? If during normal activity the log...

  • RE: Decilmal Convertion Problem - reg

    Case statement can only have one data type that it returns. Even if the case statement has few data types that it can return, it will return a data...

  • RE: Formatted Text when select.

    That depends. If you want to modify the string when you insert the data or when you update the data, you can use an "instead of trigger" to do...

  • RE: Formatted Text when select.

    You can use a simple replace function to do that:

    declare @MyString varchar(30)

    set @MyString = '/abc/def/ghij/kl'

    select @MyString, REPLACE(@MyString,'/','//')

    Adi

  • RE: index has a fill factor of 20%, but displays page fullness of 90%

    The fillfactor is kept when you build the index or reorganize it, but when you insert new data to the table, the fillfactor is ignored. Remember that the whole...

  • RE: Unique key concept:Shubham Saxena@Bajaj Capital

    Under the default settings, each time that you do any compression with null, the results will false. You can checkout this code:

    if 5 = null

    select 'true'

    else

    select 'fales'

    if 5 <>...

  • RE: updsate query

    Here is one way of doing so:

    declare @vc varchar(50)

    declare @NewDate char(8)

    --New date to replace

    select @NewDate = convert(char(8),getdate(),112)

    --Folder with date

    set @vc = 'Myfolder/folder/dialy/20110531/sometext'

    --Use the patindex fucntion in order to find the...

  • RE: logshipping and datafiles

    As far as I know, you’ll have to break the log shipping.

    Adi

  • RE: tsql statement differnces

    You are getting an error because you are forcing the server to do an implicit conversion of data type. The column’s data type is varchar(1). In the second...

  • RE: SQL SERVER(T-SQL)

    sivaj2k (1/19/2012)


    Hi

    This is the other way.

    Select 'Select'

    union all

    Select 'from'

    union all

    select 'where'

    union all

    select 'group by'

    Regards

    Siva Kumar J.

    Actually Lowell’s way is the correct one. Even if the union all query seems...

  • RE: How to prevent user login to SQL Management Studio ?

    You can create a DDL trigger for login and check if the specific login is using SSMS (by checking the value of app_name() and original_login()). If he does, do...

  • RE: Extracting parts of text from a varchar column

    If you have the same structure, but different length for each value, then you can convert it to XML and then use Xquery to get the data that you need....

Viewing 15 posts - 376 through 390 (of 1,479 total)