I am running crystal reports using a VB reports scheduler. This scheduler has been working fine for years with SQL Databases. I have now added a report which uses a Remedy ODBC as a datasource. This is a simple crystal report which runs and opens correctly within crystal reports itself. However...
For the benefit of Tim and others who were helping with this thread. I have found a way around the problem. I am calling the sql query as a file (not a stored proc), (this means the query never needs to go to the master database), from a batch job. The batch job sets up the default database as...
Thanks Tim...I've ammended it a bit, so I no longer get the ntext error... Here is the actual code... and the new error
declare @vcdbname varchar(14),
@sql_command1 varchar(18),
@sql_command2 varchar(8000),
@sql_command3 varchar(8000)
set @vcdbname = 'offline'...
Thanks Tim....
I get the following error
Implicit conversion from data type ntext to varchar is not allowed. Use the CONVERT function to run this query.?>?
I have a problem trying to run dynamic sql<>?
when running the following query..
'create ' + @dbname + '..tablename etc.
this is all run as dynamic sql. The problem I am having is, the table being created is more than 8000 characters long...(defined as a sql command). The table has over 200...
Thanks karl... but this doesnt work... I have found a work around which is to run the query with the db name i.e.
'create ' + @dbname + '..tablename etc.
this is all run as dynamic sql. The problem I am having is, the table being created is more than 8000 characters long...(defined as a sql...
I am writing a series of sql queries which go thru the following steps.
1. create the data base using a date extension..
2. create a number of tables in the database created in step 1
3. populate the tables created in step 2
The problem I keep having is, even when I try to create the tables...
I'm trying to delete rows from a database table using a stored procedure. Unfortunately, I the transaction log keeps filling up. I think I should be able to delete successfully in batches of 50,000. How do I do this within a stored procedure... The only thing I'm sure about is I use a while...
I have created a sql query which executes another sql query within it. Unfortunately the query within is quite long and seems to exceed the 8000 limit for varchar. Does anyone have any ideas on how I can can execute this query... unfortunately, I can't split the query.. I am using a table which...
I am running a dynamic sql query which I have declared as varchar(8000). The query is longer than 8000 characters long. Does anyone have any ideas of how I can code this.
Thanks
Bunmi
thanks Tim...
I have used the code below as I dont need the quotes.... however.. I'm still having trouble displaying @set!!!!!!...
any ideas.. (I've commented @set out so that the query works)
declare @scomm1 nvarchar(100),
@set nvarchar(80)
select @set = 'show'
select @scomm1 = N'...
Thanks Pattycake....
I deceided to go for your solution as it will help me to achieve what I need best.
However Could I add a declared variable in as below??
declare @scomm1 nvarchar(90),
@set char (20)
set @set = 'showme'
select @scomm1 = N'print '+ '''no entry'' + '','' + ''no...
1) change these fields to 'char' fields using 'convert'
2)find what rows have them... you have been able to achieve this.
3) use REPLACE
REPLACE(<fieldname>,'0','')
4) change field back to int using 'convert'
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.