Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF Microsoft SQL Server


How to create a trigger for this constraint.  

Hi every body.Could any sql sever expert show me how i can create a sql server 2000 trigger for this constraaint as this is my first time trying to create a trigger. I got many tables in my sql server. I want the trigger fires when a user tries to enter hours for an employee in hours worked... Continue Reading
Views : 133
Monday 26th of November 2012

how to export my db...  

hey all, i am using msde through web matrix to manage my db's but i can't see a way of exporting them, please could somone point me in the right direction...thanksRF Continue Reading
Views : 161
Monday 26th of November 2012

Date Comparison in SQL Server  

I need to compare two dates , but i'm getting the following error:"Server: Msg 242, Level 16, State 3, Line 2The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."the code is below:declare @d1... Continue Reading
Views : 108
Monday 26th of November 2012

Help in select Query  

Hi Everyone,I have a table with six date fields, when the user enters data in the form The database populates with TextBox values. Some fields could be null.My question is how to obtain the last NOT NULL Value from the table Row.For Example:Date1 Date2 Date 3... Continue Reading
Views : 158
Monday 26th of November 2012

No data exists for the row/column.  

HeyI'm working on an MMORPG (Massive Multiplayer Online Role Playing Game) at the moment. Just started. On the left, there is a basic summary of the user's statistics (battle strengths, health, level, money, etc.), but when I run the query, ASP.NET returns the error :No data exists for... Continue Reading
Views : 136
Monday 26th of November 2012

Temporary Tables  

Does anybody know how long by default temporary tables last? How do you adjust temporary table lifetime? Is it possible to increase their lifespan? Continue Reading
Views : 34
Monday 26th of November 2012

SQL Aggregate function that combines like CONCAT  

Hey all, I'm trying to find a way to query a database, using several GROUP BY's, but I need the IDENTITYCOL to be put in an aggregate function that will give me a string representation of each IDENTITYCOL value. Something in between a SUM and a CONCAT. So basically if I have records... Continue Reading
Views : 141
Monday 26th of November 2012

Trouble with users  

I'm trying to create users through the security wizard but it keeps saying there was an error creating users -never very specific. Is there any known issue with the security wizard? Continue Reading
Views : 189
Monday 26th of November 2012

Insert/update/select data from excel!  

hi guys,how can we select/insert/update data from a specific cell in the excel sheet through sql query. the query could be in stored procedure. is this task be possible in DTS.thanks in advance. Continue Reading
Views : 187
Monday 26th of November 2012

Syntax error near keyword 'BEGIN'  

never mind Continue Reading
Views : 129
Monday 26th of November 2012

quick Unicode question  

Hello,I'm using ASP, coded in UTF-8 and connecting to a SQL Server 2000. If I do an INSERT with a stored proc and set the parameter to nvarchar and the datatype of the column to nvarchar, do I still need to prefix the string with N?N'mystring'N@mystring Continue Reading
Views : 294
Monday 26th of November 2012

dsn problemurgent  

hi...at one server my asp files & at other server my sql database.i had created dsn for connection.....and now i m using this dsn to my asp files which is at other server......it gives me invalid connection or connection is closed........can any... Continue Reading
Views : 141
Monday 26th of November 2012

what's the error in my mssql statement :(  

hii always used this type of command PHP Code: ????response Continue Reading
Views : 163
Monday 26th of November 2012

SQL Collation to GReek  

Hello Experts,I have a problem. I have a sql database that is with collation of latin (particularly, SQL_Latin1_General_CP1_CI_AS) but I want to have greek language in the database. trying to change the collation to Greek_BIN, the SQL query (ALTER DATABASE ... Continue Reading
Views : 41
Monday 26th of November 2012

can't insert data into mssql through my asp code.. :(  

hihere's my asp code: Code: Continue Reading
Views : 200
Monday 26th of November 2012

Copy Database design & tables to SQL  

Hi,I need to upload my local database to one on my server - but i dont have permissions to use the Database Restore function.Is there anyway that i can get SQL Server to Generate a script to create all the tables, stored procedures and data in the tables? Continue Reading
Views : 136
Monday 26th of November 2012

query help  

Hello All,I have the following tableClientID | Address | City | State__________________________________ 1 | something | Blah | WV 2 | someblah | Pitt | PA 2 | blahblah | Pitt | PA 3 | other | Mtow |... Continue Reading
Views : 193
Monday 26th of November 2012

Calculate month end date  

I'm trying to create code that will give the last day of the previous month. I have a Crystal Report with 9 subreports querying 9 distinct data sources and it currently uses parameters fileds for start and end date but it's getting tiresome having to manually enter them.I have... Continue Reading
Views : 85
Monday 26th of November 2012

Search  

I have asp.net C# web application I want to search jobvacancy details using jobrole. if user did not select any value I want to select all the details including null values. this Jobvacancy table has JobRole feild and it allow to insert null values,this is my... Continue Reading
Views : 46
Monday 26th of November 2012

passing parameter to stored procedure in Access  

This is my first time using sql server and there's lots I'm still figuring out.I know how to pass a parameter to a stored procedure when my stored procedure is the data source for a report. But this is different - I created a stored procedure that gives data needed for... Continue Reading
Views : 164
Monday 26th of November 2012

Job Scheduling  

Hi,How do one schedule a job in SQL Server 2000?Thanks Continue Reading
Views : 45
Monday 26th of November 2012

MS SQL Script for Greatest Common Divisor (GCD)  

Does anyone have a MS SQL query that calculates the greatest common divisor (AKA highest common factor or greatest common factor) for an array of numbers?Please advise Continue Reading
Views : 90
Monday 26th of November 2012

Difficult Query/Subquery ...  

I need to insert data from one table into another existing table a record only if the MAX(process_date) is GREATER THAN, the MAX(process_date) already in the table ...Is there a way to do this in 1 query? Is there a way to do this at all?Any help would be greatly... Continue Reading
Views : 200
Monday 26th of November 2012

For XML Query  

Hi All,I want to get XML by the query so i use For XML Explicit, but couldn't able to get specified format, I have table structure as : id userid password-- ------ ---------1 user1 pass12 user2 pass2I want XML format as... Continue Reading
Views : 62
Monday 26th of November 2012

Whats going in this statement  

In my new job I've inherited a job-tracking system that displays stats on work done etc...I've somehow found myself working with SQL server for the first time ever and would really appreciate it if anyone could explain to me what is happening in the statement below (in regards to... Continue Reading
Views : 128
Monday 26th of November 2012

Comma delimited string in nvarchar, matching with user id  

Okay heres the deal (I hope I can explain this clearly enough while being as breif as I can):I created a trouble ticket system (ASP site using MS SQL) where the trouble tickets were assigned to only one person, but now I need tickets to be assigned to multiple people. So... Continue Reading
Views : 231
Monday 26th of November 2012

Sql server database  

hi I am new on database but i can build database by ms access , can i build the same database by sql server , i mean is the program has visual interface to build datebase ?Thank you Continue Reading
Views : 210
Monday 26th of November 2012

SQL Server 64 bit  

Hi,We're currently running SQL server 2000 on a 32 bit machine.What should happen if there's going to be a move to a 64 bit machine?Thanks Continue Reading
Views : 59
Monday 26th of November 2012

Update table with values from Select statement  

I have this select query that returns to me the data I need correctly ...[highlight=SQL]select c.symbol, c.pol_num,sum(case when bi_prem > 0 then 1 else 0 end)+sum(case when pd_prem > 0 then 1 else 0 end)+ sum(case when umbi_prem > 0 then 1 else 0 end)+ Continue Reading
Views : 256
Monday 26th of November 2012

How to output part of feild using sql  

Hi all. i got a huge list of mp3 that they are in diffrent folders. I put all the songs infor in mysql database in a table called files. I want a query db that output foldernames for me .The folder name is part of feiled called filename in files table. The value of filename... Continue Reading
Views : 103
Monday 26th of November 2012