hi
i am working on Windows 2000 Advanced Server + SP4 and SQL2000 Enterprise +
SP4.
i have database contains Tables, and i want make script to build Tables on
other Database,
but i need this script include Data in Tables too, i can make that ? and
how?
thanks
--
Tarek M. Sialahi,
Tark Siala wrote:
> hi
> i am working on Windows 2000 Advanced Server + SP4 and SQL2000
> Enterprise + SP4.
> i have database contains Tables, and i want make script to build
> Tables on other Database,
> but i need this script include Data in Tables too, i can make that ?
> and how?
> thanks
you can have a look at a free prj of mine, at the link following my sign.,
DbaMgr2k, which include an "INSERT INTO" script generation feature at table
level...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
-- remove DMO to reply
Friday, February 24, 2012
how i can make script Database with Data?
hi
i am working on Windows 2000 Advanced Server + SP4 and SQL2000 Enterprise +
SP4.
i have database contains Tables, and i want make script to build Tables on
other Database,
but i need this script include Data in Tables too, i can make that ? and
how?
thanks
--
Tarek M. Sialahi,
Tark Siala wrote:
> hi
> i am working on Windows 2000 Advanced Server + SP4 and SQL2000
> Enterprise + SP4.
> i have database contains Tables, and i want make script to build
> Tables on other Database,
> but i need this script include Data in Tables too, i can make that ?
> and how?
> thanks
you can have a look at a free prj of mine, at the link following my sign.,
DbaMgr2k, which include an "INSERT INTO" script generation feature at table
level...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
-- remove DMO to reply
i am working on Windows 2000 Advanced Server + SP4 and SQL2000 Enterprise +
SP4.
i have database contains Tables, and i want make script to build Tables on
other Database,
but i need this script include Data in Tables too, i can make that ? and
how?
thanks
--
Tarek M. Sialahi,
Tark Siala wrote:
> hi
> i am working on Windows 2000 Advanced Server + SP4 and SQL2000
> Enterprise + SP4.
> i have database contains Tables, and i want make script to build
> Tables on other Database,
> but i need this script include Data in Tables too, i can make that ?
> and how?
> thanks
you can have a look at a free prj of mine, at the link following my sign.,
DbaMgr2k, which include an "INSERT INTO" script generation feature at table
level...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.bizhttp://italy.mvps.org
DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
-- remove DMO to reply
How I can make it shorter...
Hi all, I'm quite new in this field, so I need someone help, can I? emm, how I can make this Trigger code shorter, is there any other way how I can do this?
Create Trigger Enrolment
AFTER INSERT OF SubjectName ON SUBJECT
For Each Row
Declare Stud Student%RowTYPE;
Begin
SELECT *
INTO Stud
FROM Student
WHERE stdno= :New.stdno;
IF SubjectName = "DAtabase 1" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "DAtabase 2" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Ecommerce" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Accounting 1" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Book Keeping" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Physic 1" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Engineering Math" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Java Programing" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "C++ Programing" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Advanced C++" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Management Information System" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Database 3" THEN
SET balance = balance - (:New.crtunits *100)
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
END;Use elsif to shorten them up -
EX:
If 1 = 1 then
do this
elsif a=b then
do this
elsif a<> b then
do this
end if;
Note you only need one end if, and there is no 'E' in elsif|||I've receive this msg...
__________________________________________________ _
AFTER INSERT OF SubjectName ON SUBJECT
____________*
ERROR at line 2:
ORA-04073: column list not valid for this trigger type
__________________________________________________ _|||Only UPDATE trigger can contain "OF" clause.
And, if it is Oracle SQL, it lacks in UPDATE table statement.
Your trigger (which will compile) could be something like this:
CREATE TRIGGER enrolment
AFTER UPDATE OF subjectname
ON subject
FOR EACH ROW
DECLARE
stud student%ROWTYPE;
BEGIN
SELECT *
INTO stud
FROM student
WHERE stdno = :NEW.stdno;
IF subjectname = "DAtabase 1"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
ELSIF subjectname = "DAtabase 2"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
ELSIF subjectname = "Ecommerce"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
/* etc. etc. */
ELSIF subjectname = "Database 3"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
END IF;
END;
Create Trigger Enrolment
AFTER INSERT OF SubjectName ON SUBJECT
For Each Row
Declare Stud Student%RowTYPE;
Begin
SELECT *
INTO Stud
FROM Student
WHERE stdno= :New.stdno;
IF SubjectName = "DAtabase 1" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "DAtabase 2" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Ecommerce" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Accounting 1" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Book Keeping" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Physic 1" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Engineering Math" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Java Programing" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "C++ Programing" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Advanced C++" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Management Information System" THEN
SET balance = balance - (:New.crtunits *100)
ELSE
IF SubjectName = "Database 3" THEN
SET balance = balance - (:New.crtunits *100)
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
END;Use elsif to shorten them up -
EX:
If 1 = 1 then
do this
elsif a=b then
do this
elsif a<> b then
do this
end if;
Note you only need one end if, and there is no 'E' in elsif|||I've receive this msg...
__________________________________________________ _
AFTER INSERT OF SubjectName ON SUBJECT
____________*
ERROR at line 2:
ORA-04073: column list not valid for this trigger type
__________________________________________________ _|||Only UPDATE trigger can contain "OF" clause.
And, if it is Oracle SQL, it lacks in UPDATE table statement.
Your trigger (which will compile) could be something like this:
CREATE TRIGGER enrolment
AFTER UPDATE OF subjectname
ON subject
FOR EACH ROW
DECLARE
stud student%ROWTYPE;
BEGIN
SELECT *
INTO stud
FROM student
WHERE stdno = :NEW.stdno;
IF subjectname = "DAtabase 1"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
ELSIF subjectname = "DAtabase 2"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
ELSIF subjectname = "Ecommerce"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
/* etc. etc. */
ELSIF subjectname = "Database 3"
THEN
UPDATE subject
SET balance = balance - (:NEW.crtunits * 100);
END IF;
END;
How I can I know the current mode of report?
Hi,
I need to switch off background color of column in print mode to save
printer resources. I need to show background color of column in preview mode
only for readability purpose on the screen.
I don't know how I can trace report current mode programatically. I am
running server side report.On client side , I am showing report in report
viewer.
--
Regards,
NanditaOn Apr 30, 8:54 pm, Nandita Reshamwala <resh...@.xtra.co.nz> wrote:
> Hi,
> I need to switch off background color of column in print mode to save
> printer resources. I need to show background color of column in preview mode
> only for readability purpose on the screen.
> I don't know how I can trace report current mode programatically. I am
> running server side report.On client side , I am showing report in report
> viewer.
> --
> Regards,
> Nandita
As far as I know, this is not feasible. The only thing that I can
suggest is to either display the report in a datagridview (or
gridview) w/the background colors and w/the same setup as the report
would show and then have the RDL file w/o background colors -or- have
2 separate reports in an application and try to trade them out at
runtime. Sorry that I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
I need to switch off background color of column in print mode to save
printer resources. I need to show background color of column in preview mode
only for readability purpose on the screen.
I don't know how I can trace report current mode programatically. I am
running server side report.On client side , I am showing report in report
viewer.
--
Regards,
NanditaOn Apr 30, 8:54 pm, Nandita Reshamwala <resh...@.xtra.co.nz> wrote:
> Hi,
> I need to switch off background color of column in print mode to save
> printer resources. I need to show background color of column in preview mode
> only for readability purpose on the screen.
> I don't know how I can trace report current mode programatically. I am
> running server side report.On client side , I am showing report in report
> viewer.
> --
> Regards,
> Nandita
As far as I know, this is not feasible. The only thing that I can
suggest is to either display the report in a datagridview (or
gridview) w/the background colors and w/the same setup as the report
would show and then have the RDL file w/o background colors -or- have
2 separate reports in an application and try to trade them out at
runtime. Sorry that I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
How I can get the rdl file from one application
Hi all,
I want to do a aspx page who host the report inside of a frame. I need get
the rdl definition from the server thru of the application.
Can I get the rdl thru web services?
I don't want to do the report manager.
Thanks
Manuel JorgeUse the GetReportDefinition of the web service:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_2eew.asp
--
Adrian M.
MCP
"Manuel" <Manuel@.discussions.microsoft.com> wrote in message
news:ADE6F672-0E45-474E-BBDF-F5D51810C9D3@.microsoft.com...
> Hi all,
> I want to do a aspx page who host the report inside of a frame. I need get
> the rdl definition from the server thru of the application.
> Can I get the rdl thru web services?
> I don't want to do the report manager.
> Thanks
> Manuel Jorge
>
I want to do a aspx page who host the report inside of a frame. I need get
the rdl definition from the server thru of the application.
Can I get the rdl thru web services?
I don't want to do the report manager.
Thanks
Manuel JorgeUse the GetReportDefinition of the web service:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_2eew.asp
--
Adrian M.
MCP
"Manuel" <Manuel@.discussions.microsoft.com> wrote in message
news:ADE6F672-0E45-474E-BBDF-F5D51810C9D3@.microsoft.com...
> Hi all,
> I want to do a aspx page who host the report inside of a frame. I need get
> the rdl definition from the server thru of the application.
> Can I get the rdl thru web services?
> I don't want to do the report manager.
> Thanks
> Manuel Jorge
>
Sunday, February 19, 2012
How I can get the database-property "space available" using osql or isql?
If you see the properties of a database, you can see the "space available" attribute.
Can anyone hint on how I can get it using isql or osql (CLI) ?
Is there any query or stored procedure to get this attribute value for the specified or all the databases?would sp_spaceused help at all??
Can anyone hint on how I can get it using isql or osql (CLI) ?
Is there any query or stored procedure to get this attribute value for the specified or all the databases?would sp_spaceused help at all??
How I can get list of tables?
Hi friends,
How I can get list of tables and list of fields within those tables in SQL server.
Thnak a lot.
Check the thisarticlefrom 4guyfromrolla website
Regards
|||Rather than select data out of the sysobjects table, which is notguaranteed to be forwards/backwards compatible with different SQLServer versions, I encourage you to use the INFORMATION_SCHEMAviews which are supposed to work with each SQL Serverversion. In particular, look into the TABLES and/or COLUMNS views.|||
tmorton wrote:
I encourage you to use the INFORMATION_SCHEMA
views which are supposed to work with each SQL Server
version.
Actually, I think you are supposed to use the system stored procedures. For instance, to list all tables in databse execsp_tables etc.|||
Thanksa lot for your kind and useful info.
Subscribe to:
Posts (Atom)