SQL Server is a relational database management system from Microsoft. Use this tag for all SQL Server editions including Compact, Express, Azure, FastTrack and PDW.
0
votes
1answer
13 views
Convert multiple columns (year,month,day) to a date
I've got a few columns that I'm trying to convert to one, but I'm having some issues here.
The problem is that the Month or day can be single digit, and I keep losing that 0.
I'm trying it on a view ...
3
votes
3answers
37 views
Efficient Update of Table from One SQL Server to Another, Same Table Structure
I have one database server, acting as the main SQL Server, containing a Table to hold all data. Other database servers come in and out (different instances of SQL Server). When they come online, ...
0
votes
0answers
23 views
SQL Query with duplication and editing
I am new to SQL and have a question that I have not been able to find the answer to yet, probably because I am not sure exactly what to search for. I am using SQL Server 2012. I have a DB that was ...
0
votes
2answers
63 views
Beginner with triggers
Im a beginner in database and i got this difficult auction database project.
Im using SQL Server Management Studio also.
create table user(
name char(10) not null,
lastname char(10) not null
)
...
0
votes
2answers
15 views
Insert into with Select and Sum
So I am trying to Insert Into one Table from a Select Query of another table. I figured I had to do it this way because I am trying to SUM several columns within the Insert. Ultimately I want this ...
0
votes
0answers
18 views
SQL Server 2008 R2 view assistance
I have several views and tables which I am trying to connect in one view to create a website GUI for several users (and myself) to use. It is basically an inventory system which is linking together ...
0
votes
0answers
15 views
Query to determine Task Concurrency
I have a table that lists every task run through our application. It logs a StartTimeDate and an EndTimeDate. I would like to see what tasks are running concurrently to help better our performance. I ...
1
vote
2answers
16 views
can a multi column fk reference multiple tables?
I have 3 tables
part, build, & buildpart
buildpart is m:m.
I was wondering if i could include the two columns of buildpart that are referencing part & build respectively in a single fk & ...
-4
votes
0answers
18 views
Oracle certification vs SQL Server [closed]
Having an MCSA: Sql Server 2012 or an Oracle 11g: OCA (developer not DBA), which one is more marketable? Is there more opportunities in SQL server than Oracle in United states?
Thanks for your ...
0
votes
1answer
26 views
Multiple MS SQL queries on one table
So I need some help, I have a MS Access database. I have a table that I run about 4 queries on. It takes about 5 min to open or save query 4 because it runs against 3, 2, and 1. Even though it is ...
0
votes
0answers
22 views
Why is index scan used instead of index seek?
I created unique, clustered indices on two large tables that I have to join, but those indices are not used as evidenced by the query plan. When I force the use of those indices with a hint, an index ...
0
votes
3answers
34 views
Display database result as XML
I have a simple SQL query, i want to query the database and return the result as XML. I used the key word for XML, but it says that XML is not a valid syntax.
HELP
using (SqlConnection c= new ...
0
votes
1answer
27 views
Backup very large table in SQL Server
everyone.
I'm deeply sorry if this is an amateurish question, but I have to update certain values of a large table (for the sake of a presumed example, it is called 'Resource' and it is over 5M rows) ...
0
votes
1answer
7 views
Difference between MIN(__$start_lsn) and fn_cdc_get_min_lsn?
Using CDC on SQL Server 2012.
I have a table (MyTable) which is CDC enabled. I thought the following two queries would always return the same value:
SELECT MIN(__$start_lsn) FROM ...
0
votes
0answers
22 views
Bulk insert CSV error
I am trying to import a .csv file into SQL SERVER using BULK Import. I am facing weird problem when I am importing it initially it is not considering any line feed or any ROW Terminator which causes ...