Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)

  • RE: Import Question (sorry posted this in wrong forum)

    Also, if ColumnA must be of datatype int, use the CONVERT/CAST function to convert ColumnB to the correct datatype. i.e.:

    insert into TableA (ColumnA)

    select CONVERT(int, ColumnB) /* or CASE(ColumnB AS int)...

  • RE: Temp Table in Dynamic Query using SP_Executesql

    You need to create the #temp table before you execute the SP_ExecuteSQL.

  • RE: about javascript and asp

    Hi Sukhoi,

    sorry it took so long, but here it is:

    <%@ Language=VBScript %>

    <% Option Explicit 'I always have this. Helps you find misspelt variables quickly %>

    <%

    Response.Buffer = True

    'more code codes here...

  • RE: about javascript and asp

    This is not a T/SQL question. In fact it's not even a SQL question. But here's my response anyway ...

    The question is: Do you want to "redirect" the page after...

  • RE: dynamic sql stored proc

    Well, if the stage field is always in sequence then this should do it:

    UPDATE  T1
    SET    T1.end_date = T2.start_date
    FROM  Table1 T1
    LEFT OUTER JOIN Table1 T2
    ON    T1.svc_id = T2.svc_id
    AND   T1.stage + 1 = T2.stage

  • RE: Testing for existance of a table

    Or try:

    IF OBJECTPROPERTY(OBJECT_ID(N'<YourTable>'), N'IsTable')
    BEGIN
         -- Your code
    END

  • RE: List Columns Output by SP

    There is no way to determine which columns a stored procedure returns in SQL, since the output can have multiple record sets, my differ depending on parameters values, etc.

    By using...

  • RE: Reading image data

    Looks like the problem is in the "Group By" clause of then "inner join". It includes the ProductLogo, which is not in the select statment nor can it be used...

  • RE: Complex defaults?

    I have never managed to use other field(s) to set the default value of a field, but there are other ways of doing it. You can use either User Defined...

  • RE: incorrect script

    I think the problem is in your update statement:

    update a set a.Ranking = b.ranknum from report4 as a join #rankings as b on b.[store nbr]...

Viewing 10 posts - 1 through 10 (of 10 total)