Jump to content

Ms Sql Server Technology Discussions


9Pardhu

Recommended Posts

[quote name='Kaarthikeya' timestamp='1356542595' post='1303015960']

SSAS lo MDX queries raasava eppudaina? or else just tool use chesava?
[/quote]
yeah rasina queries kuda ..

Link to comment
Share on other sites

[quote name='JUJUBI_JULABI' timestamp='1356618883' post='1303020237']
yeah rasina queries kuda ..
[/quote]
aa experiences koddiga share chesukovachu kadaa..naa lanti freshers ki upayogapadutundi s%H#

Link to comment
Share on other sites

[quote name='DARLING...' timestamp='1356624408' post='1303020598']
hey monna 2012 sql server installatio procedure post esaaru kada adi ey page lo undi konchem link eyyara plz
[/quote]
search lo kanipisthaledu :o

Link to comment
Share on other sites

SQL Server 2012 Download Link [url="http://www.microsoft.com/sqlserver/en/us/get-sql-server/try-it.aspx"]http://www.microsoft.com/sqlserver/en/us/get-sql-server/try-it.aspx[/url]

Link to comment
Share on other sites

[quote name='DARLING...' timestamp='1356625267' post='1303020672']
ey nuvvu deals to by aah
[/quote]
[color=#282828][font=helvetica, arial, sans-serif][img]http://lh3.ggpht.com/--o7mXz3u-j4/T9VVBGzBJAI/AAAAAAAAGo0/kmj8a1-XW2g/s150/PK-1.gif[/img][/font][/color]

Link to comment
Share on other sites

[b] Introduction to Rollup Clause[/b]

ROLLUP clause is used to do aggregate operation on multiple levels in hierarchy. Let us understand how it works by using an example.

Consider a table with the following structure and data:

[CODE]
CREATE TABLE tblPopulation (
Country VARCHAR(100),
[State] VARCHAR(100),
City VARCHAR(100),
[Population (in Millions)] INT
)
GO
INSERT INTO tblPopulation VALUES('India', 'Delhi','East Delhi',9 )
INSERT INTO tblPopulation VALUES('India', 'Delhi','South Delhi',8 )
INSERT INTO tblPopulation VALUES('India', 'Delhi','North Delhi',5.5)
INSERT INTO tblPopulation VALUES('India', 'Delhi','West Delhi',7.5)
INSERT INTO tblPopulation VALUES('India', 'Karnataka','Bangalore',9.5)
INSERT INTO tblPopulation VALUES('India', 'Karnataka','Belur',2.5)
INSERT INTO tblPopulation VALUES('India', 'Karnataka','Manipal',1.5)
INSERT INTO tblPopulation VALUES('India', 'Maharastra','Mumbai',30)
INSERT INTO tblPopulation VALUES('India', 'Maharastra','Pune',20)
INSERT INTO tblPopulation VALUES('India', 'Maharastra','Nagpur',11 )
INSERT INTO tblPopulation VALUES('India', 'Maharastra','Nashik',6.5)
GO
[/CODE]

[img]http://www.pinaldave.com/bimg/rollup1.jpg[/img]

Now, we need to create a report on population at 3 levels: City, State and Country.

Can we do it by using SUM with GROUP BY clause?

Yes, we can, but we will have to write a separate query to GROUP BY at each level and then union the result of all queries; even after this, the proper ordering or the result would still need more work.

However, SQL Server provides a very easy solution. Just add the WITH ROLLUP clause in GROUP BY and you get the desired results.

[CODE]
-- For SQL Server 2005
SELECT Country,[State],City,
SUM ([Population (in Millions)]) AS [Population (in Millions)]
FROM tblPopulation
GROUP BY Country,[State],City WITH ROLLUP

-- For SQL Server 2008
SELECT Country,[State],City,
SUM ([Population (in Millions)]) AS [Population (in Millions)]
FROM tblPopulation
GROUP BY ROLLUP (Country,[State],City)
[/CODE]


[img]http://www.pinaldave.com/bimg/rollup2.jpg[/img]

Link to comment
Share on other sites

hello all...

mee real time experiences share chesukondi pls...i mean real time lo as a dba what we need to check on daily basis and how the routine work will be...prathi roju meeru chese tasks endi as a dba..pls cheppandi...dba ga job chestunna nenu...gatha 6 months nundi..pls help...

Link to comment
Share on other sites

[quote name='buffaloboy' timestamp='1356646979' post='1303023290']
hello all...

mee real time experiences share chesukondi pls...i mean real time lo as a dba what we need to check on daily basis and how the routine work will be...prathi roju meeru chese tasks endi as a dba..pls cheppandi...[size=6]dba ga job chestunna nenu[/size]...gatha 6 months nundi..pls help...
[/quote]

sorry printing mistake..
dba ga job try chestunna

Link to comment
Share on other sites

mastaaruus... evaraina external sources(files like flat, excel, xml) files nundi oracle ki data load chesara through SSIS..

nen trying to load xml file into oracle db thr SSIS...


matter entante oka execute sql task and daani kinda oka DFT ....n nxt vere konni unnai...

execute sql task fail avutundhiiii....
n danni disable chesthe DFT lo anta baane nadustundhii..


aa execute sql task lo oka query undhii n andi oka condition satisfy chesukoni nxt step ki potundhiii....

Result set:: SINGLE ROW

Sql Stmt:::
select count(*) as found from tbl1 where column = ?

Parameter Mapping::: variable1

result set::: found--- varfound

ee execute sql task ki DFT ki madhyalo exprssion varfound > 0


so adi >0 avuthene nxt step ki pothadi.....

but adi fail avutundhii...
n error iz:::

An error occurred while assigning a value to variable "The type of the value being assigned to
variable differs from the current variable type. Variables may not change type during
execution. Variable types are strict, except for variables of type Object.

Link to comment
Share on other sites

[quote name='mtkr' timestamp='1356649792' post='1303023557']
mastaaruus... evaraina external sources(files like flat, excel, xml) files nundi oracle ki data load chesara through SSIS..

nen trying to load xml file into oracle db thr SSIS...


matter entante oka execute sql task and daani kinda oka DFT ....n nxt vere konni unnai...

execute sql task fail avutundhiiii....
n danni disable chesthe DFT lo anta baane nadustundhii..


aa execute sql task lo oka query undhii n andi oka condition satisfy chesukoni nxt step ki potundhiii....

Result set:: SINGLE ROW

Sql Stmt:::
select count(*) as found from tbl1 where column = ?

Parameter Mapping::: variable1

result set::: found--- varfound

ee execute sql task ki DFT ki madhyalo exprssion varfound > 0


so adi >0 avuthene nxt step ki pothadi.....

but adi fail avutundhii...
n error iz:::

An error occurred while assigning a value to variable "The type of the value being assigned to
variable differs from the current variable type. Variables may not change type during
execution. Variable types are strict, except for variables of type Object.
[/quote]

data type emi assign chesavu ba variable ki

Link to comment
Share on other sites

×
×
  • Create New...