Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL2000 - querying from temp cursor on SQL 2000
Message
 
 
À
28/07/2003 16:08:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00814318
Message ID:
00814323
Vues:
16
Dean,

The #ccustno is a local temporay table not a cursor. Anyway, your code should work under SQL 2000 also. What error do you get?

>Hello all
>I found a little problem in SQL2000.
>
>***********************************************
>First, here is a sample of my code:
>h = sqlconnect('vtsqltest','appuser','090443')
>tcBatch = 'E030411001'
>lcCmdSelectCustno = [SELECT company,custno,siteno into #ccustno ]+;
>      [FROM custwork(nolock) ]+;
>      [where batch = ?tcBatch ]+;
>     [UNION ]+;
>      [SELECT company, Altcustno1,custsite ]+;
>      [FROM phonwork(nolock) ]+;
>      [where batch = ?tcBatch ]+;
>     [UNION ]+;
>      [SELECT company, Altcustno1,custsite ]+;
>      [FROM authwork(nolock) ]+;
>      [where batch = ?tcBatch]
>
>?sqlexec(h,lcCmdSelectCustno)
>
>
>?sqlexec(h,[select * from #ccustno], [x1])
>
>
>The first sqlexec creates a temporary cursor on the SQL2000 database call #ccustno.
>
>The second SQLEXEC attemps to querys from the temporary cursor that was just created in SQL2000 server. But it doesn't seem to be working in SQL2000, but it works in SQL6.5.
>
>Why does it work in SQL6.5 but not in SQL2000?
>
>
>Thanks.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform