|
I would recommend reading pl/sql from Ivan byross (sorry for spelling mistakes).
|
|
|
|
|
can i use the reference parameteres in the sql user defined functions.
actuallty i wanted to retrieve two values from the function.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Here is a link to an article that clearly explains about the three types of User-Defined function's that can be Implemented in sql server.
UDF's Explained with a real world example[^]
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
From Data menu when I select Add new data source. I get wizard which shows
3 options , after selecting database as first option It shows second page
Of new connection,I get Add Connection box. On which change Button gives list of available databases. (All this for first chapter of ADO.net step by step.)
I have installed SQL server 2005.net,VC#2005.net still it does not show SQL server option in list. It just shows Microsoft SQL server database file,which is of no use.
Will any one will help me for same.
When I open SQL server 2005,it really does not have anything like Query analyser
or Enterprise Manager.
|| ART OF LIVING ||
|
|
|
|
|
You really need to RTFM rather badly.
SQL Server 2005 == Microsoft SQL Server.
SQL Server management Studio ~= Enterprise manager + query Analyzer.
There is no such thing as SQL Server 2005.net (drop the .net).
sounds like the book you chose is a crappy one. Using the wizards is always a bad Idea, since you never get a real idea of how the code should be done, but a least common denominator solution instead.
|
|
|
|
|
Hi friends,
what is the boolean or bit datatype available in ORACLE ?
Please help me.
Regards,
Jegastar.
|
|
|
|
|
Google this question and you will discover that there is no boolean data type in Oracle just as there is no boolean data type in SQL Server.
You always pass failure on the way to success.
|
|
|
|
|
GuyThiebaut wrote: there is no boolean data type in SQL Server
But theres bit datatype in sql server 2005.
|
|
|
|
|
|
Your post has been tagged as Spam. What part of Point 10[^] is beyond your comprehension?
If you want to advertise, I suggest buying ad space[^] on CP.
|
|
|
|
|
His post is a bit ambiguous, it seems to imply he'll create a Microsoft SQL Server MVP a month. He plainly cannot do that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
He did put some work into the site, just not into customizing the stock DotNetNuke layout.
I was trying to figure out if it another case of plagurism, but I couldn't come up with any matches anywhere. The site looks legit, though just having a site does give you an MVP.
I wonder what our resident SQL guru Colin thinks about his site??
|
|
|
|
|
I may not be quite up to Colin's guru status, but I don't think that the site offers too much. It creates a SQL Server Community MVP a month? Hmmm - what qualities are they actually expecting of a developer. There are lots of other good sites on SQL Server, such as SQLTeam[^].
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dave Kreskowiak wrote: If you want to advertise, I suggest buying ad space[^] on CP.
Though I didn't get to see their ad, I can only imagine with a username like SQL Gurus... I've got everything I need here, and I don't need really any other website
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I would like to be able to assign the value from a created QueryDef object to a modifiable recordset object variable. How do I go about doing this? The Microsoft documentation does not provide any explanations.
Here is the code so far:
Private Sub ProcessHeadcountRecords()
Dim dbsHeadcount As Database
Dim Cnxn As ADODB.Connection
Dim strConn As String
Dim rstInputFile As ADODB.Recordset
Dim cmdSQLInputFile As ADODB.Command
Dim strSQLInputFile As String
Dim rstHyperionMany As ADODB.Recordset
Dim cmdSQLHyperionMany As ADODB.Command
Dim strSQLHyperionMany As String
Dim rstHyperionOne As ADODB.Recordset
Dim cmdSQLHyperionOne As ADODB.Command
Dim strSQLHyperionOne As String
Dim qdfNew As QueryDef
Dim strDBPath As String
Dim strFileName As String
Dim strMessage As String
strDBPath = "J:\GELCO DATABASE\Headcount Database\Headcount Database.mdb"
Set dbsHeadcount = OpenDatabase(strDBPath)
Set Cnxn = New ADODB.Connection
strConn = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & strDBPath & ""
Cnxn.Open strConn
Set rstInputFile = New ADODB.Recordset
strSQLInputFile = "SELECT [COUNTRY], [TYPE], [BUSINESS_UNIT], " & _
"[L_R_G], [REGION], [JOB_FUNCTION], [ACTUAL], [NUMINDEX] " & _
"FROM TBLINPUTFILE"
rstInputFile.Open strSQLInputFile, Cnxn, adOpenKeyset, adLockOptimistic
rstInputFile.MoveFirst
Set rstHyperionMany = New ADODB.Recordset
strSQLHyperionMany = "SELECT [COUNTRY], [TYPE], [BUSINESS_UNIT], " & _
"[L_R_G], [REGION], [JOB_FUNCTION], [NUMFOREIGNKEY] " & _
"FROM [TBLHYPERIONMANY2] ORDER BY [NUMFOREIGNKEY]"
rstHyperionMany.Open strSQLHyperionMany, Cnxn, adOpenKeyset, adLockOptimistic
strFileName = "qryPassThroughQuery"
Do Until rstInputFile.EOF
With dbsHeadcount
strSQLHyperionMany = "SELECT [COUNTRY], [TYPE], " & _
"[BUSINESS_UNIT], [L_R_G], [REGION], [JOB_FUNCTION], [NUMFOREIGNKEY] " & _
"FROM [TBLHYPERIONMANY2] " & _
"WHERE [COUNTRY]='" & UCase(rstInputFile![COUNTRY]) & "' " & _
"AND [TYPE]='" & UCase(rstInputFile![Type]) & "' " & _
"AND [BUSINESS_UNIT]='" & UCase(rstInputFile![BUSINESS_UNIT]) & "' " & _
"AND [L_R_G]='" & UCase(rstInputFile![L_R_G]) & "' " & _
"AND [REGION]='" & UCase(rstInputFile![REGION]) & "' " & _
"AND [JOB_FUNCTION]='" & UCase(rstInputFile![JOB_FUNCTION]) & "'"
rstHyperionMany.Requery
Set qdfNew = dbsHeadcount.CreateQueryDef(strFileName, strSQLHyperionMany)
DoCmd.SetWarnings False
'If rstInputFile.RecordCount = 1 Then
rstInputFile![NUMINDEX] = QueryDefs![strFileName]![NUMFOREIGNKEY] /// I DO NOT KNOW THE SYNTAX HERE TO ADDRESS THE QUERYDEF OBJECT!!! PLEASE HELP!!!
'Else
'MsgBox ("Record not found")
'End If
'prgProgressBar.Value = prgProgressBar.Value + 1
End With
dbsHeadcount.QueryDefs.Delete strFileName
rstInputFile.MoveNext
Loop
End Sub
-- modified at 13:21 Friday 5th October, 2007
|
|
|
|
|
I am using a CrossJion for Present the values for a few selected columns base on there [Post Date] Dimension, I also need to present the difference between these columns from [Post Date] to [Post Date].Lag(1): Any suggestions??
Code
SELECT DISTINCT({CrossJoin({[Post Date].[^@BINAV_Param_Date_priormonth@^] , [Post Date].[^@BINAV_Param_Date_priormonth@^].Lag(1)},{[Measures].[Current Balance],[Measures].[Weighted AVG Interest Rate],[Measures].[Average Balance]})
}) ON COLUMNS,
NON EMPTY DISTINCT ({[Product].[Time Deposit]}) ON ROWS
Thank You,
Don
|
|
|
|
|
Hi,
I got this off the .NET Tiers documentation:
Description is provided for Tables, Columns, and Keys..
Is it possible to create a description for the columns, and keys, etc? For what else can one create descriptions for?
Here is a sample description for a table:
-- Add Table Description
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'All allowable Checking Account types for my ABC System' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'BankAccountType'
Please can someone advise?
Regards
|
|
|
|
|
|
HI All,
Is there any way to increase the excecution time of my stored procedures in a SQL server database.
I have a couple of stored procedures that takes time to run.
Thanks
|
|
|
|
|
Optimization in SQL is an art where experience is the best teacher. To begin with, seperate any queries you are making and run them through the profiler and see if there is any obvious changes. Adding the appropriate indexes or a more restrictive filter (WHERE Clause) can help tremendously.
By seperating them, you will also find your bottle neck code. You have to experiment with different techniques to see what will execute faster. Sometimes breaking up a large slow query into smaller queries is much faster (sometimes it works the other way). It really depends upon your data. There is no magic button.
|
|
|
|
|
Thank you ver much,
I am not really a database person,Can you please tell me how i should index my database?
Thank you very much for your time.
|
|
|
|
|
Indexing is a table by table, query by query decision. I have no idea about the structure of your data or your queries.
Take a look at your slow query's WHERE clause. This may dictate the index for you. Using an example query:
SELECT
*
FROM
mytable
WHERE
myDate < '1/1/2007' and
myColor = 'Green'
Here you would examine your data and take a good guess as to which column filter reduces the result set the most. Lets say it is [myColor]:
CREATE INDEX myIndex ON myTable
(
mycolor,
mydate
)
|
|
|
|