Home > MS SQL Development
MS SQL Development
MS SQL Development forum discussing administration, MS SQL queries, and other MS SQL-related topics. SQL Server is Microsoft's enterprise database engine.
UPDATETEXT and Table data type?
Hi,
Can anyone tell me whether UPDATETEXT works with the table data type? I've got this line of code :
UPDATETEXT @TEMPTABLE.TEXTFIELD @PTRVAL @POS 1 'AHAHAHAHAH'
but I get the error :
Incorrect syntax near '@TEMPTABLE'
It wo...
answer(1) view(184) status(

)
update year in date field
I have an Access database where I am trying to update just the Year of a field that is Date/Time type (DATEFIELD) but keep balance of date (its a Y2K repair).
I have tried :
Update TABLENAME
Set Year(DATEFIELD)=2003
WHERE Year([DATEFIE...
answer(2) view(157) status(

)
SQL Query Help
tblAssignments
***_id
***_user_id
***_cty_id
***_crd_start
***_crd_end (Ending Number)
tblCards
crd_id
crd_cty_id
...
answer(5) view(330) status(

)
SQL Select stmt in MS Access
Hello, New to SQL / Access interface so please bear with me...
I have a small (not normalized) table which has two important fields.
Table: tblTest
Field1: Company
Field2: Location
I am trying to allow a user to choose from ...
answer(1) view(350) status(

)
normalised design causing problems displaying results
Hi
I s'pose this is more of a database design query.
I have a database holding information about properties, along with what features these houses have, eg. number of bedrooms, type of property (eg. detatched, terraced), garden, etc. ...
answer(14) view(411) status(

)
Question about Duplicate Records
Hey -
Can someone help me?
Basically i have a table with 37,000 records. Each record has the person reponsible name. Each name is used more than once. Whenever I preform the following SQL Query:
SELECT YKPC_EXT_Orders.ACCOUNTANT, YKPC...
answer(1) view(442) status(

)
tables one to many only getting one to one
SQL Version 3.23
2 tables members and games
query:
PHP Code:
$sql = "INSERT INTO wintera SELECT
games.membershipSeq,members.sortFlag,members.membershipID,
members.firstN...
answer(1) view(451) status(

)
Merging tables
Hi there, sorry new to mysql and have a question.
I have to tables both with the same column names and structure that i want to merge into one.
Table A has some infomation that is the same in Table B.
How do i merge Table B into Ta...
answer(11) view(35) status(

)
assigning values by select within a procedure
I am a little rough with sql. I cannot remember how to assign a value that is returned from a select
Here ithe line of code that doesn't work
Code:
Set @nextID = Select (currentNumber + 1) From IDGenerator Where tableNa...
answer(16) view(944) status(

)
is it ok to call raise errors in this way
I am jsut wondering whether it is considered acceptable that after an error catch to contunue on without nesting it in a if / else. Here is an example
//do something
if @@error <> 0
raiserror('some error messsage',16,1)
/...
answer(3) view(864) status(

)
Indexed View
I have an ASP accessing an Indexed View within SQL 2000, the SET options are all as they should be set yet on the front end message comes up saying :
Incorrect setting for SET options : ARITHABORT
can anyone help ??
thanks
answer(0) view(369) status(

)
alternate records
I am really new at this. I have basic results working. What I want to do is alternate every other record with a new CSS Style so it's easier to read. Not sure how to do this so anything would be helpful. I want to use the class ' stats...
answer(2) view(431) status(

)
answer(1) view(991) status(

)
SQL Connectivity- has MS bodged it up?
Hi, I've recently started having a problem with a large(ish) SQL database I run. It's been running fine up to now - albeit a bit slow, but never-the-less fine. I've been doing some optimisation on it, as one of the tables has around 3 milli...
answer(1) view(522) status(

)
Delete Question
Hi everybody,
I want to delete records from one table that meet certain criteria from more than one table.
Something like
Delete
from table_1
where field.table_1 =....
and field.table_2 = ....
I'm afraid to have "from ...
answer(1) view(191) status(

)
Searching Fields
How do I search a particular field for a given string?
For instance if I have a productDescription field, that contains a 30 word description of a particular Car for example, how would I search for the word RED or AIR CONDITIONING etc?
...
answer(3) view(728) status(

)
Importing data from access -> SQL2k
Does anybody know if there is a way to import just the data from Access to SQL2k without having it recreate the table structure?
The problem I run into is I have a working table structure all ready setup and just want to import the data....
answer(2) view(520) status(

)
Problem with Access Linked Table
Hi,
I have an Access 2000 table linking to a SQL Server table. When I open the table in Access, the column names are correct, but all the values = "#deleted". The data is find when I open it with my SQL client. I've tried refre...
answer(4) view(249) status(

)
Restore Database Date
In my environment we restore production copies of the database over existing dev databases to simulate prod environment. I would like to check the last restore date before I do that just in case someone else did 5 minutes ago. I was under...
answer(2) view(1,005) status(

)
Files to be stored in DB, how?? (MS SQL)
Hi there,
I am working on an application with which I want to upload files (word docs, PDFs etc.) to a MS SQL database from a website form (Browse button etc.).
Unfortunately, I have no clue where to start. Could anyone point me into th...
answer(6) view(530) status(

)
msde
I am thinking about using msde for my website, Can someone tell me if MSDE is a good choice, secondly if 50 users hit the web site at the sametime you think MSDE will be able to handle it?
Also is this true that MSDE does not have foreig...
answer(1) view(820) status(

)
IDENTITY on 2 PRIMARY KEY's
I have a MS SQL problem. I used to do this (AUTO_INCREMENT on 2 primary key) in MY SQL and it works,
Example:
CREATE TABLE blah (
col1 INT AUTO_INCREMENT,
col2 INT,
PRIMARY KEY (col2, col1)
)
So, when i do the following quer...
answer(4) view(750) status(

)
getting @@Identity from recordset
this is my first time working with the @@identity, and i tried copying and pasting some code but can't seem to get it to work. The Identity will return a number if i run it from the MSsql command line, but can't figure out how to get it ou...
answer(7) view(907) status(

)
between 10am and 10am...
Below I have two SQL queries, one that says "how many in last full week" and the other that says "How many between 10am on this day and 10am on this day"
What I'd like is one query that says "How many between las...
answer(0) view(605) status(

)
Trying to Reference Records
Ok, what I'm trying to do is reference other records w/ the same Business_name and/or Address to the first existence of the first record in the table that it correspondes to.
answer(0) view(887) status(

)
List unique values from column
I'm trying to figure out a SQL command that is like
Select ColumnX from TableX
except I just want the list of values in ColumnX, so if ColumnX has multiple entries with values "X" and multiple entries with values "Y", ...
answer(2) view(448) status(

)
Yet another Access / SQL-Server question
Hello,
as you can see, I am not good at this, and I cannot get my hands on any resources to solve the problem myself, so I appreciate another answer:
I migrated an Access DB to SQL Server (or rather somebody did for me). Now I have th...
answer(5) view(494) status(

)
Data Type for XML Data Stream
Hello,
I am trying to save an XML data stream from an application to an SQL database. I have tried the data type of "text", however, it doesn't appear to save the entire document, only the first 250 characters.
Can someone ...
answer(0) view(35) status(

)
CONVERT Date? How to display results?
Hi there,
I am trying to pull out the birthday dates from a table (MS SQL SERVER) so that the table that is displayed on the website only displays a list of birthdays.
My table contains the DOB column in datetime format.
I have used the ...
answer(2) view(299) status(

)
not aborting on raiserror
For som reason after an error is raised
Code:
raiserror('error msg',16,1)
the code continues on it's merroy way and fails to stop, therefore all my code has to exist within if/else's. Is there a setting somewhere th...
answer(0) view(622) status(

)