|
I think in Access you have to surround date/time literals with the # sign. Try:
"SELECT Name from tab1 where dt < #1/1/2008#"
|
|
|
|
|
|
Hello there,
the correct query is here
SELECT Name from tab1 where dt < #1/1/2008#
Rahul Goel
Microsoft Cerfied Solution Developer .Net
Contact me at : rahul.g2510@gmail.com
|
|
|
|
|
Our application is running successfully on production server from last three month. Yesterday we received the error - Timeout Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Our application is built in asp.net 2.0 and Sql server 2000. We are importing a large set of data in database using transaction object of ado.net. When I ran the same application on test database with same set of files I didn’t received any error. The problem is with sql server on production. We don’t want to set the time out property of command object. Can any one suggest me some solution?
Saurav
|
|
|
|
|
My first guess would be you need look at both your production database and your test database. I would guess that your test database perhaps doesn't have as many records as your prod database. If you prod database has a lot of records it can take longer to insert records. Especially if you have lots of keys or indexs in prod that you don't have in test.
I have found with large import systems, sometimes the best thing to do is to let the web site queue it up and then have something like a windows service process the files. This will keep you from having to worry about any web site timeouts.
In the end you may have to increase your transaction object timeout.
One last thing you can check, when an import is running check the prod server to see if some other process is blocking it. You can do this by running sp_who or sp_who2
Hope that helps.
Ben
|
|
|
|
|
hi,
i am tired searching the net for this solution,
i may b using the wrong query to find my solution..
i finally came here hope anyone can help me,and that i have posted my question in the proper frame
my question is ,
i would like to write an sql query to display data from two table found in my database,in a single table in the asp page..
plz help
thanks
|
|
|
|
|
data from 2 tables in a database and display it as single table in asp page.
You have to joins! Use inner join and join the two tables accordingly!
Gautham
|
|
|
|
|
I want to add a column in a table using dynamic query.
e.g
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[SP_InsertColumnToAudience]
@ColumnName varchar(50)
as
set nocount on
declare @qry varchar(250)
begin
set @qry='alter table tblAudience add aaa1aa varchar(100) NULL'
exec @qry
end
but it gives error........
any sugession........
Do good and have good.
|
|
|
|
|
|
Hi,
I need to read/write the flat files from oracle, as i have read some article saying that we can do it thru utl_file. I have created a directory in oracle as
Create directory oraload as 'c:\oraload'
As i have got a sample which is compiling by when executing its giving a error saying invalid file operation.
create or replace
PROCEDURE create_cmd_file IS
DirLoc VARCHAR2(30) := 'ORALOAD';
DayFile utl_file.file_type;
LogFile utl_file.file_type;
vErrMsg VARCHAR2(250):='WRITE CHECKUP';
vMessage VARCHAR2(250):='BY RAVINDRA';
BEGIN
DayFile := utl_file.fopen(DirLoc, 'execsqlldr.ksh','W');
LogFile := utl_file.fopen(DirLoc, 'log_list.dat','W');
utl_file.putf(dayfile, '%s\n',vErrMsg);
utl_file.putf(Logfile,'%s\n',vMessage);
utl_file.fclose(DayFile);
utl_file.fclose(LogFile);
EXCEPTION
WHEN OTHERS THEN
vErrMsg := SQLERRM;
vMessage := 'DailyLoad CREATE_CMD_FILE Failed With ERROR ' || vErrMsg;
DBMS_OUTPUT.PUT_LINE ('dba@psoug.org' || 'SQL Loader Failure Notification' || vMessage);
END create_cmd_file;
Ravi
|
|
|
|
|
I haven't used UTL_FILE for several years - but I do remember that you have to add a "UTL_FILE_DIR" configuration value to the .ORA file to specify the list of folders that UTL_FILE operations can access.
|
|
|
|
|
Yah, i know it will in be init.ora file, but i couldn't able to find this file any where in my directory, could you pls provide me the location of this file and the content to be changed.
Ravi
|
|
|
|
|
hi
How to get difference between time
i.e column1 have some start time
and column2 have some finish time
difference between column1 and column2?
|
|
|
|
|
Look in the online-help for the datediff function.
|
|
|
|
|
Are you looking for this[^] ?
Happy Programming
|
|
|
|
|
DATEDIFF() function accepts two DATETIME values and a date portion (minute, hour, day, month, and so on) as parameters. DATEDIFF() determines the difference between the two date values passed, expressed in the date portion specified
Regards
SG (sgg245@yahoo.co.in)
|
|
|
|
|
hi
then what should be the data type of that column, so that i can save time only.
bec
in my requirement i have requested any department for a request. so at what time they received my request and what time they have replayed me i.e i want to calculate how much time taken to complete my request
thanks
alisha
|
|
|
|
|
The datatype of the column should be DATETIME...
Use the following type query::
select convert(varchar(10), c6, 108) from t1
In this query, Column 'c6' is of DATETIME type and this query will give you only time part of the column and over this you can use DATEDIFF() function...
Regards
SG (sgg245@yahoo.co.in)
|
|
|
|
|
Hi all,
I have a report created using data in a sqltable.
table contains locations as following
Location
--------
STAPLE STREET
LAKE AVENUE
Hospital Road
Main Street
I dont wanna change them inside the table but i whish if i can chage them as following when in the select command
Location
--------
Staple Street
Lake Avenue
Hospital Road
Main Street
PLease tell me how to do this
Regards
Ruwandi
rkherath
|
|
|
|
|
Do u want that field values should be displayed in Title Case rather than entirely lowercase / UPPERCASE??
Please clarify!!
Regards
SG (sgg245@yahoo.co.in)
|
|
|
|
|
I have a central db as publisher on SQL Server 2005, which has SUPERVISOR user having sysadmin rights.
And created another client db with subscriber user (not having sysadmin rights on the publisher SQL Server 2005), say U1, on SQL Express 2005 instance. As subscriber is the owner of db of subscriber db, so has sysadmin rights on the SQL Express 2005.
Done all the pre-requisite for merge replication.
When I try to replicate between the publisher db & subscriber db with subscriber user, it gives error
"The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a publisher or a republishing Subscriber has run out of identity ranges to allocate to its own subscriber or when an identity column data type does not support an additional identity range allocation. If a republishing subscriber has run out of identity ranges, synchronize the republishing subscriber to obtain more identity ranges before restarting the synchronization. if a publisher runs out of identity....."
Although, if the subscriber user is created as sysadmin on the publisher i.e. SQL Server 2005 then the synchronization works perfectly and synchronizes the data.
I would like to know why SYSADMIN right is needed to be given to the subscriber user at the publisher i.e. SQL Server 2005 instance???
Regards
Regards
SG (sgg245@yahoo.co.in)
|
|
|
|
|
Have you looked through the permissions and grants?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi Everyone,
How to get the list of table name and tables related to them, in SQL Server Database???
Thanks in advance...........
-Prashant
|
|
|
|
|
select * from sysobjects
select * from syscolumns
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
SYSOBJECTS table contains all objects created in a databse
SELECT * FROM sysobjects WHERE xtype = 'U' AND uid = user_id()
this returns all tables created in the current database by the current user.
Regards
KP
|
|
|
|