It is always best practice to list out the columns of the table you are inserting into. This way you don’t have to worry about issues like this.
How about something like this: <pre>SELECT empl_num, SUM((CASE WHEN pay_type = 1 THEN rate ELSE 0 END)) AS reg_Rate, SUM((CASE WHEN pay_type = 3 THEN rate ELSE 0 END)) AS ovr_Rate FROM tblPayrollFlashJobDetail WHERE unitnum = 8 AND salesdate BETWEEN ’01/01/09′ AND ’01/10/09′ AND empl_num = 257 GROUP BY empl_num ORDER BY empl_num</pre> But, why [...]
In the combo box for the item, put in the Row Source propery a query like this: Select item, description from items where category = forms![orderentry]![category] Also, in the Got Focus event of the item, do: me![item].requery This will cause the combo box to requery if the category has changed If you move the database [...]
In SQL Server, you could use the CHARINDEX function. Something like this <pre>SELECT CASE CHARINDEX(‘-’,names) WHEN 0 THEN names ELSE SUBSTRING(names,1,(CHARINDEX(‘-’,names+’-')-2)) END FROM your_table</pre> If the space is not always present between the last name and the hyphen, you coud modify the statement to something like this: <pre>SELECT CASE CHARINDEX(‘-’,names) WHEN 0 THEN names ELSE [...]
The Windows account that you are using to access the remote doesn’t have access to the tables which is why you can’t see them. The person who’s computer you are accessing will need to give you access to the tables.
In MySql, you could use the LIMIT clause to get something similar to the TOP clause. LIMIT’s example: SELECT * FROM yourTable LIMIT 10 You could also generate a row number, this way: select @rownum:=@rownum+1 ‘row_number’, y.* FROM YourTable y, (SELECT @rownum:=0) r LIMIT 10; ———————————————
Hi, You can use the RTVQMQRY command to retrieve the SQL statement to a source file – you’ll need to specify ALWQRYDFN(*YES). Regards, Martin Gilbert.
you may use simple alter statement: ALTER DATABASE MyDatabase COLLATE <desired collation> Try it after taking a backup
Ask and you <a href=”http://itknowledgeexchange.techtarget.com/sql-server/my-experience-with-putting-a-crl-procedure-into-sql/”>shall receive</a>. Example has a single in, and a single out parm.
Adding 6000 records per day isn’t all that much. You are only looking at ~2.2M records per year. 1. When you add data the index isn’t rebuild. The new data is simply inserted into the correct data page of the index, and if needed SQL does a page split. When building your indexes pay attention [...]
You can not delete the transaction log files. These files are required for the databases to function. There must be at least one per database. If you don’t require the ability to do point in time restores then you can change the database recovery model from FULL to SIMPLE so that log entries are not [...]
SQL Server full text indexing doesn’t allow for indexing files outside of the database. They would need to be loading into a table within the database for the SQL Server to index. You can use the Windows 2003 Indexing service to index files on a file server, however it doesn’t support indexing files on an [...]
At first look, a comma is missing before ‘Amt’: set @cmd= N’insert into TmpDues ( PatNo, BillDate, ReceiptNo, PayMode<b>,</b>Amt) But I think it would be easier if you tell us what error message you are getting. Try printing the contents of @Cmd before executing it, so you can have a look at the actual SQL [...]
You’ll need to create the folder C:Test for this script to work.
That’s all you should have to do. If you are adding in the group that you’ll use for the sysadmins to get access, add the new one first then remove the old one.
Did you check <a href=”http://msdn.microsoft.com/en-us/library/ms176007.aspx”>Microsoft documentation</a>? I remember that there was a sp that listed all basic information on the stored procedure but can’t remind it right away. You can get a list of stored procedures by querying the sys.procedures catalog view. You can use the sp_helptext procedure to get the contents of each procedure.
It is not recommended to call a webpage from a SQL Agent job as the SQL Agent job is a behind the scenes process, so anything that it does isn’t visible to the user. You can find http_get.exe which is a command line app which can be used to get a web page. If you [...]
Dont think much … Open Query Analise and press F1 Search for CREATE PROCEDURE Got it …. Njoy —- Take the SQL Statement that you want to make the stored procedure and put the below line above it. Then run the script. This will create a stored procedure based on the name you provided in [...]
Yes you can move a database from one edition to another, and from one build to another without issue.
If you do an in place upgrade then all those passwords should remain. You’ll want to have copies of the passwords just in case though.





