SUBQUERY IN SQL2000

  • Using an isql statement with sql 6.5, I was able to perform this statement:

    insert into <database..table> values (<val1>, <val2>, -(select count(*) from <database..table))

    Sql2000 is now telling me that I cannot use a subquery this way and it must be a scalar expression.

    Is there anyway to perform the statement that worked in 6.5, in 2000?

  • You might try

    INSERT INTO <table>

    SELECT val1, val2, COUNT(*) FROM <table>

    Guarddata-

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

You must be logged in to reply to this topic. Login to reply