Viewing 15 posts - 421 through 435 (of 898 total)
1.How many columns a SQL table can hold.
2.How many string functions are there in SQL.
3.How many non-clustered indexes a SQL table can have.
4.What is the port to be used to...
September 18, 2012 at 6:12 am
You can use the un-documented SP "sp_MSforeachdb" for this
IF OBJECT_ID('tempdb..#tmp_Indexes') IS NOT NULL
DROP TABLE #tmp_Indexes
DECLARE@strSQLVARCHAR(2000)
DECLARE@IndexName VARCHAR(1000)
CREATE TABLE #tmp_Indexes
(
DatabaseNameVARCHAR(100),
IndexNameVARCHAR(1000)
)
SET@IndexName = 'mst_Employees_IX01' -- You can enter the name of the index here
SET@strSQL...
September 18, 2012 at 5:36 am
Probably something like this
SELECTCounts AS Num_Users_in_Acc, COUNT(Acc_no) AS [COUNT]
FROM(
SELECTCOUNT( users ) AS Counts, Acc_no
FROMTemp_1
WHEREarea = 'PMB'
GROUP BY Acc_no
) T
GROUP BY Counts
September 12, 2012 at 12:38 am
Please describe the problem you have along with DDL, some sample data and the expected results
Check the link in my signature if don't know how to do this
September 11, 2012 at 3:52 am
Check the data types of date columns in your SELECT list
I assume you have some column with CHAR or VARCHAR as their datatype, convert them to SMALLDATETIME or DATETIME
September 11, 2012 at 3:31 am
greeshma.patla (9/11/2012)
Msg 2627, Level 14, State 1, Line 10Violation of PRIMARY KEY constraint 'XPKLKP_PARAM_TYPE'. Cannot insert duplicate key in object 'dbo.LKP_PARAM_TYPE'.
The statement has been terminated.
With this approach, I am sure...
September 11, 2012 at 3:25 am
greeshma.patla (9/11/2012)
MERGE INTO LKP_PARAM_TYPE AS CUSING (
...
September 11, 2012 at 1:38 am
What are the expected results based on your data?
September 11, 2012 at 1:12 am
No. There is no specific syntax available for this purpose.
You will have to manually type in the column names or use some tools like SQL Prompt which will list out...
August 28, 2012 at 7:44 am
Do you have any trigger on the table "deposits_daily_balance"?
July 27, 2012 at 5:11 am
raghuldrag (7/27/2012)
Above the my procedure query giving output,i m splitting the amount column has credit and debit,closing_bal column is sum of account is E=>debit-credit,
...
July 27, 2012 at 4:13 am
raghuldrag (7/27/2012)
July 27, 2012 at 3:03 am
SELECTSESSIONPROPERTY('ANSI_PADDING')
July 27, 2012 at 2:54 am
If you have a UNIQUE KEY constraint on the column Col1 of table T1, then its possible to define a FOREIGN KEY as you have mentioned
But, if the column is...
July 27, 2012 at 2:38 am
Phil Parkin (7/27/2012)
I often use Excel to help build these long repetitive queries.
Yes. Excel is another good option.
I use a combination of both, sometimes Excel and sometimes Dynamic SQL.
July 27, 2012 at 12:53 am
Viewing 15 posts - 421 through 435 (of 898 total)