I have an smallint field which can have maximum of 6000 value.
Everytime I insert record I want to insert the next available number but not the max(field1) + 1.
Because I might be deleting some records so there would be some unused numbers between 1 - 6000 which were not allocated yet.
Is...
I opened a table using static cursor and it was failing to pick at 600000 record. If i used query to get 599999 records it was working but as soon as I increase it by one more, it failed. With 600000 record query I used dynamic cursor it started working.
Can anybody help me to know the reason?
I tried to use
Insert into Opendatasource('Microsoft.......)
select * from #tbl1
it is working well from inside sql query analyzer
but when I try to execute script with isql then it gives error
Msg 7302, Level 16, State 1
Could not create an instance of OLE DB provider...
isql -S . -U sa -P -i c:\abc.sql -b
if errorlevel 0 goto success
echo 'command failed'
goto end
:success
echo 'command worked
:end
This is always going to success though command fails sometimes.
This is my abc.sql
use master
-- database name
set @dbname=N'xyz'
if not exists(select *...
Thanks alfredp77.
I am not passing -1.#QNAN intentionally. It might be like ado when reading empty field from float data type or we loose network it is storing -1.#QNAN. We have done lot of checks on client program. Now I have given 0 as default value when we insert empty record. If any other...
Thru my program it is storing –1.#QNAN in float data type field. I want to restrict Sql Server to store this value and if program is giving this as input then it store 0 in place of it. Is there any way to give formula or trigger something to check it?
I have many batches running in same script so how can I skip them if one condition in one batch is not fulfilled because all of them have seperate go and variables.
There are multiple isql commands in a batch file. Can Sql script returns some value to first isql command? So rest of isql commands execution depends on the output of first isql command. Like true or false.
Can I make asynchronous call from extended stored procedure or from stored procedure from within Sql server and get back callback notification when process gets finished.
Is there any way that Sql Server does not create execution plan for some sql queries which I am sure that I am not going to repeat them. Same way for Stored procedures, it should not keep in memory.
Oh Sorry! I mean to say it is user defined extended stored procedure which I have to copy in system folder. When I declare add extended stored procedure thru sql script, I have to give path for dll.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.