|
I'd disagree with the nvarchar(max), I would only ever use nvarchar if it was a requirement to store unicode and I would place a size limit on the address, make it large but don't use max unless you are intending to use it which an address will never do.
If some pillock has a couple of thousand characters in his address then truncate the idiot, not the data, the pillock!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I would never do the PrimaryAddKey flag on the Account table, I don't even care about the performance difference (unless you have mega addresses it would be minuscule) it introduces a vulnerability into your schema and is therefore wrong.
I would however create an Account view that included the primary address but then I'm a great beleiver in views
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I actually raised this question because I'm at odds with the design. Thanks for the sanity check
|
|
|
|
|
As others have said, I'd leave the primary indicator in the address table, not the account table.
Conceivably, the primary address for an account could change, in which case the address table is updated. The account hasn't changed - the primary address has.
Again, as others have noted, create an acount view that includes the primary address.
To that extent, create an account view that shows all addresses and denotes which one is primary.
Tim
|
|
|
|
|
Using an account view is a good idea. Thank you!
|
|
|
|
|
can i access the oracle(scott user) entire table in sql server2012 ? already i tried with SSMA but i got a error i.e, oracle not connecting and shows the sometimes "no listener",objest is not found.? how can i fix it., any one plz help me.
|
|
|
|
|
Please, see this: Oracle Provider for OLE DB[^] to create a linked server to access an Oracle database instance.
I hope it will be helpful.
|
|
|
|
|
Hi i have this function Val(Right([ContractNo],6) and its in Access format how do i change it to SQL Server
Thanx
|
|
|
|
|
try
substring(ContractNo,len(ContractNo)-5,6)
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
Great, don't forget to upvote posts that help you
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
As Val only returns numbers until the first non number is found, there is no out of the box solution
I would have a read of this
Get only the number from a string, T-SQL???[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Why?
What kind of data are there?
|
|
|
|
|
Assuming in network LAN have got 2 computer : Computer A and Computer B, Computer A installed mySQL and have got IP:192.168.1.100 and port: 2050, Computer B installed SQL Server 2005, form machine B can connection (or link table) to machine A have mySQL ? Is EveryOne this guide can share me with. thank
|
|
|
|
|
You might be able to use OPENROWSET, at least it is a avenue of research!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Well I'll be dammed, thinking about it you can do a linked server to Oracle so it should be logical that the MySQL has been solved as well. Have 5.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In a LAN with multiple computers, a few machines installed MySQL you can use the command line in cmd.exe (or any software) to know how many LAN computers are not installed MySQL ? for example in SQL Server have command line: osql -L
|
|
|
|
|
I’ve tried writing queries but they just don’t work. I tried joining tables, selecting the tables more than once and renaming it using AS.
I’d like to know if my desired output is really possible with mere using access sql ?? I need the query to set in my datatable for the gridview control. I am thinking of creating multiple datatable and assign them to one gridview instead of writing this complex query. But if there is a sql solution for this, I will stick to sql. Please share your ideas. Thank you.
I’ve been stuck with this problem, it’s like I’m trying to turn my rows into column. Here are my tables and the desired output.
Database tables:
TableDATA
ID GB FREE% FS_DATE
1 0.58 43% 8/19/13 1:00 AM
2 2.42 52% 8/19/13 1:00 AM
3 4.93 2% 8/19/13 1:00 AM
4 5.12 75% 8/19/13 1:00 AM
5 0.50 1% 8/19/13 1:00 AM
6 0.582 430% 8/19/13 2:00 AM
7 2.422 520% 8/19/13 2:00 AM
8 4.932 200% 8/19/13 2:00 AM
9 5.122 750% 8/19/13 2:00 AM
10 0.522 100% 8/19/13 2:00 AM
TableFS
ID FS MountPT FS_DATE SERVER_ID
1 /dev/1 a 8/19/13 1:00 AM HP-UX
2 /dev/2 b 8/19/13 1:00 AM HP-UX
3 /dev/3 c 8/19/13 1:00 AM HP-UX
4 /dev/4 d 8/19/13 1:00 AM HP-UX
5 /dev/5 e 8/19/13 1:00 AM HP-UX
6 /dev/1 a 8/19/13 2:00 AM HP-UX
7 /dev/2 b 8/19/13 2:00 AM HP-UX
8 /dev/3 c 8/19/13 2:00 AM HP-UX
9 /dev/4 d 8/19/13 2:00 AM HP-UX
10 /dev/5 e 8/19/13 2:00 AM HP-UX
Required Output:
(8/19/13 1:00) (8/19/13 2:00) (8/19/13 3:00 and so on.....)
FS MountPT GB FREE% GB FREE%
/dev/1 a 0.58 43% 0.582 430%
/dev/2 b 2.42 52% 2.422 520%
/dev/3 c 4.93 2% 4.932 200%
/dev/4 d 5.12 75% 5.122 750%
/dev/5 e 0.50 1% 0.522 100%
modified 18-Aug-13 16:27pm.
|
|
|
|
|
This article [^]may help, it is designed to work with SQL Server, I don't know if it will work with Access.
It requires 2 nested queries, fist prepare your data so you have exactly what is required (join the table) and get the column names to pivot on (Date/Times). This pivot the data on the date/time column.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi...
What the advantages are of object oriented programming over Procedural coding? Thank you...
|
|
|
|
|
You could easily discover papers on the subject through a Google search. Also, this forum is for questions about using Database software.
Use the best guess
|
|
|
|
|
Wrong forum. And it's it's a situational thing; use the right tool for the right job.
|
|
|
|
|
candz_kritz wrote: What the advantages are of object oriented programming over Procedural coding? The most obvious one to me is readability; in the procedural days I was often passing a structure to each procedure as a param (to avoid using a global var, which is even uglier) - now it's nicely embedded in the object as a private field.
There's more advantages which improve life, like inheritance. If it's homework, I'd recommend the Wikipedia; it'll be more complete in it's definitions.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Procedural coding is about procedures/functions. We write procedures which just take an input and produce an output. They don't have any kind of relation with another procedure. Sometimes they are just able to use some global or shared data when required.
OOP is all about objects. We do write procedures/functions in OOP, but the main thing is the class. A class has a relation; it can be a parent or base class, it can be a child class. And then we do things on the objects created by those classes. As classes have relation so we can say that the the objects of those classes do have the relations also.
For deeper understanding, you should check for articles online. Just google
|
|
|
|