Viewing 15 posts - 286 through 300 (of 13,878 total)
Dynamic SQL is one way of creating a variable SELECT statement that can be executed.
October 16, 2024 at 12:12 pm
Thanks Phil. I will check this.
One more query related to this. In the screenshot you can see that "save my password" is checked for the user "SA". How can...
October 15, 2024 at 12:23 pm
Different people will do things in different ways, as it depends on how you want to work together, how many developers there are and how many projects there are.
I work...
October 15, 2024 at 8:31 am
If you do not have a server called CCSQL, I think it may be an alias to a server.
Read more about aliases here:
If you don't need or want to...
October 15, 2024 at 7:35 am
Can you provide a screen shot, as I'm not sure exactly what you mean?
October 11, 2024 at 3:55 pm
Not sure what that is, but try pressing 'Parse' (CTRL/F5) on it and you'll see that it doesn't.
October 9, 2024 at 2:27 pm
The code fragment I posted would not create that error. Can you post the entire text of the query which is giving that error?
October 9, 2024 at 2:13 pm
Your code is different from what I suggested. In particular, you changed <> to 'Like'.
SELECT ...
FROM sometables
WHERE t4.ReturnDate >= DATEADD (yy, -2, DATEADD (yy, DATEDIFF (yy, 0,...
October 8, 2024 at 8:29 pm
These are the rows that did not import properly:

and here are the originals (taken from the CSV file)

So now you can see why they...
October 8, 2024 at 8:14 pm
I just tried this and it imported quite easily.
Assuming you're in SQL Server Management Studio and want to import the data into a new table in a database which already...
October 8, 2024 at 8:11 pm
If the following query produces more than one result, that is your problem – you cannot update a single value to a multi-valued result set:
SELECT DISTINCT
...
October 8, 2024 at 7:52 pm
Yes, that's a fair comment.
We've gone down a hybrid path, with most DBs migrated to Azure SQL DBs, but SQL Server VMs for those that are not supported or need...
October 8, 2024 at 7:43 pm
Removal of results is done by including your condition in the WHERE clause, not in the SELECT.
WHERE custid not like '%abc%' or company <> 'abc'
October 8, 2024 at 7:37 pm
SSL encryption is configured on the server/host. But imagine a scenario where SSL is not configured . How does it look if SSMS choose encryption as mandatory and checks...
October 8, 2024 at 3:33 pm
I think you might be in trouble here, but will be interested to hear what other people think.
Are you in the process of migrating to Azure and had not considered...
October 8, 2024 at 1:58 pm
Viewing 15 posts - 286 through 300 (of 13,878 total)