|
table 1, empno(pk), empname , empage
table 2, deptno(pk),deptname,dept_empno(fk)
then when joinging the datea
select empname,emapage,empno,deptname from table1 inner join table2 on empno = dept_empno
|
|
|
|
|
In oracle database there is a table t, its creat table sql is as follows:
create table t
(
sno number(3,0)
check (sno >=1 and sno <=4)
);
If another person want to know the context of the check constraint within table t, How to write
this through SQL?
thanks
|
|
|
|
|
Hi there,
i have a website
Files hierarchy is
wwwroot/
Default.aspx
Login.aspx
data/
db1.mdb[MS Access database]
web.config
Register/
Signup.aspx
web.config
when i inserting a record from Signup.aspx to db1.mdb it was returning an error Operation must use an updateable query
i think i have to change the permissions of db1.mdb, if so how to change permissions. iam using windows xp operationg system.
thanks for any advice
i posted this in webdevelopment forum also, i confused where to post this message.....
|
|
|
|
|
You haven't posted any code, so it's difficult to help you. Did you try Googling the error message to find out what it means?
Also, this is a SQL question so it should be posted in the SQL forum. It has nothing to do with web development.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Is there anyway i can tell who has been deleting rows from a specific table. Our db (SQL Server 2000) is using SQL Authentication. This is what i need:
1. Queries run
2. IP that ran the query
3. SQL Authenticanted Username
4. Time query was run.
Is this possible?
|
|
|
|
|
Can be done through triggers for the most part.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
can you give me an example or sample on how i can set this up?
|
|
|
|
|
Google search on SQL Triggers[^] turns up a bit.
Other aspects, like getting the IP address is left for a research exercise
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: research exercise
I can't stop laughing...!!!
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
so that I can do the following:
<br />
exec GetProcSourceCode 'myproc'<br />
to view the source code of 'myproc'?
|
|
|
|
|
Why would you need a proc to do that. You may use sp_helptext[^].
If you still would like to have a proc, you may include the above said command to a proc like the one below
Create Proc GetProcSourceCode
@pProcName VarChar(500)
As
Exec sp_helptext @pProcName
|
|
|
|
|
sp_helptext is exactly what I was looking for. Thanks.
|
|
|
|
|
You are most welcome
|
|
|
|
|
Hi All,
I have a stored procedure that is bound to a data grid.Every time there is a change of data on the stored procedure i want it to be reelected on the data grid automatically.
This can be done i think with SQL2005.Can you please adivce me on this?
In SQL Server 2005 there is native support for creating cache dependencies that expire when a change is made in the database.
How do you do it?
Please advice.
Thank you
|
|
|
|
|
Have you considered reading the documentation[^]?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Guys i am planning to develop a system that work on Pocket PC... becoz some of my client works at field which obviously can carry a computer.. so im planning to give them a system that works on Pocket PC... but im too much confuse what does Replication, Publication and Subcriptions (SQL Server 2005 and SQL Server Mobile) can do in my system.. does any can give a clear view or give me some to start with.. thanks..
|
|
|
|
|
Replication is a bit of a black art.
There is plenty out there on google.
Really the only way to go about it is to start and experiment.
The reason I say this is that the type of replication you use is dependent on lots of factors and experimentation is the best way IMHO.
My position is that I have never used it myself, but have worked for companies that use it and have seen how complex it can get.
I am considering using it and with the dearth of practical information out there it has become apparent to me that bar having a DBA with experience in replication at your side - experimentation is the best way.
You always pass failure on the way to success.
|
|
|
|
|
Hi,
I'm working in SQL Server 2005 and I'm trying to retrieve some records from a MySQL database using:
SELECT * FROM OPENROWSET(provider, connectionString, selectStatement)
I used MSDASQL as the provider. Can anyone tell me a good connection string?
Thanks
|
|
|
|
|
http://www.connectionstrings.com/[^]
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Hi.
In my application I have to select some records from a table for which the value of a date/time columns is within a certain range. So it comes down to comparing some dates in a SQL command.
How do you do that for Access and Sql Server databases? I also have to do it for MySql, but I understand that this is not the best place to ask MySql stuff.
So for Access and Sql Server what's the easiest and safest way to compare dates?
Thanks.
|
|
|
|
|
Never compare your dates when they are present; they'll get jealous and not date you anymore.
WHERE SomeDateField BETWEEN LowDate AND HighDate
should work for pretty much any SQL database.
|
|
|
|
|
Hi
I want to assign a xml field for the insertion like
insert into table1(t1,t2,t3)
select SequenceItem.query('t1').value('.','INT') AS t1
,SequenceItem.query('t2').value('.','Datetime') AS t2
,SequenceItem.query('t3').value('.','Datetime') AS t3
FROM @xmlJobSequence.nodes('/NewDataSet/Table1') AS xmlJobSequence(SequenceItem)
instead of assigning each and every field with the help of .QUERY, i want to assign all the fields like our usual query select * from table..
is it possible.. how to go about it.
|
|
|
|
|
Hi all i have developed an asp.net 2.0 application with sql2005. it is running ok at my pc. When i tried to deploy it at the customer site i am receiving an error when i hit login. I can acccess the login page but when i enter username and password and press login i get the following error:
System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
any ideas regaring this.
my connection string is as follows:
<connectionStrings><br />
<add name="conString" connectionString="Data Source=kassem;Initial Catalog=CDC;persist security info=False;user id=sa; password=kassem255;" providerName="System.Data.SqlClient"/><br />
<add name="AccessCon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\current bdl Europe Schd\bdl_results.mdb" providerName="system.data.oledb"/><br />
</connectionStrings>
|
|
|
|
|
hmmm... well your first problem is your connection string referancess an access database, not sql2005.
MrPlankton
|
|
|
|
|
Actually i need both and i have put both SQL & OLEDB. Check well
|
|
|
|