|
And another thing...
You should define the column list in the SELECT statement for a number of reasons.
Performance - Defining the list up front means SQL Server doesn't have to work it out.
Reliability - Defining the list up front gives your stored procedure a consistent interface to the outside world. If you add or rearrange columns the stored procedure's output will remain the same - which means that the application using it will continue to work. If the changes are breaking changes then the point it breaks will be in the stored procedure which is closer to the change than anywhere else. This means it should be easy to find the dependencies and fix the remaining code.
|
|
|
|
|
|
Hi all,
I am having a stored procedure which requests 2 parameres for the where statement. i wanna fill a dataset from this stored procedure and then create a crystal report from that.
dataset fill happenes when user clicks
please help me and tell me a way to do thid.
Regards
Ruwandi
rkherath
|
|
|
|
|
Design A report(suppose its ID is myReport)
after populating your dataset(say myDataset) try this code.....
[take a CrystalReportViewer Control(say it's ID is myViewer)]<br />
Dim oRpt As New myReport<br />
oRpt.SetDataSource(myDataset)<br />
myViewer.ReportSource = oRpt
Tirtha
Miles to go before I sleep
|
|
|
|
|
Hi,
Thanks. but i wanna keep a certain format in the report . can i do that with this.
eg:
if dataset fills like
group groupNum Code balance
A 1 a1 10
A 1 b1 15
B 2 a2 20
B 2 b2 25
C 3 a3 30
C 3 b3 12
but i need report to display
code balance
a1 10
b1 15
A 1 25
a2 20
b2 25
B 2 45
a3 30
b3 12
C 3 42
total 112
i hope you can understand
Regards
ruwandi
regards
ruwandi
rkherath
|
|
|
|
|
You can Group your data on your "group" field....and for the addition of balance amount you can use a Simple Formula in Crystal report....
Tirtha
Miles to go before I sleep
|
|
|
|
|
thx but how about displaying group number infront of the gruop
regards
Ruwandi
rkherath
|
|
|
|
|
|
Concatenate the array values into a string with some Separator or Delimiter(e.g comma,apostrophe,tilde etc.) and insert in table as Text....
Tirtha
Miles to go before I sleep
|
|
|
|
|
the array is in vb.net ????
if yes : so u can place it in a datatable
and then insert it in table of the data base
|
|
|
|
|
Please will someone advise me on a resource that nicely explains security using Management Studio. I need to grant a permission to the database owner, but dbo isn't a real user, so how can I grant the permission? The user is linked to login 'sa'.
|
|
|
|
|
Brady Kelly wrote: The user is linked to login 'sa'.
If the user is "sa" surely they have permission to do anything?
|
|
|
|
|
The term 'surely' is the most innaproprate term I have ever come across for describing anything related to this area of SQL Server security.
|
|
|
|
|
Okay - "sa" has permission to do anything it likes.
|
|
|
|
|
Except create unsafe assemblies. I had to log in under my Windows account and grant that user the unsafe assembly permission.
|
|
|
|
|
Ah... I'm still going on my knowledge of SQL Server 2000. My bad.
|
|
|
|
|
Hi
I have a table with datetime field and a stored procedure which should update this table on the date n time specified. This should take place automaticaly at the specified date and time.
Kindly suggest any solutions to this query.
Thanking you in anticipation.
Regards
Siddhi
|
|
|
|
|
Helllo All,
I want to keep my database secure by backened. Actually i donot want to let anybody to make any modification in my database(Sql Server2000) through Enterprises Manager and also only the authorised users can have accesss to the database through frontened(ASP.NET)
Plz.......................
..........................
|
|
|
|
|
The Knowledge wrote: Actually i donot want to let anybody to make any modification in my database(Sql Server2000) through Enterprises Manager
Not gonna happen.
Enterprise manager can connect to the database using any account that has been set up. (Typically it will connect as sa [the sys admin]). If you have any kind of access to the database from an application, Enterprise Manager will be able to connect using the same credentials.
|
|
|
|
|
I'm busy musing over the best way to deploy a CLR stored procedure. Where do I put it before pulling the assembly into the database? Do I use a normal setup routine to an install folder and then invoke my deployment scripts using the code-base in that folder?
|
|
|
|
|
|
Hi,
I have 2 tables ,say A and B.
A: (ID Col1 Col2)
B: (ID Col3)
ID-Unique Column.
I want to move col2 from A to B.
Hence I have added a new column in table B, say col4.
I want an update statement that will transfer A.col2 to B.Col4.
<div class="ForumSig">Regards,
Arun Kumar.A</div>
|
|
|
|
|
Update B <br />
Set Col4 = A.COL2<br />
FROM B<br />
Inner Join A on A.ID = B.ID
Or
UPDATE B<br />
SET COL4 = (Select COL2 From A Where A.ID = B.ID)
Wout Louwers
|
|
|
|
|
It is working.
Thank U very much.
Regards,
Arun Kumar.A
|
|
|
|
|
hi all,
I am not well versed with queries in SQL.
i have a table , product as following
productID productname CategoryID
1 xxx NULL
2 yyy 1
3 zzz NULL
and in the categories table
categoryID categoryname
1 Cat01
2 Cat02
i need to combine these two tables and get the following
productID productname categoryname
1 xxx NULL
2 yyy Cat01
3 zzz NULL
i wrote this query
select c.categoryname,p.productid as pid,p.productname
from product p,categories c
where p.categoryid = c.categoryid
or p.categoryid<>c.categoryid
and this is the result i get
productID productname categoryname
1 xxx Cat01
1 xxx Cat02
2 yyy Cat01
3 zzz Cat01
3 zzz Cat02
Can anyone help me with this query?
Thanks in advance
Regards
Anuradha
|
|
|
|