|
Hi,
Thanks for the reply but i was looking for another handler for the rollback part.
Like : Declare Exit handler for SQLEXCEPTION ROLLBACK;
I want my proc to roll back in case of any error. because once i find any error it will throw an exception to my application which can never rollback-ed
thanks
Siva
kss
|
|
|
|
|
How do i create a form that bind a one to many relationship data source in VB.NET 2005
|
|
|
|
|
can you give me some brief description about you problem
You have to use join for selecting the data and just assign dataset to the DataControl.
Best Regards,
Chetan Patel
|
|
|
|
|
i want to back up my data base automatically everyday at a given time ,can you tell me how to do it in sql server 2005.
|
|
|
|
|
Check out the BACKUP Command in sql server 2005 which is used to backup the entire database. If you want to Backup the DB periodically then create a procedure with the BACKUP command and schedule a job in the sql server agent that calls the Procedure periodically...
BACKUP DATABASE [DatabaseName] TO DISK = N'C:\BackUp\DB_BKUP_09_09_07'WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N'DatabaseName-Differential Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
hi
you must go to microsoft SQL Server Management Studio => choice Server object
right click on Backup device =>choice backup database => choice your database => and choice option to set information
|
|
|
|
|
hi
you can go to sql server agent ---> choice job right click and choice schedual ---> new schedual --> choice what you need
Rami Abdalhalim
|
|
|
|
|
How can I use SQL operation such as create database ,delete database ,update database, change password, add user.....
by write the code in visual c++.
Please give me the good link or article which support this issue.
Thanks
|
|
|
|
|
Your question is way to broad for a post, so I recommend looking around this site. As far as changing passwords, adding users, etc. that all depends on how your database tables are set up.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
READ SQL Server Books online or buy a book (if you can afford it).
|
|
|
|
|
hi guys
i have the followig query
select a.plhrs ,b.sthrs,a.mon
from
(select to_char(month,'Mon-yyyy') as mon,
sum(st) as plhrs from espcs.bud_mpl where empno='0541'
group by to_char(month,'Mon-yyyy'))a,
(select to_char(ddate,'Mon-yyyy') as mon2 , sum(sthrs) as sthrs
from espcs.manhrs where empno='0572' group by to_char(ddate,'Mon-yyyy')) b
where b.mon2 = a.mon
in this query i am getting sum values from both tables based on the months from
the table a,
but the problem is that it eliminates the records if it does not find the matching months from both tables, as i want that it shud show the month with a value of blan if it does not find the matching the matching months's records in the corresponding table,i want to use joins,,
i am new to oralce , can any body help me
thanks in advance
hello
|
|
|
|
|
you can use left join statement
select a.plhrs ,b.sthrs,a.mon
from
(select to_char(month,'Mon-yyyy') as mon,
sum(st) as plhrs from espcs.bud_mpl where empno='0541'
group by to_char(month,'Mon-yyyy'))a left join
(select to_char(ddate,'Mon-yyyy') as mon2 , sum(sthrs) as sthrs
from espcs.manhrs where empno='0572' group by to_char(ddate,'Mon-yyyy')) b
on b.mon2 = a.mon
Please ignore if have error as its fine for sql/access but not confirm for oracle.
Thanks
|
|
|
|
|
i create an object of sqldatasource then bind it
with gridview (using code c#) when i run the program it
ana navigate in gridview it make run time error saying(
gridview fired event pageindexchanging which wasnt handled)
how can i navigate in gridview using code (not wizard)
thanks
|
|
|
|
|
I have dealt with this problem before. Here is how I solved the problem. I used a proc that used the ROW_NUMBER() function. This way you can format the number of rows to show (page size) on your grid and show total pages as @totalRows/@PageSize
Example
CREATE PROC myPROC
(
@State char(2),
@PageSize tinyint,
@PageNumber smallint = 1,
@TotalRows smallint = 0 OUTPUT
)
AS
BEGIN
DECLARE @BeginRow int
DECLARE @EndRow int
SET @BeginRow = (@PageSize * (@PageNumber-1)) + 1
SET @EndRow = (@PageSize * (@PageNumber-1)) + @PageSize
SELECT RowId, FirstName, LastName
FROM
(
SELECT ROW_NUMBER() OVER(ORDER BY LastName, FirstName) AS RowId, FirstName, LastName
FROM
(
SELECT au_fname FirstName, au_lname LastName
FROM dbo.authors WHERE [state] = @State
) q1
) q2
WHERE RowId BETWEEN @BeginRow AND @EndRow
END
Dave Evans
|
|
|
|
|
I forgot to add SET @TotalRows = SELECT COUNT(*) FROM dbo.authors WHERE [state] = @State
|
|
|
|
|
|
i make drop to table ..
i want to retrive this table what i can do ??
Palestine
|
|
|
|
|
|
Welcome Pelastine :
You can not retrieve table after drop
but if you have Backup from Database you can restore it
Rami Abdalhalim From Pelastine
|
|
|
|
|
thanks rami ,
i will be very happey to see in my msn tareq_abuzuhri@hotmail.com
Palestine
|
|
|
|
|
Evening Everyone
i have a Table Called "Property", this table a lot of Fields and a Primary key called "Property_ID" the identity column. when there are Dublicate in the table, i would not be able to Catch them by only "Property_ID". i have some 2 fields that are not supposed to be the same. Field "Fun_key" and "Lis_key", and that means there must never be
Func_key * 2 and Lis_key * 2, i tried this statement and it does not bring me Dublicates.
select Func_key, Lis_key
from Property
group by Func_key,Lis_key
having count(Lis_key) >1 and count(Func_key) >1
order by Lis_key
how can i achieve this and sort them by lis_key
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
I'm not exactly sure what you are asking for. If you want a list of property_id's where the func_key and lis_key are the same, you would query something like this:
SELECT property_id, func_key, lis_key<br />
WHERE func_key=lis_key<br />
ORDER BY lis_key
If this is not what you want, then please provide us with examples of your data and specifically what you want to pull back.
Hope this helps.
|
|
|
|
|
code>
SELECT DISTINT *
INTO #TEMP
FROM TABLE
SELECT * FROM #TEMP
TRUNCATE TABLE
INSERT TABLE
SELECT * FROM TEMP
Use this with care as it may cause you issue with indentities and triggers etc,,,,,
|
|
|
|
|
Thanks man it worked
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hi all,
Could someoine please provide me with an example of a Oracle SQL Script for creating more than one table.
Many Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|