Newbe To SPs
Jan 19, 2004Ey,
I need to do few operations on every record in a table. Do I have to use cursor? Do SQL has something like 'FOR' or 'WHILE'? I've read somewere that cursors should be avoided due to their time consumption.
Thnx
Ey,
I need to do few operations on every record in a table. Do I have to use cursor? Do SQL has something like 'FOR' or 'WHILE'? I've read somewere that cursors should be avoided due to their time consumption.
Thnx
Hi.
I will try to abstract my problem to an example, simple as possible.
In a relational database exists 2 tables: Cars (containing car name and car id) and Costs (containing costs caused by cars - with columns like cost_id, car_id (fk to table cars), cost_category (something like 'buy', 'cleaning', 'maintenance'), cost_date and costs)
In the olap cube I've 2 dimensions: Cars and Costs and a measure sum(cost).
How can I create a measure containing the max value of the sum(costs) group by car_id?
In the SQL world it would be something like
Code SnippetSELECT
MAX(COSTS_PER_CAR)
FROM
(
SELECT
CAR_ID,
SUM(COSTS) AS COSTS_PER_CAR
FROM
tblCOSTS
GROUP BY CAR_ID
) AS TBL
But how can I realize it in MDX for using it as measure?
Thanks in advance.
Greetings.
Anatoli Rejditsch.
HELP!!having on trouble installing, just gettting everything connected.(xp sp2)First i loaded MSDE, then realized i needed the web admin tool to create the db...but can't get the web admin tool to connnect to anything..so I took a stab at SQL 2005 Std ed beta.....loaded fine, but then realized i need another admin tool to create db so I loaded the xpress manager...again, loads fine, but doesnt'connec to any DB..why is this so difficult for me.....SQL Svr v6 was so much easier with enterprise manager!!!HELP!!Don
View 1 Replies View RelatedHi, I'm developing a page in asp.net using a sqldb and one of the values I'm sending to the database is a date/time value. I only want the table to show the date in short format, no time. Is there a way to restrict or convert the data in the table design mode?
Thanks
Raif
Hi ppl
I just started with all this 'replication' subject and run into some 'stange ?' problem. I suscesfully set-up publisher and distributor on one computer. create subscriber on another. And seems that this is working with no errors as I see in Replication monitor, details. All agent turned to verbose output and showing no errors at all. but the strange problem that the database does not (!) appear at subscriber (?????) I mean - no tables, no stored procedures, no nothing - how it can be possible ? What I'm doing wrong ? Or what I should do ?
P.S. Forgot to add: Both servers running latest SQL server 2005 with latest Service Pack. Subscribtion of type 'push'
Hey All,
This is really simple basic question, and it's just so I can start to learn about MVS.
I have a sql-database called "Test" with a Table called "Agents" with just three colulms "ID", "FNAME" and "LNAME".
On the Default Page I have three Textboxes and a submit Button,
All I want to do is type "Select" criteria in Textbox1 and have Textbox2 Display the "Fname" and Textbox3 Display the "Lname".
(Using VB in ASPX)
Dim i As New SqlDataSource()
i.ConnectionString = ConfigurationManager.ConnectionStrings("Test").ToString()
i.SelectCommandType = SqlDataSourceCommandType.Text
i.SelectCommand = ((((((Now What???)))))))
End Sub
PLease Help, Thanks in advance
A....
Could someone please point me in the right direction on how to read ina large query with .net.I am trying to emulate a legacy database system so I don't know theupper bounds of the sql query. An example query would be somethinglike:Select * from invoices where year 1995the query must be updatable and only return say 10 to 100 rows at atime.It should also be forward only and discard rows no longer in use tosave memory.And if at all possible I would like to lock one row at a time as therow is read in.
View 5 Replies View RelatedHi!I have a scalar function that returns integer:xview (int)Now, I'm trying to build a procedure that has the following selectinside:select atr1, xview(atr2)from tablenameBut, I get the 'Invalid name' error when I try to execute thatprocedure.If I got it right, I must use user.fn_name() syntax, but I cannot usedbo.xview() inside my procedure since it means xview will always beexecuted as dbo, which is unaccaptable.I'm a bit confused, so any hint is very welcomed.Thanks!Mario.
View 4 Replies View RelatedHello, I need some help, I am in school right now and I am in a SQL server class. We have been working in the query analizer making a database. Well I have to print out everything that I have typed. But I want to view it first. How do I do that?
Sorry I did a search and couldnt find anything.. Probably cause I dont really know what to search for or look under. Thanks for your guys time.
~Matt