|
Two books that I've found useful. They are bit old (from the time before electricity ), but excellent ones:
- An introduction to database systems / C.J. Date
- Fundamentals of database systems / Elmasri & Navathe
The need to optimize rises from a bad design
|
|
|
|
|
I'll second both of those suggested books
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Thanx Mika
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
No problem
The need to optimize rises from a bad design
|
|
|
|
|
If you are using Sql Server then you should look at Pro Sql Server 200x Database Design and Optimization by Louis Davidson, et al. (Apress).
|
|
|
|
|
download absolute beginners lesson in microsoft visual studio site.
You have there video about c# and sql server.
BOB TUBOR lessons.
Later on you will have something to question, not now
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: BOB TUBOR lessons.
Sure
Thanx mate!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi
i need to pass table name and to a function dynamically anyone can help
Mohammad Al Hoss
Development To Me Is A Pleasure more than a Job
|
|
|
|
|
Well, you can pass the table name as a variable, but as far as I know you cannot execute dynamic sql in a function so it will be of no use to you.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I knew this would come up sooner or later.
SQL Server Central had an article (sorry no link) that used XML to pass the table and data to a function.
Stored proc expamle
Declare @X xml<br />
Set @X = (SELECT RegionID, sum(Amount) Amount <br />
FROM FactTran<br />
where PeriodID = @PeriodID<br />
and WFGroupID = @WFGroupID<br />
and TranTypeID = @TranTypeID<br />
and ISNULL(BUID,7) = 7<br />
Group By <br />
RegionID<br />
For XML Raw ('RegionID'), ROOT('Regions'))
Function example
LEFT OUTER JOIN (SELECT <br />
x.item.value('@RegionID[1]', 'VARCHAR(100)') AS RegionID,<br />
x.item.value('@Amount[1]', 'Decimal(30,2)') AS Amount<br />
FROM @x.nodes('//Regions/RegionID') AS x(item)) R on R.RegionID = A.RegionID<br />
These are my usage and may give you some idea if you cannot find the article.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am trying to install the SQL Server 2008 Express on Windows XP SP3 machine but getting the following messages:
Event Type: Error
Event Source: MSSQL$SQLSERVER
Event Category: Server
Event ID: 17190
Date: 10/6/2008
Time: 6:36:38 PM
User: N/A
Computer: JASSIMRAHMA
Description:
FallBack certificate initialization failed with error code: 1.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 26 43 00 00 10 00 00 00 &C......
0008: 16 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 53 00 45 00 52 00 L.S.E.R.
0030: 56 00 45 00 52 00 00 00 V.E.R...
0038: 00 00 00 00 ....
Event Type: Error
Event Source: MSSQL$SQLSERVER
Event Category: Server
Event ID: 17182
Date: 10/6/2008
Time: 6:36:38 PM
User: N/A
Computer: JASSIMRAHMA
Description:
TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 1e 43 00 00 10 00 00 00 .C......
0008: 16 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 53 00 45 00 52 00 L.S.E.R.
0030: 56 00 45 00 52 00 00 00 V.E.R...
0038: 00 00 00 00 ....
Event Type: Error
Event Source: MSSQL$SQLSERVER
Event Category: Server
Event ID: 17182
Date: 10/6/2008
Time: 6:36:38 PM
User: N/A
Computer: JASSIMRAHMA
Description:
TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 1e 43 00 00 10 00 00 00 .C......
0008: 16 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 53 00 45 00 52 00 L.S.E.R.
0030: 56 00 45 00 52 00 00 00 V.E.R...
0038: 00 00 00 00 ....
Event Type: Error
Event Source: MSSQL$SQLSERVER
Event Category: Server
Event ID: 17826
Date: 10/6/2008
Time: 6:36:38 PM
User: N/A
Computer: JASSIMRAHMA
Description:
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: a2 45 00 00 12 00 00 00 ¢E......
0008: 16 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 53 00 45 00 52 00 L.S.E.R.
0030: 56 00 45 00 52 00 00 00 V.E.R...
0038: 00 00 00 00 ....
Event Type: Error
Event Source: MSSQL$SQLSERVER
Event Category: Server
Event ID: 17120
Date: 10/6/2008
Time: 6:36:38 PM
User: N/A
Computer: JASSIMRAHMA
Description:
SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: e0 42 00 00 10 00 00 00 àB......
0008: 16 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 53 00 45 00 52 00 L.S.E.R.
0030: 56 00 45 00 52 00 00 00 V.E.R...
0038: 00 00 00 00 ....
Thanks,
Jassim
|
|
|
|
|
Have you installed all your service packs for your OS ?
|
|
|
|
|
|
just tried to start the SQL Server (SQLEXPRESS) service and got the following messages in the evet log:
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17207
Date: 09/10/2008
Time: 11:35:27 AM
User: N/A
Computer: JASSIMRAHMA
Description:
FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 37 43 00 00 10 00 00 00 7C......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17120
Date: 09/10/2008
Time: 11:35:26 AM
User: N/A
Computer: JASSIMRAHMA
Description:
SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: e0 42 00 00 10 00 00 00 àB......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17826
Date: 09/10/2008
Time: 11:35:26 AM
User: N/A
Computer: JASSIMRAHMA
Description:
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: a2 45 00 00 12 00 00 00 ¢E......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17182
Date: 09/10/2008
Time: 11:35:26 AM
User: N/A
Computer: JASSIMRAHMA
Description:
TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 1e 43 00 00 10 00 00 00 .C......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17182
Date: 09/10/2008
Time: 11:35:26 AM
User: N/A
Computer: JASSIMRAHMA
Description:
TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 1e 43 00 00 10 00 00 00 .C......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17204
Date: 09/10/2008
Time: 11:35:26 AM
User: N/A
Computer: JASSIMRAHMA
Description:
FCB::Open failed: Could not open file e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\model.mdf for file number 1. OS error: 21(The device is not ready.).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 34 43 00 00 10 00 00 00 4C......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: MSSQL$SQLEXPRESS
Event Category: Server
Event ID: 17190
Date: 09/10/2008
Time: 11:35:26 AM
User: N/A
Computer: JASSIMRAHMA
Description:
FallBack certificate initialization failed with error code: 1.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 26 43 00 00 10 00 00 00 &amp;C......
0008: 17 00 00 00 4a 00 41 00 ....J.A.
0010: 53 00 53 00 49 00 4d 00 S.S.I.M.
0018: 52 00 41 00 48 00 4d 00 R.A.H.M.
0020: 41 00 5c 00 53 00 51 00 A.\.S.Q.
0028: 4c 00 45 00 58 00 50 00 L.E.X.P.
0030: 52 00 45 00 53 00 53 00 R.E.S.S.
0038: 00 00 00 00 00 00 ......
Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Date: 09/10/2008
Time: 11:35:27 AM
User: N/A
Computer: JASSIMRAHMA
Description:
The SQL Server (SQLEXPRESS) service terminated with service-specific error 1814 (0x716).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
|
|
|
|
|
what is @identity in sql server 2005............is a table or variable what functionality it has...plz explain.
|
|
|
|
|
@identity is not part of SQL Server, so either its a variable you have declared or you meant @@identity which contains the last value inserted into an identity column.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I think you mean @@identity
example
<br />
INSERT INTO Production.Location (Name, CostRate, Availability, ModifiedDate)<br />
VALUES ('Damaged Goods', 5, 2.5, GETDATE());<br />
GO<br />
SELECT @@IDENTITY AS 'Identity';<br />
This gets the last Identity field inserted into a talbe, ie usually the primary key.
|
|
|
|
|
yes sure....that one only and thank you for reply.
so when we use @@identity it will get last identity field right.........it means one field value or total column......I think it returns only single value.
one more...select Rank(1) from table update set=some column.
it will get affect first row of the table ok.
when i want 4th row should be execute is possible to give rank(4) .
modified on Friday, October 10, 2008 2:54 AM
|
|
|
|
|
I used sql server 2005:
use book
go
exec sp_fulltext_database @action='Enable'
go
sp_fulltext_catalog @ftcat='name' @action='Create'
error :Incorrect syntax near '@action'.
why? help me, thanks
modified on Thursday, October 9, 2008 11:35 AM
|
|
|
|
|
Its a typo
sp_fulltext_catalog @ftcat='name' <big>,</big> @action='Create'
Bob
Ashfield Consultants Ltd
|
|
|
|
|
SELECT *
FROM RDRetailer
WHERE (RetailerCode LIKE '%'%' )
i want to check (') exsists on retaile code field. but this sql query gives error. please help me
Dushan Perera
modified on Thursday, October 9, 2008 1:11 AM
|
|
|
|
|
Did you type ESCAP '\' ? like
SELECT *
FROM RDRetailer
WHERE (RetailerCode LIKE '%\'%' )
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
I have a Windows application that uses typed datasets. When setting up the datasets, Visual Studio asks if you want to remember the connection. This is helpful when making changes to the datatables or table adapters.
Before filling the dataset, I programatically change the connection string of each table adapter so that it will connect to the remote database. Before this operation, it is set to the local database since that is the one I am developing on.
All goes well except with one form. See the sequence of events below:
First I change the connection string.
Me.LocationsTableAdapter.Connection.ConnectionString = Database.gdbRemoteConnection.ConnectionString
When calling the following fill method, it works as it should.
Me.LocationDataTableAdapter.FillByLocationID(Me.DsLocations.LocationData, cmbTestLocation.SelectedValue)
When calling the following fill method, it displays an error message saying the database location is not correct. It is referencing the local database even though I changed the connection string.
Me.LocationDataTableAdapter.FillByEntryDate(Me.DsLocations.LocationData, dtmDateFrom.Value.Date, dtmDateTo.Value.Date)
If I step through the code, it even shows the connection string set to the remote database when the fill method is called. Is this a known bug?
|
|
|
|
|
You might be better asking this in the VB forum, Dave Kreskowiak may be able to help, he seems to know how these bloody MS wizard tools seem to work.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You could always try and not using wizard and program it yourself, at first its hard but it gets easier as you go along.
|
|
|
|