Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Joining a #table created on the SP with a existant one
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01305959
Message ID:
01306183
Vues:
7
>>>
>>>SET @lcsqlcmd = '
>>>	select #treport.*, apvadr.cphone as cBphone, apvadr.ccontact as cBcontact,
>>>		apvadr.ccompany as cBcompany, apvadr.caddr1 as cBaddr1, apvadr.caddr2 as cBaddr2,
>>>		apvadr.ccity as cBcity, apvadr.cstate as cBstate, apvadr.czip as cBzip,
>>>		apvadr.ccountry as cBcountry
>>>	from #treport JOIN apvadr ON #treport.cvendno = apvadr.cvendno
>>>	where apvadr.cvendno = ''Z_SKIPS'' and apvadr.ctype=''O'' and apvadr.caddrno = ''MIA''
>>>	order by 79
>>>	,' + @lcsortno
>>>
>>
>>thanks,I am polishing it now
>
>A couple of side notes:
>
>
  • MS SQL Server always recognizes single quote (') as a string literal delimiter. The double quote(") is recognized as a string literal delimiter only when SET QUOTED_IDENTIFIER is OFF. It's better to use a single quote wich is independent of any settings. A single quote inside such string literals has to be doubled.
    >
  • T-SQL parser understands code on multiple lines w/o any special continuation indicators. It allows to build long string w/o concatenation of string literals


    Thnks
    .......
    DO WHILE .T.
          ME.Work()
    ENDDO
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform