Forum Replies Created

Viewing 15 posts - 16 through 30 (of 34 total)

  • RE: Retrieving first 100 chars from a column of type text

    Just remember that first 100 char should be expressed as:

    READTEXT pub_info.pr_info @ptrval 0 100

    where 0 is the first char and 100 is the length...

    HTH

     

  • RE: Stored procedure Returning XML String

    In VB, when you create a Recordset in fact it can contain SEVERAL recordsets, one appended after the other, so you can read all those data with:

    dim allXml as string

    allXml...

  • RE: Importing data that includes blanks

    1. For big text files I'm using KEDIT for Windows (http://www.kedit.com), because it remaind me of my ol' times on XEDIT (Ibm VM Mainframe software, some 20 years ago.......

  • RE: how to use "CASE" in "WHERE" clause?

    Why not try this:

    SELECT table1.field1, table1.field1, table2.field2

    FROM table1 , table2 

    WHERE table1.field1 *= table2.field1

    AND (CASE WHEN table2.field2 is null THEN (1=1) ELSE (table2.field2 = 2004)END)

    so the CASE will return either TRUE (if f2 is...

  • RE: Easy Update but Im doing something wrong

    I suggest to complete the query...

    UPDATE TABLE_A Set TABLE_A.op_datetime = TB.op_datetime

    FROM TABLE_A TA

     INNER JOIN TABLE_B TB

      ON TA.key_id=TB.key_id

    your first query was missing the 'FROM' clause...

    BTW note pls the TABLE_A...

  • RE: GROUP BY a text column

    As a workaround you could use an aggregate function on the text column in the SELECT list, as:

    SELECT .... ,..,  MIN(TextColumn) AS TxtCol, ....

    this way the text column can be...

  • RE: SQL Syntax

    Maybe you can try something like:

     

    UPDATE DTSinvvendor 

     SET DTSinvvendor.manufacturer = DM.NO_CODE_IDENT

      FROM DTSinvvendor DI

        INNER JOIN DTS_ubmf01_part_master DM ON DI.itemnum    = DM.PART_NO_001

        LEFT JOIN DTS_MRP_DRAWING         DD ON DM.DBKEY_8000 = DD.DBKEY

     the...

  • RE: How to Backup Remote MsSQL database?

    I don't think so....

    You can try using DTS to copy all your tables (with content) from the site into a local (on your pc...) copy  of the database.

    Just build a...

  • RE: How to find a number in a space separated string?

    Hi Henk, sorry for the mistake, sometimes my finger can't follow my mind .

    I mean:

    WHERE ' '+nume+' ' LIKE '% ' + @InputVariable...

  • RE: Copy and Paste rows into table in Enterprise Mgr?

    You only should open the target table in EM, go to last row, select the empty new row at bottom and make sure the row you copied (from Excel or...

  • RE: How to find a number in a space separated string?

    You could also use:

    SELECT *

    FROM table

    WHERE ' '+nums+' ' LIKE ' ' + @InputVariable + ' '

    so the ' ' (space, NOT empty string) will make you find also the...

  • RE: Transpose rows to columns - not a crosstab

    Sorry I forgot to paste ONE LINE (GROUP BY)

     

    If I understand maybe this could be a way...

    Given yourTable:

    vID, cID, value

    1,1,0

    1,2,'test'

    2,1,4

    2,2,'foo'

    you can:

    SELECT vID,MAX(value1),MAX(value2),MAX(value3)

    FROM (

    SELECT vID

    ,(Case WHEN cID=1 THEN value ELSE null END)...

  • RE: Transpose rows to columns - not a crosstab

    If I understand maybe this could be a way...

    Given yourTable:

    vID, cID, value

    1,1,0

    1,2,'test'

    2,1,4

    2,2,'foo'

    you can:

    SELECT vID,MAX(value1),MAX(value2),MAX(value3)

    FROM (

    SELECT vID

    ,(Case WHEN cID=1 THEN value ELSE null END) AS value1

    ,(Case WHEN cID=2 THEN value ELSE...

  • RE: Sort

    Hi Rudy,

    1. you do not mention if the sort is performed in Sql (ORDER BY Effective_Date) or in your application (VB, ASP or else)

    2. sometime Sql gets confused between...

  • RE: Incorrect Host Name

    If you already has some VBA code in your project with the following function you can get the currently logged Windows Username an Computer Name, so that you can put...

Viewing 15 posts - 16 through 30 (of 34 total)