Viewing 15 posts - 286 through 300 (of 388 total)
[font="Courier New"]
use PIVOT
example:
DECLARE @tbl TABLE (Country VARCHAR(10), Sales MONEY)
INSERT INTO @tbl (Country, Sales)
SELECT 'UK', 250 UNION ALL
SELECT 'USA', 400 UNION ALL
SELECT 'INDIA', 500
SELECT * FROM @tbl
PIVOT (
SUM(Sales)
FOR Country IN...
December 27, 2007 at 12:59 am
something like this?
select pri.name, per.permission_name from sys.database_permissions per
INNER JOIN sys.database_principals pri
ON per.grantee_principal_id = pri.principal_id
December 26, 2007 at 8:32 am
I tried with a file having the folllowing content.
"Jacob","jacob"s" File", "Other File"
I get this file processed correctly (Jacob, Jacob"s" File, Other File) with the following settings (SSIS Flat File Connection...
December 26, 2007 at 8:24 am
global temp tables will be visible to all sessions. You might need global temp tables only when multiple sessions need to insert/update/delete data from the same temp teble.
December 26, 2007 at 6:41 am
Try the following:
go to the properties of the 'sysadmin' login and make sure that it has permissions to access your new database. I guess it mightnot have permissions. grant permissions...
December 26, 2007 at 6:13 am
Rame..,
From your first post, I understand that you are trying to read data from an excel sheet. But i did not find code which actually connects to the excel document...
December 26, 2007 at 6:08 am
Personally, I prefer to pass all the data to the stored procedure at once..instead of calling a stored procedure for each record. This will give better performance as well as...
December 26, 2007 at 5:43 am
One option is to put the results of the SP to a temp table and read the desired value from it.
example:
CREATE TABLE #tmp (Value NVARCHAR(200), Data NVARCHAR(500))
INSERT INTO #tmp EXECUTE...
December 26, 2007 at 3:01 am
What is the TSQL statement that you are trying to execute? It looks like you are trying to read data from an excel sheet. But you have not posted the...
December 26, 2007 at 2:48 am
Something like this?
;WITH family1 AS (
SELECT DISTINCT InvoiceID
FROM invoiceDetails
WHERE ItemCode LIKE 'PMM1%'
), family2 AS (
SELECT DISTINCT InvoiceID
FROM invoiceDetails
WHERE ItemCode LIKE 'PMM2%'
), family3 AS (
SELECT DISTINCT InvoiceID
FROM invoiceDetails
WHERE...
December 26, 2007 at 2:46 am
hxd001_810 (12/25/2007)
Try again:SELECT IDENTITY(INT,1,1) ID,CustomerID INTO #TEMP FROM INSERTED ORDER BY CustomerID
DECLARE TEST_CUR CURSOR FOR SELECT CustomerID FROM #TEMP ORDER BY ID
I would suggest that you get away from the...
December 25, 2007 at 11:42 pm
Jeff Moden (12/25/2007)
December 25, 2007 at 11:32 pm
I agree with chirag and jeff. Probably you can look at a few examples that use XML:
http://www.sqlservercentral.com/articles/Miscellaneous/2908/
http://www.sqlservercentral.com/articles/Miscellaneous/2909/
http://www.sqlservercentral.com/articles/Miscellaneous/2911/
http://www.sqlservercentral.com/articles/Stored+Procedures/2912/
December 25, 2007 at 11:13 pm
Viewing 15 posts - 286 through 300 (of 388 total)