|
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
|
|
|
|
|
good answer. more details
http://msdn2.microsoft.com/en-us/library/ms177596.aspx
|
|
|
|
|
Thank you.
The URL is very usefull for me.
Regards
KP
|
|
|
|
|
You should also look at getschema("Tables"). This is an Ado method introduced in 2.0 to eliminate the need to query the system tables.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
I have a ASP.net interfacee to get the user define date time schedule and I store that in the database. I want to use that data to schedule a job to run the store procedure and get the data and send it through a email
|
|
|
|
|
I have a ASP.net interfacee to get the user define date time schedule and I store that in the database. I want to use that data to schedule a store procedure to be run.
or
For job scheduling in SQL SERVER 2005 we can use job scheduling wizard, but i want to know some other way , like can i schedule jobs in SQL through SQL Storeprocedure what i want to do is i want to provide a interface to a user in ASP or some other tool and i will pass all the require parameters to SQL and schedule the job through Store procedure instead of using the wizard, is there a way like this, please suggest
|
|
|
|