|
I suspect you will have to build the string for the new proc then execute it.
Something like this<br />
<br />
DECLARE @NewProc varchar(1000)<br />
<br />
SET @NewProc = 'Create Proc MyNewProc AS select * from Address go'<br />
<br />
exec (@NewProc)<br />
<br />
<br />
exec ('MyNewProc')
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
Then why on earth are you asking them here ?
Christian Graus - C++ MVP
|
|
|
|
|
Christian Graus wrote: Then why on earth are you asking them here ?
Doesn't sound like interview went too well for the OP? Or perhaps the OP is looking for assurance that the questions were answered correctly
|
|
|
|
|
yes
yes
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
I want to know examples of shared,update,exclusive locks in sql server 2000
|
|
|
|
|
Google broken where you live ?
here[^]
Christian Graus - C++ MVP
|
|
|
|
|
Hi
I am facing a problem. I want to upload data from my local database to internet database(like exporting data) using an asp.net web page.I hve to delete all the data in internet database. That i ve done correctly. Now i want to know wether there is any method for exporting data from local database to internet database . When a asp.net button is clicked the local database's values must be loaded ito internet database . pls help me .
|
|
|
|
|
Export your DB table to CSV (Comma Seperated Files)
Upload these via an asp/x upload page.
Create SQL Server DTS that imports these into your internet db
Use another/same asp/x to run the DTS via a SQL script.
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
Sir,
Thanks for helping me
I am new to asp.net so its very difficult for me to understand. can you pls explain this.Wht is csv,
dts.
pls help me its very important
|
|
|
|
|
In a Employee table how can i retrieve a 3 maximum salary from that table
Please guide me
-
|
|
|
|
|
The Top keyword will allow you to select 3. The Order By keyword will allow you to order the items by salary, so you select the three highest.
Really, any site on SQL will tell you that ( or any book ) and I can't give more precise info without knowing your table schema.
Christian Graus - C++ MVP
|
|
|
|
|
select top 3 * from Employee order by salary desc
--replace column salar with your real column name, same do with table name
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
Hi, I would like to know how do i select the last inserted row in a table
Thank you
La Light
|
|
|
|
|
Do you need to whole row or just the ID? You could try something like this for the whole row:
SELECT * FROM tblSomething WHERE tblID = IDENT_CURRENT('tblSomething')
Pablo
Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
|
|
|
|
|
but when your ids are uniqueidentifiers you do have a the current id do you? and i'm not necersary selecting in the at the same time when the rows are selected.
La Light
|
|
|
|
|
If the table has an Identity field (ID) or a created date field then this is fairly easy
<br />
select top 1 * from table<br />
ORDER BY myfield DESC<br />
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
But my Ids are uniqueidentifier so i cant not do it by a exacly field
La Light
|
|
|
|
|
How can i merge two tables based on ids? I want to display everything from one table and append columns with matched ids from another table. See example below.
Table 1
id col1 col2 col3
1 a b c
2 d e f
3 g h i
Table 2
id colx coly colz
2 T U V
Final result:
id col1 col2 col3 colx coly colz
1 a b c
2 d e f T U V
3 g h i
I'll appreciate any help thanks.
|
|
|
|
|
select a.id, a.col1, a.col2, a.col3, b.colx, b.coly, b.colz
from table1 a left outer join table2 b on a.id = b.id
Mike Lasseter
|
|
|
|
|
Hi,
i have to extract datetime field of table in database stored in
mm/dd/yyyy 12:00:00 and display it in repeater in MM.dd.yyyy format.
Time should not be displayed ,date should be displayed in MM.dd.yyyy foemat only that is having dots not slashes.
How can i achieve it?
Is there any function in SQL to convert date format?.Please guide.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
Try this:
DateTime myDate = dateFromDB;
string myDateStringForm = myDate.ToString("mm.dd.yyyy");
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
i dont want to save it as an string i want to handle it as date how do you do that?
La Light
|
|
|
|
|
You need a string if you are binding it to a Text property of the control.
If you do not want to declare a string variable, do it in one line:
myControl.Text = myDate.ToString("MM.dd.yyyy");
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
replace(convert(varchar,getdate(),101),'/','.')
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
hello
i'm trying to write a query that returns the primary key field and its attributes of a given table. the table name is given at runtime through a dropdown menu.
i encounter many problems.
can anyone please tell me what query to use for this purpose????
please reply soon.
awaiting ur reply
Saira
|
|
|
|