1,450 reputation
722
bio website
location Austin, TX
age 33
visits member for 3 years, 5 months
seen yesterday

Oct
21
comment Importing CSV file using SQL Server Import and Export Wizard (SQL Server Express)
Are external scripts an option? I've found the SQL Import/Export wizard to be a colossal pain, but one can whip up a simple C# app to read from a file and write to a table in a couple hours. I'm sure other languages are just as easy.
Oct
19
awarded  Notable Question
Oct
8
revised Writing select result to a csv file
Added some clarification about the bcp command line arguments.
Oct
8
suggested suggested edit on Writing select result to a csv file
Oct
6
comment Should these two indexes suggested by the SSMS missing index feature be combined?
What indices exist right now? Assuming the execution plan is too complex to share, what are the most expensive steps?
Oct
1
comment I have this two models, which one is better?
Casting it once to save it to the database is normal. Presumably you'll be reading your data multiple times, however, so it would be helpful to not have to CAST again every time you do so. 50 sparse columns is a lot, but NULLs take up very little space; MS SQL offers the SPARSE flag which reduces it to zero (stackoverflow.com/questions/1398453/…); what's your RDBMS?
Oct
1
answered I have this two models, which one is better?
Oct
1
comment I have this two models, which one is better?
In the first model, you're storing an opaque binary and using an auxiliary table to interpret it correctly, while in the second model you're storing the value once in the correct column while leaving the other formatted columns empty. Is that right?
Oct
1
answered Slow querys on billions-rows-table // index used
Oct
1
comment split string for calculations
This is covered on StackOverflow: stackoverflow.com/questions/2647/…
Sep
29
comment insert row if table is empty, else update row (mysql)
Similar, may be helpful: stackoverflow.com/questions/15476851/…
Sep
29
comment insert row if table is empty, else update row (mysql)
"Unable to get it working" is a little vague. Are you getting a syntax error? A run time error? Is it running, but always following the first branch of your logic, or always the second? Offhand, I don't believe MySQL recognizes table is empty.
Sep
24
comment Change table scan in query plan to seek
Certainly. I hope that's not what's happening when you use IN; disallowing index use when a filter is expressed this way seems like a poor choice, especially if you can't use index hints! If that's the case, you may have to fall back on the UNIONs idea (but I'd try the high-cardinality index first).
Sep
24
comment Change table scan in query plan to seek
You do have broad indices, but not in the right order. Putting your most selective fields first can make an enormous difference in an index's effectiveness.
Sep
23
answered Change table scan in query plan to seek
Sep
22
asked How do I grant the privilege of connecting to SSIS?
Sep
22
answered How do I grant the privilege of connecting to SSIS?
Sep
15
comment “Transitive” keys
@bob.sacamento: if you're not comfortable reading and writing DDL, that's a strong reason to stick to the simpler solution A. It's a perfectly good and common setup.
Sep
15
revised “Transitive” keys
Added a schema to illustrate the OP's dilemma (if I understand it right)
Sep
15
comment “Transitive” keys
I took the liberty of creating simple DDL scripts for your two scenarios; if I've misunderstood anything, please correct me. I see two issues: the first model is simpler, which is worth a lot. Second, the second model involves a two-barrelled foreign key from the C table to the B table. Offhand, I don't know which RDMSs support such an FK. Of course you could have a single-column field to physically back up what is conceptually a two-column join, but if you end up doing that, what have you gained?