1,079 reputation
31740
bio website
location Sydney, Australia
age
visits member for 2 years, 2 months
seen Oct 2 at 1:22

Sep
18
comment Creating table with foreign key and index using sqlcmd.exe and batch file
Thanks for your comment. When I wanted to add the actual scripts, I noticed the Index and Foreign keys in the script 002, are referring to another table created later in the batch file. By setting the appropriate order in running them, the issue is resolved.
Dec
12
comment Move values from one table to another one via stored procedure in sql server 2008
I think the best way is using the trigger as described below by Kin, otherwise even if you implement a stored proc, how do you want to call it? Trigger is the best option for this.
Dec
11
comment Uniqueidentifier vs. IDENTITY vs. Material Code --which is the best choice for primary key?
I agree with Joel. Sometimes the natural keys are subject to change or duplication. In these cases, obviously they are not good candidate for primary keys.
Dec
9
comment OpenRowSet - How to configure OLE DB Provider to be used for for distributed queries
I installed it from the link above, reopen the SQL management studio but still this provider is not listed there. Is there anything else should be done to add it to the provider list?
Dec
9
comment OpenRowSet - How to configure OLE DB Provider to be used for for distributed queries
Thanks for your time. I think the reason it's not working for me, is because I don't have 'Microsoft.Ace.OLEDB.12.0' among the providers as you specified in your answer. Could you please advise me how to add it? I've edited my question to include the provider lists I've got currently.
Nov
27
comment Finding rows where a column contains [ and ] characters
Thanks. I used the second option and it worked well.
Nov
25
comment Using OLE DB Source SQL command vs desinging the query using the object tools
Such an insightful answer! I totally agree.
May
17
comment How to add rows/columns to the table in runtime in SSRS 2008
That's what I expected too but the current issue is when there are multiple courses, the original record gets repeated per course. Which is not what we need. Only the Course rows should be added, not the whole student record. I have a row group on StudentId, but it does not help.
May
12
comment Data dictionary best practices in SQL Server 2008 r2
The post you referred me to(above) was a good starting point.Thanks for that.
May
1
comment Image fades on the SSRS report
Thanks Jon. Saving it as png file fixed the issue.
Feb
26
comment Choosing the right algorithm in HashBytes function
@Paul: That's exactly right. Thanks for your further clarification.
Feb
26
comment Choosing the right algorithm in HashBytes function
Good, that's the way we'll try then. We can improve the performance also ensuring the data correctness (what we needed). Many thanks for your generous time and input.
Feb
26
comment Choosing the right algorithm in HashBytes function
Well, I was hoping not to have collision on SHA1 (for example based on this link: en.wikipedia.org/wiki/SHA-1 en.wikipedia.org ). However now that we can not rely on that, it means we can't use any hash value comparison.
Feb
25
comment Choosing the right algorithm in HashBytes function
Thanks Jon. The requirements tolerates no collision. So I think SHA1 is a safer option. We thought about defining index, but it's not possible. Because the columns used for joining are of Nvarchar(max). Even if the size was defined(e.g.: Nvarchar(4000), I don't think defining index on such a long column was not acceptable by SQL Server. I would double check though.
Feb
24
comment Choosing the right algorithm in HashBytes function
We need to join two tables on two nvarchar(max) columns. As you can imagine the query takes along time to execute. We thought it would be better to keep the hashsum value of each nvarchar(max) data and do the join on the hash values rather than the nvarchar(max) values which are blobs. The question is which hash algorithm provides the uniqueness, so that we don't run into the risk of having one hash value for more than one nvarchar(max).
Feb
20
comment How to set the timeoffset in a Datetimeoffset column without changing the date part
Well, I totally agree and understand your point to do it in presentation, but it is a requirement for our scenario, so I should do it in database.
Feb
13
comment Can we minimise the risk of using xp_cmdshell?
I see your point Aaron. You're right.
Feb
12
comment Can we minimise the risk of using xp_cmdshell?
Thanks. It seems what I was looking for. Could you please shed some light on how to do that? Do you mean I should enable xp_cmdshell in the stored proc where it's been called before using and then disable it right after the calling statement (when I'm done with that)?
Feb
12
comment Restore the latest backup on the database
Thanks for your comprehensive reply. I have access to the original server, can it make a difference? I was hoping to be able to do that without having to add a temp table.
Jan
25
comment SQL Server Database Synchronization
Well said Darin! That's it :)