|
Sql server must be installed on the machine that you are running your program in order for you to be able to load and use SQLDMO. You will need to install it on the SQL Server machine, not just any arbitrary server.
|
|
|
|
|
Hello there,
I have developed an application in VB 2005 backend SQL 2005 Reporting Crystal report 9.0
well now the application is tested everything is done
Now in end simply i want to make a setup for an entire application so that it can be burn into cd's and and be installed on other computers..
Any one can help me with brief.???
Thanks
Kenny.
|
|
|
|
|
|
hi every one i want to develop a hotel reservation system. please can someone help, tell me all the requirements i am not very food in programming. i don't know where to start from. thank you. Steven
|
|
|
|
|
My idea:
You have to store information about the hotels:
name,
city,
country,
number of stars,
room prices,
total number of double rooms,
total number of single rooms,
number of available rooms,
etc
You have to store information about the customers:
name,
email,
telephone,
address,
username,
password,
etc
You have to store information about the reservations:
username of the customer who made the reservation,
Hotel ID,
date of arrival,
date of departure,
total cost,
etc
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
1. Don't cross post
2. As you obviously don't have a clue, employ someone to do it for you - but check them out on CP first to see what questions they ask
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Table values import to excel Sheet Using only procedure Sql2005 for the purpose to run job please advise me ASAP
|
|
|
|
|
thangarajappa wrote: Table values import to excel Sheet Using only procedure Sql2005 for the purpose to run job please advise me ASAP
Perhaps you should take the time to post your problem with an understandable description.
|
|
|
|
|
uid class section doj status
75 L.K.G A 2008-12-09 PRESENT
81 L.K.G A 2008-12-09 ABSENT
75 L.K.G A 2008-12-10 PRESENT
81 L.K.G A 2008-12-09 PRESENT
82 L.K.G A 2008-12-09 PRESENT
84 L.K.G A 2008-12-09 PRESENT
57 L.K.G A 2008-12-09 PRESENT
58 L.K.G A 2008-12-09 PRESENT
64 L.K.G A 2008-12-09 PRESENT
65 L.K.G A 2008-12-09 PRESENT
66 L.K.G A 2008-12-09 PRESENT
67 L.K.G A 2008-12-09 PRESENT
69 L.K.G A 2008-12-09 PRESENT
68 L.K.G A 2008-12-09 PRESENT
70 L.K.G A 2008-12-09 PRESENT
71 L.K.G A 2008-12-09 PRESENT
72 L.K.G A 2008-12-09 PRESENT
73 L.K.G A 2008-12-09 PRESENT
74 L.K.G A 2008-12-09 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 ABSENT
select top 5 * from TBL_SATTENDANCE_lkg where uid not in (select top 7 uid from TBL_SATTENDANCE_lkg)
58 L.K.G A 2008-12-09 PRESENT
64 L.K.G A 2008-12-09 PRESENT
65 L.K.G A 2008-12-09 PRESENT
66 L.K.G A 2008-12-09 PRESENT
67 L.K.G A 2008-12-09 PRESENT
*************************************************************
75 L.K.G A 2008-12-09 PRESENT
81 L.K.G A 2008-12-09 ABSENT
75 L.K.G A 2008-12-10 PRESENT
81 L.K.G A 2008-12-09 PRESENT
82 L.K.G A 2008-12-09 PRESENT
84 L.K.G A 2008-12-09 PRESENT
57 L.K.G A 2008-12-09 PRESENT
58 L.K.G A 2008-12-09 PRESENT
64 L.K.G A 2008-12-09 PRESENT
65 L.K.G A 2008-12-09 PRESENT
66 L.K.G A 2008-12-09 PRESENT
67 L.K.G A 2008-12-09 PRESENT
69 L.K.G A 2008-12-09 PRESENT
68 L.K.G A 2008-12-09 PRESENT
70 L.K.G A 2008-12-09 PRESENT
71 L.K.G A 2008-12-09 PRESENT
72 L.K.G A 2008-12-09 PRESENT
73 L.K.G A 2008-12-09 PRESENT
74 L.K.G A 2008-12-09 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 ABSENT
select top 5 * from TBL_SATTENDANCE_lkg where uid not in (select top 2 uid from TBL_SATTENDANCE_lkg where uid = 81)
75 L.K.G A 2008-12-09 PRESENT
75 L.K.G A 2008-12-10 PRESENT
82 L.K.G A 2008-12-09 PRESENT
84 L.K.G A 2008-12-09 PRESENT
57 L.K.G A 2008-12-09 PRESENT
***********************************************
I NEED THIS RESULT(i.e) i want result except top 3 record with uid 81 (other records with uid 81)
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 PRESENT
81 L.K.G A 2008-12-12 ABSENT
*****************************************************
select top 3 * from TBL_SATTENDANCE_lkg where uid=81 not in (select top 3 uid from TBL_SATTENDANCE_lkg where uid = 81)
i try this but it won,t work...
how can get this result...
|
|
|
|
|
You was near to result wich you want to get.
I have modify your query and it shows right result.
select top 3 * from TBL_SATTENDANCE_lkg where uid=81 or <br />
uid not in (select top 3 uid from TBL_SATTENDANCE_lkg where uid = 81)
Hope it will helps you...
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
what is the command on the MYSQL promt to invoke editor to write Stored procedure in MYSQL
|
|
|
|
|
ptr_Electron wrote: what is the command on the MYSQL promt to invoke editor to write Stored procedure in MYSQL
If you mean MySql COmmand Line client, I'm not aware of such command. However you can write the procedure for example in the notepad and the paste it to the prompt or use source option to run a file as a script.
|
|
|
|
|
Just want to get some feedback on an execution plan
if 86% of the cost of a query is a clustered table scan I assume there is little or no options for optimising the query. On a 10 minute query this is the highest single cost.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I think it depends on the surrounding operations and how many rows are you expecting from that operation. For example if just a few rows are fetched using clustered index scan and they do not reside near each other, it would be more efficient to fetch them using the tree vertically.
However, it's hard to say if the plan can be better without seeing the whole plan and the sql statement (well actually also info about the indices and row amounts). Do you have any possibility to post the plan and the sql?
|
|
|
|
|
Thanks Mika - I was hoping for a quick confirmation but I found some ways to improve the performance.
This is actually 1 of 9 queries in the procedure and it takes 46% of the total, 2 queries take over 90% of the cost and each has a clustered index scan cost over 80%
The query retuens 3.4m rows from a base table of 16m with lots of linkages. I went through and turned all the joins into inner joins and did lots of preparation and reduced the query from 34 min to 10 min so I'll have to settle for that for now.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I was hoping for a quick confirmation
I guess I've been teaching and consulting for so many years that's it's quite impossible to get a quick or exact answer from me
Mycroft Holmes wrote: each has a clustered index scan cost over 80%
I've noticed that the db engine is very eager to use clustered indexes and to perform horizontal tree scans on clustered indexes. There has been situations where simply replacing a clustered index with a nonclustered one has resulted to better performance. Especially if there are other index candidates or index joins can be used. It may be worth trying.
Mycroft Holmes wrote: The query retuens 3.4m rows from a base table of 16m with lots of linkages
Have you measured and separated the execution time versus time to deliver the records. A large part of the wall time consumed may be used for transferring the data (execution plan doesn't show that). Also that's quite big amount of rows to handle in a procedure. Perhaps there could be ways to combine the queries or rearrange the logic somehow (purely guessing here).
|
|
|
|
|
I've notice some function names start with :: or @@ or without both for eg; ::fn_Trace_Getinfo(), @@Identity(), Identity() what's the difference? why they are named differently?
|
|
|
|
|
Hi,
Is it possible to password protect sql server stored procedure so that other user can not access or execute it???
Thank you.
Jayesh Talsania
modified on Wednesday, December 17, 2008 11:42 AM
|
|
|
|
|
If you want to restrict users from modifying the procedure or executing it, it's done by using privileges on users or roles (which then are granted to users). Have a look at GRANT[^] statement. If you don't grant sufficient privileges to a person, he won't be able to execute the procedure.
Note that user can have execute privileges even if he hasn't been granted them to the procedure directly. For example database owner has privileges to do anything in the database and so on.
|
|
|
|
|
I want to write a store procedure which accept anothor store procedure as parameter and then retrun the datatypes of input variables of given store procedure. Plz help if any one knows n how to do it.
|
|
|
|
|
You can pick up the definition of the stored proc from syscomments -
select text from syscomments where id = object_id('procname')
and concat all the comments together, then parse for the parameters.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thank you I have got solution by a simple query:
select * from information_schema.Parameters where specific_Name = 'ProceName'
|
|
|
|
|
You learn something every day. I'll keep that view in mind.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I have two tables, TABLE_OLD and TABLE_NEW, like so:
TABLE_OLD
PART_NUM Flag1 Flag2 Flag3
===============================
223 1 0 0
344 0 0 1
877 0 1 1
878 1 0 0
TABLE_NEW
PART_NO Flag1 Flag2 Flag3
===============================
223 NULL NULL NULL
344 NULL NULL NULL
877 NULL NULL NULL
878 NULL NULL NULL
I want to insert the data from the three columns in the old table, Flag1, Flag2, and Flag3, into their corresponding columns in the new table for each matching part number. The new table has matching columns of the same data type, the cells are just empty.
Most if teh INSERT examples I have seen so far deal with simple inserts of hard-coded data, not this sort of situation. Is the query I want to run something like this?:
INSERT INTO
TABLE_NEW.Flag1
TABLE_NEW.Flag2
TABLE_NEW.Flag3
FROM
TABLE_OLD.Flag1
TABLE_OLD.Flag2
TABLE_OLD.Flag3
WHERE TABLE_OLD.PART_NUM=TABLE_NEW.PART_NO;
Thanks for any help.
|
|
|
|
|
Nostrom0 wrote: I want to insert the data from the three columns in the old table, Flag1, Flag2, and Flag3, into their corresponding columns in the new table for each matching part number. The new table has matching columns of the same data type, the cells are just empty
If you want to insert new rows to the TABLE_NEW, it would be something like:
INSERT INTO TABLE_NEW (Flag1, Flag2, Flag3...)
SELECT Flag1, Flag2, Flag3...
FROM TABLE_OLD
If you want to restrict the rows that are inserted, add WHERE clause
However, I got the impression that you don't actually want to insert new rows, but to update already existing rows. If that's the case, then it would be like:
UPDATE TABLE_NEW
SET (Flag1, Flag2, Flag3...) = (SELECT Flag1, Flag2, Flag3...
FROM TABLE_OLD
WHERE TABLE_OLD.PART_NUM=TABLE_NEW.PART_NO)
By the way, did you get the materialized view fixed?
|
|
|
|